File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
templates/classroom/teachers Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 1+ media /
12# Byte-compiled / optimized / DLL files
23__pycache__ /
34* .py [cod ]
Original file line number Diff line number Diff line change 1111 </ ol >
1212 </ nav >
1313 < h2 class ="mb-3 "> {{ quiz.name }} Results</ h2 >
14-
14+ < p class =" lead " > Total Questions: {{total_questions}} </ p >
1515 < div class ="card ">
1616 < div class ="card-header ">
1717 < strong > Taken Quizzes</ strong >
18- < span class ="badge badge-pill badge-primary float-right "> Average Score: {{ quiz_score.average_score|default_if_none:0.0 }}</ span >
18+ < span class ="badge badge-pill badge-primary float-right "> Average Score: {{ quiz_score.average_score|default_if_none:0.0|floatformat:2 }}</ span >
1919 </ div >
2020 < table class ="table mb-0 ">
2121 < thead >
2222 < tr >
2323 < th > Student</ th >
2424 < th > Date</ th >
25+ < th > Score</ th >
2526 < th > Percentage</ th >
2627 </ tr >
2728 </ thead >
@@ -30,6 +31,7 @@ <h2 class="mb-3">{{ quiz.name }} Results</h2>
3031 < tr >
3132 < td > {{ taken_quiz.student.user.username }}</ td >
3233 < td > {{ taken_quiz.date|naturaltime }}</ td >
34+ < td > {{ taken_quiz.score }}</ td >
3335 < td > {{ taken_quiz.percentage }}</ td >
3436 </ tr >
3537 {% endfor %}
Original file line number Diff line number Diff line change @@ -115,7 +115,8 @@ def get_context_data(self, **kwargs):
115115 extra_context = {
116116 'taken_quizzes' : taken_quizzes ,
117117 'total_taken_quizzes' : total_taken_quizzes ,
118- 'quiz_score' : quiz_score
118+ 'quiz_score' : quiz_score ,
119+ 'total_questions' :quiz .questions .count ()
119120 }
120121 kwargs .update (extra_context )
121122 return super ().get_context_data (** kwargs )
You can’t perform that action at this time.
0 commit comments