~ubuntu-branches/ubuntu/trusty/moodle/trusty

« back to all changes in this revision

Viewing changes to question/type/essay/tests/helper.php

  • Committer: Package Import Robot
  • Author(s): Thijs Kinkhorst
  • Date: 2014-01-21 13:40:52 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20140121134052-ym2qvsp2cd9vq0p6
Tags: 2.5.4-1
* New upstream release, fixing security issues:
  - MSA-14-0001 Config passwords visibility issue [CVE-2014-0008]
  - MSA-14-0002 Group constraints lacking in "login as" [CVE-2014-0009]
  - MSA-14-0003 CSRF vulnerability in profile fields [CVE-2014-0010]
* Move /var/lib/moodle directory into package.
* Revert back to bundled yui3. Unfortunately, version in Debian and
  of upstream are not compatible (closes: #735312).

Show diffs side-by-side

added added

removed removed

Lines of Context:
112
112
    }
113
113
 
114
114
    /**
 
115
     * Make the data what would be received from the editing form for an essay
 
116
     * question using the HTML editor allowing embedded files as input, and up
 
117
     * to three attachments.
 
118
     *
 
119
     * @return stdClass the data that would be returned by $form->get_gata();
 
120
     */
 
121
    public function get_essay_question_form_data_plain() {
 
122
        $fromform = new stdClass();
 
123
 
 
124
        $fromform->name = 'Essay question with filepicker and attachments';
 
125
        $fromform->questiontext = array('text' => 'Please write a story about a frog.', 'format' => FORMAT_HTML);
 
126
        $fromform->defaultmark = 1.0;
 
127
        $fromform->generalfeedback = array('text' => 'I hope your story had a beginning, a middle and an end.', 'format' => FORMAT_HTML);
 
128
        $fromform->responseformat = 'plain';
 
129
        $fromform->responsefieldlines = 10;
 
130
        $fromform->attachments = 0;
 
131
        $fromform->graderinfo = array('text' => '', 'format' => FORMAT_HTML);
 
132
        $fromform->responsetemplate = array('text' => '', 'format' => FORMAT_HTML);
 
133
 
 
134
        return $fromform;
 
135
    }
 
136
 
 
137
    /**
115
138
     * Makes an essay question using monospaced input.
116
139
     * @return qtype_essay_question
117
140
     */