Merge branch 'MDL-39155' of https://github.com/jacks92/moodle
authorDan Poltawski <dan@moodle.com>
Tue, 11 Jun 2013 07:38:37 +0000 (15:38 +0800)
committerDan Poltawski <dan@moodle.com>
Tue, 11 Jun 2013 07:38:37 +0000 (15:38 +0800)
1  2 
mod/quiz/mod_form.php

diff --combined mod/quiz/mod_form.php
@@@ -69,7 -69,6 +69,7 @@@ class mod_quiz_mod_form extends moodlef
              $mform->setType('name', PARAM_CLEANHTML);
          }
          $mform->addRule('name', null, 'required', null, 'client');
 +        $mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
  
          // Introduction.
          $this->add_intro_editor(false, get_string('introduction', 'quiz'));
          $mform->addElement('header', 'display', get_string('display', 'form'));
  
          // Show user picture.
-         $mform->addElement('selectyesno', 'showuserpicture',
-                 get_string('showuserpicture', 'quiz'));
+         $mform->addElement('select', 'showuserpicture', get_string('showuserpicture', 'quiz'), array(
+                 QUIZ_SHOWIMAGE_NONE => get_string('shownoimage', 'quiz'),
+                 QUIZ_SHOWIMAGE_SMALL => get_string('showsmallimage', 'quiz'),
+                 QUIZ_SHOWIMAGE_LARGE => get_string('showlargeimage', 'quiz')));
          $mform->addHelpButton('showuserpicture', 'showuserpicture', 'quiz');
          $mform->setAdvanced('showuserpicture', $quizconfig->showuserpicture_adv);
          $mform->setDefault('showuserpicture', $quizconfig->showuserpicture);