4
4
class mod_journal_mod_form extends moodleform_mod {
6
function definition() {
6
function definition() {
9
$mform =& $this->_form;
9
$mform =& $this->_form;
11
11
//-------------------------------------------------------------------------------
12
12
$mform->addElement('header', 'general', get_string('general', 'form'));
14
14
$mform->addElement('text', 'name', get_string('journalname', 'journal'), array('size'=>'64'));
15
$mform->setType('name', PARAM_TEXT);
16
$mform->addRule('name', null, 'required', null, 'client');
15
if (!empty($CFG->formatstringstriptags)) {
16
$mform->setType('name', PARAM_TEXT);
18
$mform->setType('name', PARAM_CLEAN);
20
$mform->addRule('name', null, 'required', null, 'client');
18
$mform->addElement('htmleditor', 'intro', get_string('journalquestion', 'journal'));
19
$mform->setType('intro', PARAM_RAW);
20
$mform->addRule('intro', get_string('required'), 'required', null, 'client');
22
$mform->addElement('htmleditor', 'intro', get_string('journalquestion', 'journal'));
23
$mform->setType('intro', PARAM_RAW);
24
$mform->addRule('intro', get_string('required'), 'required', null, 'client');
21
25
$mform->setHelpButton('intro', array('writing', 'questions', 'richtext'), false, 'editorhelpbutton');
23
$mform->addElement('format', 'format', get_string('format'));
27
$mform->addElement('format', 'introformat', get_string('format'));
25
29
$mform->addElement('modgrade', 'assessed', get_string('grade'), false);
26
30
$mform->setDefault('assessed', 0);
45
49
//-------------------------------------------------------------------------------
46
$this->standard_coursemodule_elements();
50
$this->standard_coursemodule_elements();
47
51
//-------------------------------------------------------------------------------
49
53
$this->add_action_buttons();
b'\\ No newline at end of file'