Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changes in examination #1672

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions FusionIIIT/applications/examination/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1522,10 +1522,10 @@ def generate_pdf(request):
academic_year = request.POST.get('academic_year')
course_info = get_object_or_404(Courses, id=course_id)
grades = Student_grades.objects.filter(course_id_id=course_id, year=academic_year).order_by("roll_no")
course=CourseInstructor.objects.get(course_id_id=course_id,year=academic_year)
course=CourseInstructor.objects.filter(course_id_id=course_id,year=academic_year,instructor_id_id=request.user.username)
if not course:
return JsonResponse({"success": False, "error": "course not found."}, status=404)
semester=course.semester_no
semester=course.first().semester_no

all_grades = ["O", "A+", "A", "B+", "B", "C+", "C", "D+", "D", "F", "I", "S", "X"]
grade_counts = {grade: grades.filter(grade=grade).count() for grade in all_grades}
Expand Down Expand Up @@ -1713,7 +1713,7 @@ def generate_result(request):
).first()
if not semester_info:
return JsonResponse({'error': 'Semester not found'}, status=404)

# print(batch, branch)
course_slots = CourseSlot.objects.filter(semester_id=semester_info)
course_ids = course_slots.values_list('courses', flat=True)
courses = Courses.objects.filter(id__in=course_ids)
Expand Down
Loading