mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Merge branch 'MDL-71392-311' of git://github.com/paulholden/moodle into MOODLE_311_STABLE
This commit is contained in:
commit
6a5b32a584
2 changed files with 12 additions and 1 deletions
|
@ -30,3 +30,13 @@ Feature: Display of information before starting a quiz
|
||||||
| TF1 | 1 |
|
| TF1 | 1 |
|
||||||
When I am on the "Quiz 1" "mod_quiz > View" page logged in as "student"
|
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"
|
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"
|
||||||
|
|
|
@ -187,7 +187,8 @@ if ($quiz->attempts != 1) {
|
||||||
quiz_get_grading_option_name($quiz->grademethod));
|
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 = new stdClass();
|
||||||
$a->grade = quiz_format_grade($quiz, $item->gradepass);
|
$a->grade = quiz_format_grade($quiz, $item->gradepass);
|
||||||
$a->maxgrade = quiz_format_grade($quiz, $quiz->grade);
|
$a->maxgrade = quiz_format_grade($quiz, $quiz->grade);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue