Merge branch 'MDL-31726' of git://github.com/colchambers/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2013-01-15 21:44:38 +01:00
commit 563bcc2322
2 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,4 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@ -322,6 +321,7 @@ $string['complete'] = 'Complete';
$string['contexterror'] = 'You shouldn\'t have got here if you\'re not moving a category to another context.';
$string['correct'] = 'Correct';
$string['correctfeedback'] = 'For any correct response';
$string['correctfeedbackdefault'] = 'Your answer is correct.';
$string['decimalplacesingrades'] = 'Decimal places in grades';
$string['defaultmark'] = 'Default mark';
$string['errorsavingflags'] = 'Error saving the flag state.';
@ -347,6 +347,7 @@ $string['importfromupload'] = 'Select a file to upload ...';
$string['includesubcategories'] = 'Also show questions from sub-categories';
$string['incorrect'] = 'Incorrect';
$string['incorrectfeedback'] = 'For any incorrect response';
$string['incorrectfeedbackdefault'] = 'Your answer is incorrect.';
$string['information'] = 'Information';
$string['invalidanswer'] = 'Incomplete answer';
$string['makecopy'] = 'Make copy';
@ -368,6 +369,7 @@ $string['options'] = 'Options';
$string['parent'] = 'Parent';
$string['partiallycorrect'] = 'Partially correct';
$string['partiallycorrectfeedback'] = 'For any partially correct response';
$string['partiallycorrectfeedbackdefault'] = 'Your answer is partially correct.';
$string['penaltyforeachincorrecttry'] = 'Penalty for each incorrect try';
$string['penaltyforeachincorrecttry_help'] = 'When you run your questions using the \'Interactive with multiple tries\' or \'Adaptive mode\' behaviour, so that the the student will have several tries to get the question right, then this option controls how much they are penalised for each incorrect try.

View File

@ -355,9 +355,12 @@ abstract class question_edit_form extends question_wizard_form {
$fields = array('correctfeedback', 'partiallycorrectfeedback', 'incorrectfeedback');
foreach ($fields as $feedbackname) {
$mform->addElement('editor', $feedbackname, get_string($feedbackname, 'question'),
$element = $mform->addElement('editor', $feedbackname,
get_string($feedbackname, 'question'),
array('rows' => 5), $this->editoroptions);
$mform->setType($feedbackname, PARAM_RAW);
// Using setValue() as setDefault() does not work for the editor class.
$element->setValue(array('text'=>get_string($feedbackname.'default', 'question')));
if ($withshownumpartscorrect && $feedbackname == 'partiallycorrectfeedback') {
$mform->addElement('advcheckbox', 'shownumcorrect',