Permalink
Browse files

MDL-45127 mod_lesson: Updated question edit screen with more help text.

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...
1 parent a76fb41 commit 745f876b3e139f4f0fb7ebf6e2ef11679b9d479f @abgreeve abgreeve committed Apr 23, 2014
Showing with 7 additions and 0 deletions.
  1. +1 −0 mod/lesson/lang/en/lesson.php
  2. +6 −0 mod/lesson/locallib.php
@@ -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';
@@ -771,6 +771,12 @@ public function custom_definition() {}
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);
+ }
}
/**

0 comments on commit 745f876

Please sign in to comment.