Issue with 6411O Instructor Dashboard
Dave is delivering a 6411 course with Course ID of 80328.
In the Instructor Dashboard, he can see the students ok, he can see the ones who have finished Workshop 1 ok.
The issue – when he clicks Workshop 1 to see the students answers, it is pulling up a single set of responses that I entered as a test in the VILT Test section of SafetyNet.
It is pulling this record since it's registered as a workshop answer for the course but the student isn't registered. To fix this issue, only fetch submitted answers using the list of students registered in the course.
# returns a list of student id's registered to the course
student_ids = CourseAttendance.objects.filter(mysql_course_id_id=course_id).values("student_id")
# creates a list of students registered for the course
student_id_list = []
for student_id in student_ids:
if student_id["student_id"] not in student_id_list:
student_id_list.append(student_id["student_id"])
answers = StudentAnswers.objects.filter(practical_test_id=workshop_id, student_id__in=student_id_list)
Click to copy
Check the workshop_answers function in virtual_workshop/views.py file for more details.