Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
grvup committed Nov 8, 2024
1 parent 35d0762 commit bed7f0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions FusionIIIT/applications/academic_information/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@ def allocate(request) :
course_id = course_slot_object.courses.values_list('id', flat=True).first()
# Retrieve the Course instance
course = Course.objects.get(id=course_id)
print(course)
print(student)
print(course_slot_object)

# Insert directly into FinalRegistration
FinalRegistration.objects.create(
student_id=student,
Expand All @@ -136,7 +134,7 @@ def allocate(request) :
course_id=course,
course_slot_id=course_slot_object
)
print("gaurav")

unique_course_name.append(course_slot_object.name)
elif course_slot_object.type == "Open Elective": # Runs only for open elective course slots
if course_slot_object.name not in unique_course_name:
Expand All @@ -156,7 +154,7 @@ def view_alloted_course(request) :
verified = request.POST.get('year')
course = request.POST.get('course')

registrations = FinalRegistration.objects.filter(Q(student_id__batch = batch) & Q(verified = False) & Q(semester_id__semester_no = sem) & Q(course_id__code = course))
registrations = FinalRegistration.objects.filter(Q(student_id__batch = batch) & Q(semester_id__semester_no = sem) & Q(course_id__code = course))
return_list = []
for registration in registrations:
obj = {
Expand Down
2 changes: 1 addition & 1 deletion FusionIIIT/applications/academic_information/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,7 @@ def get_excel(request):
sem = request.POST.get('semester-check-view')
year = request.POST.get('year-check-view')
course = request.POST.get('Course-check-view')
registrations = FinalRegistration.objects.filter(Q(student_id__batch = batch) & Q(verified = False) & Q(semester_id__semester_no = sem) & Q(course_id__code = course))
registrations = FinalRegistration.objects.filter(Q(student_id__batch = batch) & Q(semester_id__semester_no = sem) & Q(course_id__code = course))
return_list = []
for registration in registrations:
return_list.append(registration.student_id.id.id)
Expand Down

0 comments on commit bed7f0e

Please sign in to comment.