MDL-23184 activity names are now either PARAM_TEXT or PARAM_CLEANHTML, this should be more accurate

This commit is contained in:
Petr Skoda
2010-09-02 18:29:39 +00:00
parent 93de0ac293
commit b8ea3041eb
16 changed files with 17 additions and 17 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ class mod_assignment_mod_form extends moodleform_mod {
if (!empty($CFG->formatstringstriptags)) {
$mform->setType('name', PARAM_TEXT);
} else {
$mform->setType('name', PARAM_CLEAN);
$mform->setType('name', PARAM_CLEANHTML);
}
$mform->addRule('name', null, 'required', null, 'client');
+1 -1
View File
@@ -17,7 +17,7 @@ class mod_chat_mod_form extends moodleform_mod {
if (!empty($CFG->formatstringstriptags)) {
$mform->setType('name', PARAM_TEXT);
} else {
$mform->setType('name', PARAM_CLEAN);
$mform->setType('name', PARAM_CLEANHTML);
}
$mform->addRule('name', null, 'required', null, 'client');
+1 -1
View File
@@ -19,7 +19,7 @@ class mod_choice_mod_form extends moodleform_mod {
if (!empty($CFG->formatstringstriptags)) {
$mform->setType('name', PARAM_TEXT);
} else {
$mform->setType('name', PARAM_CLEAN);
$mform->setType('name', PARAM_CLEANHTML);
}
$mform->addRule('name', null, 'required', null, 'client');
+1 -1
View File
@@ -19,7 +19,7 @@ class mod_data_mod_form extends moodleform_mod {
if (!empty($CFG->formatstringstriptags)) {
$mform->setType('name', PARAM_TEXT);
} else {
$mform->setType('name', PARAM_CLEAN);
$mform->setType('name', PARAM_CLEANHTML);
}
$mform->addRule('name', null, 'required', null, 'client');
+1 -1
View File
@@ -41,7 +41,7 @@ class mod_folder_mod_form extends moodleform_mod {
if (!empty($CFG->formatstringstriptags)) {
$mform->setType('name', PARAM_TEXT);
} else {
$mform->setType('name', PARAM_CLEAN);
$mform->setType('name', PARAM_CLEANHTML);
}
$mform->addRule('name', null, 'required', null, 'client');
$this->add_intro_editor($config->requiremodintro);
+1 -1
View File
@@ -41,7 +41,7 @@ class mod_forum_mod_form extends moodleform_mod {
if (!empty($CFG->formatstringstriptags)) {
$mform->setType('name', PARAM_TEXT);
} else {
$mform->setType('name', PARAM_CLEAN);
$mform->setType('name', PARAM_CLEANHTML);
}
$mform->addRule('name', null, 'required', null, 'client');
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
+2 -2
View File
@@ -19,7 +19,7 @@ class mod_glossary_mod_form extends moodleform_mod {
if (!empty($CFG->formatstringstriptags)) {
$mform->setType('name', PARAM_TEXT);
} else {
$mform->setType('name', PARAM_CLEAN);
$mform->setType('name', PARAM_CLEANHTML);
}
$mform->addRule('name', null, 'required', null, 'client');
@@ -127,7 +127,7 @@ class mod_glossary_mod_form extends moodleform_mod {
//-------------------------------------------------------------------------------
$this->standard_grading_coursemodule_elements();
$this->standard_coursemodule_elements();
//-------------------------------------------------------------------------------
+1 -1
View File
@@ -42,7 +42,7 @@ class mod_imscp_mod_form extends moodleform_mod {
if (!empty($CFG->formatstringstriptags)) {
$mform->setType('name', PARAM_TEXT);
} else {
$mform->setType('name', PARAM_CLEAN);
$mform->setType('name', PARAM_CLEANHTML);
}
$mform->addRule('name', null, 'required', null, 'client');
$this->add_intro_editor($config->requiremodintro);
+1 -1
View File
@@ -86,7 +86,7 @@ class mod_lesson_mod_form extends moodleform_mod {
if (!empty($CFG->formatstringstriptags)) {
$mform->setType('name', PARAM_TEXT);
} else {
$mform->setType('name', PARAM_CLEAN);
$mform->setType('name', PARAM_CLEANHTML);
}
$mform->addRule('name', null, 'required', null, 'client');
+1 -1
View File
@@ -44,7 +44,7 @@ class mod_page_mod_form extends moodleform_mod {
if (!empty($CFG->formatstringstriptags)) {
$mform->setType('name', PARAM_TEXT);
} else {
$mform->setType('name', PARAM_CLEAN);
$mform->setType('name', PARAM_CLEANHTML);
}
$mform->addRule('name', null, 'required', null, 'client');
$this->add_intro_editor($config->requiremodintro);
+1 -1
View File
@@ -53,7 +53,7 @@ class mod_quiz_mod_form extends moodleform_mod {
if (!empty($CFG->formatstringstriptags)) {
$mform->setType('name', PARAM_TEXT);
} else {
$mform->setType('name', PARAM_CLEAN);
$mform->setType('name', PARAM_CLEANHTML);
}
$mform->addRule('name', null, 'required', null, 'client');
+1 -1
View File
@@ -52,7 +52,7 @@ class mod_resource_mod_form extends moodleform_mod {
if (!empty($CFG->formatstringstriptags)) {
$mform->setType('name', PARAM_TEXT);
} else {
$mform->setType('name', PARAM_CLEAN);
$mform->setType('name', PARAM_CLEANHTML);
}
$mform->addRule('name', null, 'required', null, 'client');
$this->add_intro_editor($config->requiremodintro);
+1 -1
View File
@@ -29,7 +29,7 @@ class mod_scorm_mod_form extends moodleform_mod {
if (!empty($CFG->formatstringstriptags)) {
$mform->setType('name', PARAM_TEXT);
} else {
$mform->setType('name', PARAM_CLEAN);
$mform->setType('name', PARAM_CLEANHTML);
}
$mform->addRule('name', null, 'required', null, 'client');
+1 -1
View File
@@ -21,7 +21,7 @@ class mod_survey_mod_form extends moodleform_mod {
if (!empty($CFG->formatstringstriptags)) {
$mform->setType('name', PARAM_TEXT);
} else {
$mform->setType('name', PARAM_CLEAN);
$mform->setType('name', PARAM_CLEANHTML);
}
$mform->addRule('name', null, 'required', null, 'client');
+1 -1
View File
@@ -42,7 +42,7 @@ class mod_url_mod_form extends moodleform_mod {
if (!empty($CFG->formatstringstriptags)) {
$mform->setType('name', PARAM_TEXT);
} else {
$mform->setType('name', PARAM_CLEAN);
$mform->setType('name', PARAM_CLEANHTML);
}
$mform->addRule('name', null, 'required', null, 'client');
$this->add_intro_editor($config->requiremodintro);
+1 -1
View File
@@ -55,7 +55,7 @@ class mod_workshop_mod_form extends moodleform_mod {
if (!empty($CFG->formatstringstriptags)) {
$mform->setType('name', PARAM_TEXT);
} else {
$mform->setType('name', PARAM_CLEAN);
$mform->setType('name', PARAM_CLEANHTML);
}
$mform->addRule('name', null, 'required', null, 'client');
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');