MDL-31682 - fix for online text assignments

This commit is contained in:
Dan Poltawski 2013-01-17 15:48:29 +08:00
parent 8df0765ad1
commit 9f780282fa
2 changed files with 3 additions and 3 deletions

View File

@ -643,8 +643,8 @@ class mod_assign_external extends external_api {
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

View File

@ -229,7 +229,7 @@ class mod_assign_external_testcase extends externallib_advanced_testcase {
$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;