MDL-53814 quiz: Question type column in manual grading
In the list of questions of the quiz manual grading the question number (Q#) and the question name is displayed along with an icon representing the question type.
This commit is contained in:
@@ -266,7 +266,7 @@ class quiz_grading_report extends quiz_default_report {
|
||||
}
|
||||
|
||||
protected function display_index($includeauto) {
|
||||
global $OUTPUT;
|
||||
global $OUTPUT, $PAGE;
|
||||
|
||||
if ($groupmode = groups_get_activity_groupmode($this->cm)) {
|
||||
// Groups is being used.
|
||||
@@ -297,6 +297,8 @@ class quiz_grading_report extends quiz_default_report {
|
||||
|
||||
$row[] = $this->questions[$counts->slot]->number;
|
||||
|
||||
$row[] = $PAGE->get_renderer('question', 'bank')->qtype_icon($this->questions[$counts->slot]->type);
|
||||
|
||||
$row[] = format_string($counts->name);
|
||||
|
||||
$row[] = $this->format_count_for_table($counts, 'needsgrading', 'grade');
|
||||
@@ -322,6 +324,7 @@ class quiz_grading_report extends quiz_default_report {
|
||||
$table->id = 'questionstograde';
|
||||
|
||||
$table->head[] = get_string('qno', 'quiz_grading');
|
||||
$table->head[] = get_string('qtypeveryshort', 'question');
|
||||
$table->head[] = get_string('questionname', 'quiz_grading');
|
||||
$table->head[] = get_string('tograde', 'quiz_grading');
|
||||
$table->head[] = get_string('alreadygraded', 'quiz_grading');
|
||||
|
||||
@@ -98,6 +98,7 @@ function quiz_report_get_significant_questions($quiz) {
|
||||
$qsbyslot = $DB->get_records_sql("
|
||||
SELECT slot.slot,
|
||||
q.id,
|
||||
q.qtype,
|
||||
q.length,
|
||||
slot.maxmark
|
||||
|
||||
@@ -113,6 +114,7 @@ function quiz_report_get_significant_questions($quiz) {
|
||||
foreach ($qsbyslot as $question) {
|
||||
$question->number = $number;
|
||||
$number += $question->length;
|
||||
$question->type = $question->qtype;
|
||||
}
|
||||
|
||||
return $qsbyslot;
|
||||
|
||||
Reference in New Issue
Block a user