Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Merge branch 'MDL-31702_22' of git:// into M…

  • Loading branch information...
commit ec2b87aede6bd0acce391a4571d30c9c0ece9a45 2 parents 0b1579b + 53e40eb
@samhemelryk samhemelryk authored
Showing with 3 additions and 2 deletions.
  1. +1 −1  mod/quiz/lang/en/quiz.php
  2. +2 −1  mod/quiz/locallib.php
2  mod/quiz/lang/en/quiz.php
@@ -127,7 +127,7 @@
$string['cannotsavequestion'] = 'Cannot save question list';
$string['cannotsetgrade'] = 'Could not set a new maximum grade for the quiz';
$string['cannotsetsumgrades'] = 'Failed to set sumgrades';
-$string['cannotstartgradesmismatch'] = 'Cannot start an attempt at this quiz. The quiz is supposed to be graded, but there are no questions in the quiz that are worth any marks.';
+$string['cannotstartgradesmismatch'] = 'Cannot start an attempt at this quiz. The quiz is set to be graded out of {$a->grade}, but none of the questions in the quiz have a grade. This can be fixed on the \'Edit quiz\' page.';
$string['cannotstartmissingquestion'] = 'Cannot start an attempt at this quiz. The quiz definition includes a question that does not exist.';
$string['cannotstartnoquestions'] = 'Cannot start an attempt at this quiz. The quiz has not been set up yet. No questions have been added.';
$string['cannotwrite'] = 'Cannot write to export file ({$a})';
3  mod/quiz/locallib.php
@@ -71,7 +71,8 @@ function quiz_create_attempt($quiz, $attemptnumber, $lastattempt, $timenow, $isp
if ($quiz->sumgrades < 0.000005 && $quiz->grade > 0.000005) {
throw new moodle_exception('cannotstartgradesmismatch', 'quiz',
- new moodle_url('/mod/quiz/view.php', array('q' => $quiz->id)));
+ new moodle_url('/mod/quiz/view.php', array('q' => $quiz->id)),
+ array('grade' => quiz_format_grade($quiz, $quiz->grade)));
if ($attemptnumber == 1 || !$quiz->attemptonlast) {

0 comments on commit ec2b87a

Please sign in to comment.
Something went wrong with that request. Please try again.