MDL-57273 exporter: Clarify why contextname needs to be PARAM_RAW

This commit is contained in:
Frederic Massart 2016-12-20 11:24:43 +08:00 committed by Damyon Wiese
parent 547801a411
commit c59e531301
2 changed files with 5 additions and 1 deletions

View File

@ -61,7 +61,8 @@ class cohort_summary_exporter extends \core\external\exporter {
public static function define_other_properties() {
return array(
'contextname' => array(
'type' => PARAM_TEXT
// The method context::get_context_name() already formats the string, and may return HTML.
'type' => PARAM_RAW
),
);
}

View File

@ -74,6 +74,9 @@ class competency_framework_exporter extends \core\external\persistent_exporter {
'competenciescount' => array(
'type' => PARAM_INT
),
// Both contexts need to be PARAM_RAW because the method context::get_context_name()
// already applies the formatting and thus could return HTML content.
'contextname' => array(
'type' => PARAM_RAW
),