course-section MDL-22262 Added a summaryformat field to the database and implemented it when editing/viewing sections and backup

This commit is contained in:
Sam Hemelryk
2010-05-27 03:07:54 +00:00
parent 277d7732c2
commit e34a326f72
10 changed files with 40 additions and 25 deletions
+4 -2
View File
@@ -12,7 +12,7 @@ class editsection_form extends moodleform {
global $CFG, $DB;
$mform = $this->_form;
$course = $this->_customdata;
$course = $this->_customdata['course'];
$mform->addElement('checkbox', 'usedefaultname', get_string('sectionusedefaultname'));
$mform->setDefault('usedefaultname', true);
@@ -21,7 +21,9 @@ class editsection_form extends moodleform {
$mform->setType('name', PARAM_TEXT);
$mform->disabledIf('name','usedefaultname','checked');
$mform->addElement('editor', 'summary', get_string('summary'), null, array('changeformat'=>false, 'maxfiles'=>-1));
/// Prepare course and the editor
$mform->addElement('editor', 'summary', get_string('summary'), null, $this->_customdata['editoroptions']);
$mform->addElement('hidden', 'id');
$mform->setType('id', PARAM_INT);