Skip to content

Commit

Permalink
Merge pull request #1319 from Divyanshusir/courseRegistration
Browse files Browse the repository at this point in the history
AC2 - Course registration
  • Loading branch information
ChaudharyRaman authored Mar 11, 2024
2 parents e8a612e + a801ad5 commit 5f5b05f
Show file tree
Hide file tree
Showing 26 changed files with 1,678 additions and 292 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,10 @@ node_modules/

FusionIIIT/static/
package-lock.json

docker-entrypoint.sh


FusionIIIT/applications/eis/migrations/

postgres_data
1 change: 0 additions & 1 deletion FusionIIIT/applications/academic_information/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ class Curriculum_InstructorAdmin(admin.ModelAdmin):
admin.site.register(Holiday)
admin.site.register(Curriculum,CurriculumAdmin)

#Hello!
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class Meta:

class CurriculumSerializer(serializers.ModelSerializer):
course_id = CourseSerializer()

class Meta:
model = Curriculum
fields = ('curriculum_id','course_code','course_id','credits','course_type',
Expand Down
2 changes: 1 addition & 1 deletion FusionIIIT/applications/academic_information/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class Student(models.Model):
'''
Current Purpose : To store information pertinent to a user who is also a student
ATTRIBUTES :
Expand Down
18 changes: 12 additions & 6 deletions FusionIIIT/applications/academic_information/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@



from applications.academic_procedures.views import acad_proced_global_context
from applications.academic_procedures.views import acad_proced_global_context , get_sem_courses
from applications.programme_curriculum.models import Batch


Expand Down Expand Up @@ -107,7 +107,6 @@ def get_context(request):
# course_type = Constants.COURSE_TYPE
# timetable = Timetable.objects.all()
# exam_t = Exam_timetable.objects.all()

procedures_context = acad_proced_global_context()

try:
Expand Down Expand Up @@ -845,7 +844,9 @@ def generatexlsheet(request):

try:
batch = request.POST['batch']
course = Courses.objects.get(id = request.POST['course'])
# print('-------------------------------------------------------------------------------------' , request.POST['course'])
course_name = Course.objects.get(id = request.POST['course']).course_name
course = Courses.objects.get(name = course_name )
obj = course_registration.objects.all().filter(course_id = course)
except Exception as e:
batch=""
Expand Down Expand Up @@ -1029,9 +1030,14 @@ def generate_preregistration_report(request):
max_width = max(max_width,len(choices_of_current_student))

for choice in range(1,len(choices_of_current_student)+1):
current_choice = InitialRegistration.objects.get(student_id=student, semester_id__semester_no=sem,course_slot_id = slot,priority = choice)
# #print("current choice is ",current_choice)
z.append(str(current_choice.course_id.code)+"-"+str(current_choice.course_id.name))
try:
current_choice = InitialRegistration.objects.get(student_id=student, semester_id__semester_no=sem, course_slot_id=slot, priority=choice)
z.append(str(current_choice.course_id.code) + "-" + str(current_choice.course_id.name))
except :
z.append("No registration found")
# current_choice = InitialRegistration.objects.get(student_id=student, semester_id__semester_no=sem,course_slot_id = slot,priority = choice)
# # #print("current choice is ",current_choice)
# z.append(str(current_choice.course_id.code)+"-"+str(current_choice.course_id.name))

data.append(z)
m+=1
Expand Down
44 changes: 39 additions & 5 deletions FusionIIIT/applications/academic_procedures/api/serializers.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from rest_framework.authtoken.models import Token
from rest_framework import serializers

from applications.academic_procedures.models import (ThesisTopicProcess, InitialRegistrations,
FinalRegistrations, SemesterMarks,
BranchChange)
from applications.academic_procedures.models import (ThesisTopicProcess, InitialRegistrations,InitialRegistration,
FinalRegistration, FinalRegistrations, SemesterMarks,
BranchChange , StudentRegistrationChecks, Semester, backlog_course , CourseSlot , FeePayments , course_registration)

from applications.academic_information.api.serializers import (CurriculumInstructorSerializer,
CurriculumSerializer)
from applications.globals.api.serializers import (UserSerializer, HoldsDesignationSerializer)
CurriculumSerializer , CourseSerializer , StudentSerializers )
from applications.globals.api.serializers import (UserSerializer, HoldsDesignationSerializer , ExtraInfoSerializer)

class ThesisTopicProcessSerializer(serializers.ModelSerializer):

Expand All @@ -27,6 +27,24 @@ class Meta:
model = FinalRegistrations
fields = ('__all__')

class InitialRegistrationSerializer(serializers.ModelSerializer):

class Meta:
model = InitialRegistration
fields = ('__all__')

class FinalRegistrationSerializer(serializers.ModelSerializer):

class Meta:
model = FinalRegistration
fields = ('__all__')

class StudentRegistrationChecksSerializer(serializers.ModelSerializer):
class Meta:
model = StudentRegistrationChecks
fields = '__all__'


class SemesterMarksSerializer(serializers.ModelSerializer):

class Meta:
Expand All @@ -38,3 +56,19 @@ class BranchChangeSerializer(serializers.ModelSerializer):
class Meta:
model = BranchChange
fields = ('__all__')

class SemesterSerializer(serializers.ModelSerializer):

class Meta:
model = Semester
fields = ('__all__')

class CourseRegistrationSerializer(serializers.ModelSerializer):
class Meta:
model = course_registration
fields = ('__all__')

class CourseSlotSerializer(serializers.ModelSerializer):
class Meta:
model = CourseSlot
fields = ('__all__')
39 changes: 33 additions & 6 deletions FusionIIIT/applications/academic_procedures/api/urls.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,39 @@
from django.conf.urls import url

from . import views


urlpatterns = [
url(r'^stu/details', views.academic_procedures_student, name='student_procedures'),
url(r'^stu/pre_registration' , views.student_pre_registration , name = 'pre_registration'),
url(r'^stu/final_registration' , views.student_final_registration , name = 'final_registration'),
url(r'^stu/view_registration' , views.student_view_registration , name = 'view_registration'),
url(r'^stu/view_offered_courses' , views.view_offered_courses , name = 'student_view_offered_courses'),
url(r'^stu/backlog_courses', views.student_backlog_courses , name = 'student_backlog_courses'),
url(r'^stu/add_course' , views.add_course , name ='add_course') ,
url(r'^stu/drop_course' , views.drop_course , name = 'drop_course'),
# url(r'^stu/replaceCourse' , views.replaceCourse , name = 'replaceCourse')



url(r'^acad/view_registrations' , views.acad_view_reigstrations , name='acad_view_registrations'),
url(r'^acad/get_course_list' , views.get_course_list , name = 'get_course_list' ),
url(r'^acad/configure_pre_registration' , views.configure_pre_registration_date , name = 'configure_pre_registration'),
url(r'^acad/configure_final_registration' , views.configure_final_registration_date , name = 'configure_final_registration'),



url(r'^fac/view_assigned_courses' , views.faculty_assigned_courses , name = 'faculty_assigned_courses'),
# url(r'^fac/get_roll_list' , views.fetch_roll_list , name = 'fetch_roll_list'),



url(r'^get_user_info' , views.get_user_info , name = 'get_user_info'),

# these urls were designed previously and are not working any more

url(r'^fac/', views.academic_procedures_faculty, name='faculty_procedures'),
url(r'^stu/', views.academic_procedures_student, name='student_procedures'),
url(r'^addThesis/', views.add_thesis, name='add_thesis'),
url(r'^approve_thesis/(?P<id>[0-9]+)/', views.approve_thesis, name='approve_thesis'),
# url(r'^fac/', views.academic_procedures_faculty, name='faculty_procedures'),
# url(r'^stu', views.academic_procedures_student, name='student_procedures'),
# url(r'^addThesis/', views.add_thesis, name='add_thesis'),
# url(r'^approve_thesis/(?P<id>[0-9]+)/', views.approve_thesis, name='approve_thesis')

]
]
Loading

0 comments on commit 5f5b05f

Please sign in to comment.