diff --git a/cohort/edit_form.php b/cohort/edit_form.php index fe3f35754f0..249212c7ae1 100644 --- a/cohort/edit_form.php +++ b/cohort/edit_form.php @@ -49,7 +49,7 @@ class cohort_edit_form extends moodleform { $mform->addElement('select', 'contextid', get_string('context', 'role'), $options); $mform->addElement('text', 'idnumber', get_string('idnumber', 'cohort'), 'maxlength="254" size="50"'); - $mform->setType('name', PARAM_RAW); + $mform->setType('name', PARAM_RAW); // idnumbers are plain text, must not be changed $mform->addElement('editor', 'description_editor', get_string('description', 'cohort'), null, $editoroptions); $mform->setType('description_editor', PARAM_RAW); diff --git a/cohort/index.php b/cohort/index.php index ba656e0ce72..fd8c9cbefe8 100644 --- a/cohort/index.php +++ b/cohort/index.php @@ -75,7 +75,7 @@ $data = array(); foreach($cohorts as $cohort) { $line = array(); $line[] = format_string($cohort->name); - $line[] = $cohort->idnumber; + $line[] = s($cohort->idnumber); // plain text $line[] = format_text($cohort->description, $cohort->descriptionformat); $line[] = $DB->count_records('cohort_members', array('cohortid'=>$cohort->id));