Permalink
Browse files

MDL-31682 - fix for online text assignments

  • Loading branch information...
danpoltawski committed Jan 17, 2013
1 parent 8df0765 commit 9f780282faf722d0bc33a9e28bb63957c11485bb
Showing with 3 additions and 3 deletions.
  1. +2 −2 mod/assign/externallib.php
  2. +1 −1 mod/assign/tests/externallib_test.php
@@ -643,8 +643,8 @@ private static function get_submissions_structure() {
array(
'name' => new external_value(PARAM_TEXT, 'field name'),
'description' => new external_value(PARAM_TEXT, 'field description'),
- 'text' => new external_value (PARAM_TEXT, 'field value'),
- 'format' => new external_value (PARAM_INT, 'field format')
+ 'text' => new external_value (PARAM_RAW, 'field value'),
+ 'format' => new external_format_value ('text')
)
)
, 'editorfields', VALUE_OPTIONAL
@@ -229,7 +229,7 @@ public function test_get_submissions () {
$submission->id = $sid;
$onlinetextsubmission = new stdClass();
- $onlinetextsubmission->onlinetext = "online test text";
+ $onlinetextsubmission->onlinetext = "<p>online test text</p>";
$onlinetextsubmission->onlineformat = 1;
$onlinetextsubmission->submission = $submission->id;
$onlinetextsubmission->assignment = $assign1->id;

0 comments on commit 9f78028

Please sign in to comment.