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

Add and drop course for student #51

Open
GaurangKhandelwal456 opened this issue May 2, 2024 · 3 comments
Open

Add and drop course for student #51

GaurangKhandelwal456 opened this issue May 2, 2024 · 3 comments

Comments

@GaurangKhandelwal456
Copy link

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

@adilmohak
Copy link
Owner

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.

@Dihfahsih1
Copy link

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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants