mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-7308 - followup - fix notices. Thanks to Pierre Pichet for the fix.
This commit is contained in:
parent
770537257a
commit
cfd24d98f9
1 changed files with 6 additions and 2 deletions
|
@ -236,8 +236,12 @@ class question_edit_form extends moodleform {
|
|||
}
|
||||
|
||||
// Remove unnecessary trailing 0s form grade fields.
|
||||
$question->defaultgrade = 0 + $question->defaultgrade;
|
||||
$question->penalty = 0 + $question->penalty;
|
||||
if (isset($question->defaultgrade)) {
|
||||
$question->defaultgrade = 0 + $question->defaultgrade;
|
||||
}
|
||||
if (isset($question->penalty)) {
|
||||
$question->penalty = 0 + $question->penalty;
|
||||
}
|
||||
|
||||
// Set any options.
|
||||
$extra_question_fields = $QTYPES[$question->qtype]->extra_question_fields();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue