mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
merged notice fix
This commit is contained in:
parent
efce0f5faa
commit
1d20bb7d51
1 changed files with 5 additions and 3 deletions
|
@ -53,6 +53,8 @@
|
||||||
}
|
}
|
||||||
array_unshift($align, 'center');
|
array_unshift($align, 'center');
|
||||||
|
|
||||||
|
$showing = 'scores'; // default
|
||||||
|
|
||||||
if (has_capability('mod/quiz:viewreports', $coursecontext)) {
|
if (has_capability('mod/quiz:viewreports', $coursecontext)) {
|
||||||
array_push($headings, get_string('attempts', 'quiz'));
|
array_push($headings, get_string('attempts', 'quiz'));
|
||||||
array_push($align, 'left');
|
array_push($align, 'left');
|
||||||
|
@ -60,13 +62,13 @@
|
||||||
} else if (has_capability('mod/quiz:attempt', $coursecontext)) {
|
} else if (has_capability('mod/quiz:attempt', $coursecontext)) {
|
||||||
array_push($headings, get_string('bestgrade', 'quiz'), get_string('feedback', 'quiz'));
|
array_push($headings, get_string('bestgrade', 'quiz'), get_string('feedback', 'quiz'));
|
||||||
array_push($align, 'left', 'left');
|
array_push($align, 'left', 'left');
|
||||||
$showing = 'scores';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$table->head = $headings;
|
$table->head = $headings;
|
||||||
$table->align = $align;
|
$table->align = $align;
|
||||||
|
|
||||||
// Poplate the table with the list of instances.
|
/// Populate the table with the list of instances.
|
||||||
|
|
||||||
$currentsection = '';
|
$currentsection = '';
|
||||||
foreach ($quizzes as $quiz) {
|
foreach ($quizzes as $quiz) {
|
||||||
$cm = get_coursemodule_from_instance('quiz', $quiz->id);
|
$cm = get_coursemodule_from_instance('quiz', $quiz->id);
|
||||||
|
@ -109,7 +111,7 @@
|
||||||
} else {
|
} else {
|
||||||
$data[] = '';
|
$data[] = '';
|
||||||
}
|
}
|
||||||
} else if ($showing = 'scores') {
|
} else if ($showing == 'scores') {
|
||||||
|
|
||||||
// Grade and feedback.
|
// Grade and feedback.
|
||||||
$bestgrade = quiz_get_best_grade($quiz, $USER->id);
|
$bestgrade = quiz_get_best_grade($quiz, $USER->id);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue