mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
Merge branch 'MDL-50228' of git://github.com/timhunt/moodle
This commit is contained in:
commit
1df669e7bf
@ -433,6 +433,8 @@ $string['incorrect'] = 'Incorrect';
|
||||
$string['indivresp'] = 'Responses of individuals to each item';
|
||||
$string['info'] = 'Info';
|
||||
$string['infoshort'] = 'i';
|
||||
$string['initialnumfeedbacks'] = 'Initial number of overall feedback fields';
|
||||
$string['initialnumfeedbacks_desc'] = 'When creating a new quiz, provide this many blank overall feedback boxes. Once the quiz has been created, the form shows the number of fields required for the number of feedbacks in the quiz. The setting must be at least 1.';
|
||||
$string['inprogress'] = 'In progress';
|
||||
$string['introduction'] = 'Description';
|
||||
$string['invalidattemptid'] = 'No such attempt ID exists';
|
||||
|
@ -358,10 +358,12 @@ class mod_quiz_mod_form extends moodleform_mod {
|
||||
if (!empty($this->_instance)) {
|
||||
$this->_feedbacks = $DB->get_records('quiz_feedback',
|
||||
array('quizid' => $this->_instance), 'mingrade DESC');
|
||||
$numfeedbacks = count($this->_feedbacks);
|
||||
} else {
|
||||
$this->_feedbacks = array();
|
||||
$numfeedbacks = $quizconfig->initialnumfeedbacks;
|
||||
}
|
||||
$numfeedbacks = max(count($this->_feedbacks) * 1.5, 5);
|
||||
$numfeedbacks = max($numfeedbacks, 1);
|
||||
|
||||
$nextel = $this->repeat_elements($repeatarray, $numfeedbacks - 1,
|
||||
$repeatedoptions, 'boundary_repeats', 'boundary_add_fields', 3,
|
||||
|
@ -203,6 +203,10 @@ if ($ADMIN->fulltree) {
|
||||
get_string('showinsecurepopup', 'quiz'), get_string('configpopup', 'quiz'),
|
||||
array('value' => '-', 'adv' => true), null));
|
||||
|
||||
$quizsettings->add(new admin_setting_configtext('quiz/initialnumfeedbacks',
|
||||
get_string('initialnumfeedbacks', 'quiz'), get_string('initialnumfeedbacks_desc', 'quiz'),
|
||||
2, PARAM_INT, 5));
|
||||
|
||||
// Allow user to specify if setting outcomes is an advanced setting.
|
||||
if (!empty($CFG->enableoutcomes)) {
|
||||
$quizsettings->add(new admin_setting_configcheckbox('quiz/outcomes_adv',
|
||||
|
Loading…
x
Reference in New Issue
Block a user