django-lms icon indicating copy to clipboard operation
django-lms copied to clipboard

Add and drop course for student

Open GaurangKhandelwal456 opened this issue 9 months ago • 6 comments

please tell me how can I add the feature of add & drop course for student

what changes will i have to do to make it run this feature

and one more thing is that i want to the student list that is displayed on the admin account or superuser, should also be displayed on the lecturer account. i have tried to call it inside the lecturer account but it doesn't open. whenever i click on the student list on the lecturer account it redirect me to the home page instead of student_list

please tell me the structure or tell me where i m going wrong

thanks , waiting for your reply

GaurangKhandelwal456 avatar May 02 '24 11:05 GaurangKhandelwal456

Hello, To add and delete courses, you just need to log in as a student and navigate to the add and drop page (/programs/course/registration/)

The list of students who are registered in a specific course is visible to the teacher of that course in /result/manage-score/<course_id>/

But generally all registered students/lecturers are only visible to admins.

adilmohak avatar May 05 '24 19:05 adilmohak

Something is not right with this feature, it basically renders empty page when you login as a student and try to register on (/programs/course/registration/) for a course, i guess because of this if statment in the template {% if not all_courses_are_registered %}

Dihfahsih1 avatar May 18 '24 18:05 Dihfahsih1

I have troubleshot the code base and found out the error is to do with student level in Student model in level the choices BACHLOAR_DEGREE = "Bachloar" instead of BACHELOR_DEGREE = "Bachelor" this also is the same on the Course model choices.

to troubleshoot this try to comment the levels in the course_registration view on these lines of code: courses = ( Course.objects.filter( program__pk=student.program.id, #level=student.level, semester=current_semester, ) .exclude(id__in=t) .order_by("year") )

Then print(courses) , with levels commented out now it will return a query with courses unlike previously with levels. That means the source of the error of ADD and Drop displaying empty page is due to the empty query due to typo in the levels choices of both Courses and Student models.

Dihfahsih1 avatar May 18 '24 20:05 Dihfahsih1

I have the same issue and I need the system for my graduation, please help if you fixed it

Abdihakim2003 avatar Jul 10 '24 08:07 Abdihakim2003

I added fix in #61 and awaiting @adilmohak for approval.

mnymkr avatar Jul 11 '24 06:07 mnymkr

Thanks all of you I fixed it

Abdihakim2003 avatar Jul 13 '24 07:07 Abdihakim2003