mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merge branch 'MDL-26567' of git://github.com/timhunt/moodle
This commit is contained in:
commit
0e89333992
@ -655,8 +655,10 @@ abstract class moodleform_mod extends moodleform {
|
||||
}
|
||||
|
||||
if ($this->_features->gradecat) {
|
||||
$categories = grade_get_categories_menu($COURSE->id, $this->_outcomesused);
|
||||
$mform->addElement('select', 'gradecat', get_string('gradecategory', 'grades'), $categories);
|
||||
$mform->addElement('select', 'gradecat',
|
||||
get_string('gradecategoryonmodform', 'grades'),
|
||||
grade_get_categories_menu($COURSE->id, $this->_outcomesused));
|
||||
$mform->addHelpButton('gradecat', 'gradecategoryonmodform', 'grades');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -219,7 +219,8 @@ $string['gradeboundary'] = 'Letter grade boundary';
|
||||
$string['gradeboundary_help'] = 'This setting determines the minimum percentage over which grades will be assigned the grade letter.';
|
||||
$string['gradecategories'] = 'Grade categories';
|
||||
$string['gradecategory'] = 'Grade category';
|
||||
$string['gradecategoryhelp'] = 'Grade category help';
|
||||
$string['gradecategoryonmodform'] = 'Grade category';
|
||||
$string['gradecategoryonmodform_help'] = 'This setting controls the category in which this activity\'s grades are placed in the gradebook.';
|
||||
$string['gradecategorysettings'] = 'Grade category settings';
|
||||
$string['gradedisplay'] = 'Grade display';
|
||||
$string['gradedisplaytype'] = 'Grade display type';
|
||||
|
@ -1492,7 +1492,7 @@ function quiz_supports($feature) {
|
||||
case FEATURE_MOD_INTRO: return true;
|
||||
case FEATURE_COMPLETION_TRACKS_VIEWS: return true;
|
||||
case FEATURE_GRADE_HAS_GRADE: return true;
|
||||
case FEATURE_GRADE_OUTCOMES: return true;
|
||||
case FEATURE_GRADE_OUTCOMES: return false;
|
||||
case FEATURE_BACKUP_MOODLE2: return true;
|
||||
case FEATURE_SHOW_DESCRIPTION: return true;
|
||||
|
||||
|
@ -106,6 +106,14 @@ class mod_quiz_mod_form extends moodleform_mod {
|
||||
$mform->setDefault('grademethod', $quizconfig->grademethod);
|
||||
$mform->disabledIf('grademethod', 'attempts', 'eq', 1);
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
// Grade settings
|
||||
$this->standard_grading_coursemodule_elements();
|
||||
|
||||
$mform->removeElement('grade');
|
||||
$mform->addElement('hidden', 'grade', $quizconfig->maximumgrade);
|
||||
$mform->setType('grade', PARAM_NUMBER);
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
$mform->addElement('header', 'layouthdr', get_string('layout', 'quiz'));
|
||||
|
||||
@ -289,9 +297,6 @@ class mod_quiz_mod_form extends moodleform_mod {
|
||||
$mform->addElement('header', 'overallfeedbackhdr', get_string('overallfeedback', 'quiz'));
|
||||
$mform->addHelpButton('overallfeedbackhdr', 'overallfeedback', 'quiz');
|
||||
|
||||
$mform->addElement('hidden', 'grade', $quizconfig->maximumgrade);
|
||||
$mform->setType('grade', PARAM_RAW);
|
||||
|
||||
if (isset($this->current->grade)) {
|
||||
$needwarning = $this->current->grade === 0;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user