Skip to content

Commit

Permalink
MDL-45127 mod_lesson: Updated question edit screen with more help text.
Browse files Browse the repository at this point in the history
Unless the custom scores is selected in the lesson settings the score section
in the question settings will be disabled. A help link has been added with
a description similar to this one.
  • Loading branch information
abgreeve committed May 2, 2014
1 parent a76fb41 commit 745f876
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions mod/lesson/lang/en/lesson.php
Expand Up @@ -380,6 +380,7 @@
$string['savechangesandeol'] = 'Save all changes and go to the end of the lesson.';
$string['savepage'] = 'Save page';
$string['score'] = 'Score';
$string['score_help'] = 'Score is only used when custom scoring is enabled. Each answer can then be given a numerical point value (positive or negative).';
$string['scores'] = 'Scores';
$string['secondpluswrong'] = 'Not quite. Would you like to try again?';
$string['selectaqtype'] = 'Select a question type';
Expand Down
6 changes: 6 additions & 0 deletions mod/lesson/locallib.php
Expand Up @@ -771,6 +771,12 @@ protected final function add_score($name, $label=null, $value=null) {
if ($value !== null) {
$this->_form->setDefault($name, $value);
}
$this->_form->addHelpButton($name, 'score', 'lesson');

// Score is only used for custom scoring. Disable the element when not in use to stop some confusion.
if (!$this->_customdata['lesson']->custom) {
$this->_form->freeze($name);
}
}

/**
Expand Down

0 comments on commit 745f876

Please sign in to comment.