mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
b54a05475a
AMOS BEGIN HLP summaries.html,[summary_help,core] AMOS END
38 lines
1.2 KiB
PHP
38 lines
1.2 KiB
PHP
<?php
|
|
|
|
if (!defined('MOODLE_INTERNAL')) {
|
|
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
|
|
}
|
|
|
|
require_once($CFG->libdir.'/formslib.php');
|
|
|
|
class editsection_form extends moodleform {
|
|
|
|
function definition() {
|
|
global $CFG, $DB;
|
|
|
|
$mform = $this->_form;
|
|
$course = $this->_customdata['course'];
|
|
|
|
$mform->addElement('checkbox', 'usedefaultname', get_string('sectionusedefaultname'));
|
|
$mform->setDefault('usedefaultname', true);
|
|
|
|
$mform->addElement('text', 'name', get_string('sectionname'), array('size'=>'30'));
|
|
$mform->setType('name', PARAM_TEXT);
|
|
$mform->disabledIf('name','usedefaultname','checked');
|
|
|
|
/// Prepare course and the editor
|
|
|
|
$mform->addElement('editor', 'summary_editor', get_string('summary'), null, $this->_customdata['editoroptions']);
|
|
$mform->addHelpButton('summary_editor', 'summary');
|
|
$mform->setType('summary_editor', PARAM_RAW);
|
|
|
|
$mform->addElement('hidden', 'id');
|
|
$mform->setType('id', PARAM_INT);
|
|
|
|
//--------------------------------------------------------------------------------
|
|
$this->add_action_buttons();
|
|
|
|
}
|
|
}
|