MDL-71392 mod_quiz: don't display grade to pass if not set.
This commit is contained in:
@@ -30,3 +30,13 @@ Feature: Display of information before starting a quiz
|
||||
| TF1 | 1 |
|
||||
When I am on the "Quiz 1" "mod_quiz > View" page logged in as "student"
|
||||
Then I should see "Grade to pass: 60.00 out of 100.00"
|
||||
|
||||
Scenario: Check the pass grade is not displayed if not set
|
||||
Given the following "activities" exist:
|
||||
| activity | name | intro | course | idnumber | gradepass |
|
||||
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | |
|
||||
And quiz "Quiz 1" contains the following questions:
|
||||
| question | page |
|
||||
| TF1 | 1 |
|
||||
When I am on the "Quiz 1" "mod_quiz > View" page logged in as "student"
|
||||
Then I should not see "Grade to pass: 0.00"
|
||||
|
||||
+2
-1
@@ -187,7 +187,8 @@ if ($quiz->attempts != 1) {
|
||||
quiz_get_grading_option_name($quiz->grademethod));
|
||||
}
|
||||
|
||||
if ($item && $item->gradepass) {
|
||||
// Inform user of the grade to pass if non-zero.
|
||||
if ($item && grade_floats_different($item->gradepass, 0)) {
|
||||
$a = new stdClass();
|
||||
$a->grade = quiz_format_grade($quiz, $item->gradepass);
|
||||
$a->maxgrade = quiz_format_grade($quiz, $quiz->grade);
|
||||
|
||||
Reference in New Issue
Block a user