~ubuntu-branches/ubuntu/jaunty/moodle/jaunty

« back to all changes in this revision

Viewing changes to mod/journal/mod_form.php

  • Committer: Bazaar Package Importer
  • Author(s): Jordan Mantha, Matt Oquist
  • Date: 2009-02-25 15:16:22 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20090225151622-0ekt1liwhv2obfza
Tags: 1.9.4.dfsg-0ubuntu1
* Merge with Debian git (Closes LP: #322961, #239481, #334611):
  - use Ubuntu's smarty lib directory for linking
  - use internal yui library 
  - add update-notifier support back in

[Matt Oquist]
  * renamed prerm script
  * significantly rewrote postinst and other maintainer scripts to improve
    user experience and package maintainability
    (Closes LP: #225662, #325450, #327843, #303078, #234609)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
class mod_journal_mod_form extends moodleform_mod {
5
5
 
6
 
        function definition() {
 
6
    function definition() {
7
7
 
8
 
                global $COURSE;
9
 
                $mform    =& $this->_form;
 
8
        global $CFG, $COURSE;
 
9
        $mform    =& $this->_form;
10
10
 
11
11
//-------------------------------------------------------------------------------
12
12
        $mform->addElement('header', 'general', get_string('general', 'form'));
13
13
 
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);
 
17
        } else {
 
18
            $mform->setType('name', PARAM_CLEAN);
 
19
        }
 
20
        $mform->addRule('name', null, 'required', null, 'client');
17
21
 
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');
22
26
 
23
 
        $mform->addElement('format', 'format', get_string('format'));
 
27
        $mform->addElement('format', 'introformat', get_string('format'));
24
28
 
25
29
        $mform->addElement('modgrade', 'assessed', get_string('grade'), false);
26
30
        $mform->setDefault('assessed', 0);
43
47
        }
44
48
 
45
49
//-------------------------------------------------------------------------------
46
 
                $this->standard_coursemodule_elements();
 
50
        $this->standard_coursemodule_elements();
47
51
//-------------------------------------------------------------------------------
48
 
        // buttons
 
52
// buttons
49
53
        $this->add_action_buttons();
50
54
 
51
 
        }
 
55
    }
52
56
 
53
57
 
54
58
 
55
59
}
56
 
?>
 
 
b'\\ No newline at end of file'
 
60
?>