mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 01:46:45 +02:00
MDL-6376 - fix minor errors in the previous commit.
More significantly, this patch changes the '1 Students have made 1 attempts' string. To start with, this code was being produced in five different places, so I made a function to do the work!. Next, as you can see, it is not gramatical. Also, some people find it confusing, as in MDL-6376. Therefore, it now just says 'Attempts: 1'. Merged from MOODLE_19_STABLE.
This commit is contained in:
parent
f63d29223e
commit
6c58e1985b
7 changed files with 25 additions and 41 deletions
|
@ -304,12 +304,8 @@
|
|||
|
||||
print_box_start();
|
||||
|
||||
$a->attemptnum = count_records('quiz_attempts', 'quiz', $quiz->id, 'preview', 0);
|
||||
$a->studentnum = count_records_select('quiz_attempts', "quiz = '$quiz->id' AND preview = '0'", 'COUNT(DISTINCT userid)');
|
||||
$a->studentstring = $course->students;
|
||||
|
||||
echo "<div class=\"attemptsnotice\">\n";
|
||||
echo "<a href=\"report.php?mode=overview&id=$cm->id\">".get_string('numattempts', 'quiz', $a)."</a><br />".get_string("attemptsexist","quiz");
|
||||
echo "<a href=\"report.php?mode=overview&id=$cm->id\">".quiz_num_attempt_summary($quiz)."</a><br />".get_string("attemptsexist","quiz");
|
||||
echo "</div><br />\n";
|
||||
|
||||
$sumgrades = quiz_print_question_list($quiz, $thispageurl, false, $quiz_showbreaks, $quiz_reordertool);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue