// add tinymce configuration options here
$ADMIN->add('htmleditor', $temp);
+ // "htmlsettings" settingpage
+ $temp = new admin_settingpage('htmlsettings', get_string('htmlsettings', 'admin'));
+ $temp->add(new admin_setting_configcheckbox('formatstringstriptags', get_string('stripalltitletags', 'admin'), get_string('configstripalltitletags', 'admin'), 1));
+ $ADMIN->add('appearance', $temp);
+
// "documentation" settingpage
$temp = new admin_settingpage('documentation', get_string('moodledocs'));
$temp->add(new admin_setting_configtext('docroot', get_string('docroot', 'admin'), get_string('configdocroot', 'admin'), 'http://docs.moodle.org', PARAM_URL));
$string['configstatsmaxruntime2'] = 'Stats processing can be quite intensive, specify maximum time allowed for gathering of one day of statistics. Maximum number of days processed in one cron execution is 3.';
$string['configstatsruntimestart'] = 'What time should the cronjob that does the stats processing <b>start</b>? Please specify different times if there are multiple Moodles on one physical server.';
$string['configstatsuserthreshold'] = 'If you enter a non-zero, non numeric value here, for ranking courses, courses with less than this number of enrolled users (all roles) will be ignored';
+$string['configstripalltitletags'] = 'By default all HTML tags are removed from all titles of activities, posts, blogs, etc. Uncheck this if you want to allow html tags in activity names.';
$string['configsupportemail'] = 'This email address will be published to users of this site as the one to email when they need general help (for example, when new users create their own accounts). If this email is left blank then no such helpful email address is supplied.';
$string['configsupportname'] = 'This is the name of a person or other entity offering general help via the support email or web address.';
$string['configsupportpage'] = 'This web address will be published to users of this site as the one to go to when they need general help (for example, when new users create their own accounts). If this address is left blank then no link will be supplied.';
$string['hidefromstudents'] = 'Hide from students';
$string['htmleditor'] = 'HTML editor';
$string['htmleditorsettings'] = 'HTML editor settings';
+$string['htmlsettings'] = 'HTML settings';
$string['http'] = 'HTTP';
$string['httpsecurity'] = 'HTTP security';
$string['iconvrecommended'] = 'Installing the optional ICONV library is highly recommended in order to improve site performance, particularly if your site is supporting non-Latin languages.';
$string['stickyblocksduplicatenotice'] = 'If any block you add here is already present in a particular page, it will result in a duplicate.<br />Only the pinned block will be non-editable, the duplicate will still be editable.';
$string['stickyblocksmymoodle'] = 'My Moodle';
$string['stickyblockspagetype'] = 'Page type to configure';
+$string['stripalltitletags'] = 'Remove HTML tags from all titles';
$string['supportemail'] = 'Support email';
$string['supportname'] = 'Support name';
$string['supportpage'] = 'Support page';
// $mform->addElement('static', 'statictype', get_string('assignmenttype', 'assignment'), get_string('type'.$type,'assignment'));
$mform->addElement('text', 'name', get_string('assignmentname', 'assignment'), array('size'=>'64'));
- $mform->setType('name', PARAM_TEXT);
+ if (!empty($CFG->formatstringstriptags)) {
+ $mform->setType('name', PARAM_TEXT);
+ } else {
+ $mform->setType('name', PARAM_CLEAN);
+ }
$mform->addRule('name', null, 'required', null, 'client');
$mform->addElement('htmleditor', 'description', get_string('description', 'assignment'));
$mform->addElement('header', 'general', get_string('general', 'form'));
$mform->addElement('text', 'name', get_string('chatname', 'chat'), array('size'=>'64'));
- $mform->setType('name', PARAM_TEXT);
+ if (!empty($CFG->formatstringstriptags)) {
+ $mform->setType('name', PARAM_TEXT);
+ } else {
+ $mform->setType('name', PARAM_CLEAN);
+ }
$mform->addRule('name', null, 'required', null, 'client');
$mform->addElement('htmleditor', 'intro', get_string('chatintro', 'chat'));
class mod_choice_mod_form extends moodleform_mod {
function definition() {
- global $CHOICE_SHOWRESULTS, $CHOICE_PUBLISH, $CHOICE_DISPLAY, $DB;
+ global $CFG, $CHOICE_SHOWRESULTS, $CHOICE_PUBLISH, $CHOICE_DISPLAY, $DB;
$mform =& $this->_form;
$mform->addElement('header', 'general', get_string('general', 'form'));
$mform->addElement('text', 'name', get_string('choicename', 'choice'), array('size'=>'64'));
- $mform->setType('name', PARAM_TEXT);
+ if (!empty($CFG->formatstringstriptags)) {
+ $mform->setType('name', PARAM_TEXT);
+ } else {
+ $mform->setType('name', PARAM_CLEAN);
+ }
$mform->addRule('name', null, 'required', null, 'client');
$mform->addElement('htmleditor', 'text', get_string('choicetext', 'choice'));
$mform->addElement('header', 'general', get_string('general', 'form'));
$mform->addElement('text', 'name', get_string('name'), array('size'=>'64'));
- $mform->setType('name', PARAM_TEXT);
+ if (!empty($CFG->formatstringstriptags)) {
+ $mform->setType('name', PARAM_TEXT);
+ } else {
+ $mform->setType('name', PARAM_CLEAN);
+ }
$mform->addRule('name', null, 'required', null, 'client');
$mform->addElement('htmleditor', 'intro', get_string('intro', 'data'));
$mform->addElement('header', 'general', get_string('general', 'form'));
$mform->addElement('text', 'name', get_string('forumname', 'forum'), array('size'=>'64'));
- $mform->setType('name', PARAM_TEXT);
+ if (!empty($CFG->formatstringstriptags)) {
+ $mform->setType('name', PARAM_TEXT);
+ } else {
+ $mform->setType('name', PARAM_CLEAN);
+ }
$mform->addRule('name', null, 'required', null, 'client');
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
$mform->addElement('header', 'general', get_string('general', 'form'));
$mform->addElement('text', 'name', get_string('name'), array('size'=>'64'));
- $mform->setType('name', PARAM_TEXT);
+ if (!empty($CFG->formatstringstriptags)) {
+ $mform->setType('name', PARAM_TEXT);
+ } else {
+ $mform->setType('name', PARAM_CLEAN);
+ }
$mform->addRule('name', null, 'required', null, 'client');
$mform->addElement('htmleditor', 'intro', get_string('description'));
$mform->addElement('text', 'name', get_string('name'), array('size' => '40'));
}
$mform->setType('namesource', PARAM_INT);
- $mform->setType('name', PARAM_TEXT);
+ if (!empty($CFG->formatstringstriptags)) {
+ $mform->setType('name', PARAM_TEXT);
+ } else {
+ $mform->setType('name', PARAM_CLEAN);
+ }
// Location
$sitecontext = get_context_instance(CONTEXT_SYSTEM);
class mod_lesson_mod_form extends moodleform_mod {
function definition() {
- global $LESSON_NEXTPAGE_ACTION, $COURSE, $DB;
+ global $CFG, $LESSON_NEXTPAGE_ACTION, $COURSE, $DB;
$mform =& $this->_form;
$mform->addElement('header', 'general', get_string('general', 'form'));
$mform->addElement('text', 'name', get_string('name'), array('size'=>'64'));
- $mform->setType('name', PARAM_TEXT);
+ if (!empty($CFG->formatstringstriptags)) {
+ $mform->setType('name', PARAM_TEXT);
+ } else {
+ $mform->setType('name', PARAM_CLEAN);
+ }
$mform->addRule('name', null, 'required', null, 'client');
// Create a text box that can be enabled/disabled for lesson time limit
$mform->addElement('header', 'general', get_string('general', 'form'));
$mform->addElement('text', 'name', get_string('name'), array('size'=>'64'));
- $mform->setType('name', PARAM_TEXT);
+ if (!empty($CFG->formatstringstriptags)) {
+ $mform->setType('name', PARAM_TEXT);
+ } else {
+ $mform->setType('name', PARAM_CLEAN);
+ }
$mform->addRule('name', null, 'required', null, 'client');
$mform->addElement('htmleditor', 'intro', get_string("introduction", "quiz"));
// $mform->addElement('static', 'statictype', get_string('assignmenttype', 'assignment'), get_string('type'.$type,'assignment'));
$mform->addElement('text', 'name', get_string('name'), array('size'=>'48'));
- $mform->setType('name', PARAM_TEXT);
+ if (!empty($CFG->formatstringstriptags)) {
+ $mform->setType('name', PARAM_TEXT);
+ } else {
+ $mform->setType('name', PARAM_CLEAN);
+ }
$mform->addRule('name', null, 'required', null, 'client');
$mform->addElement('htmleditor', 'summary', get_string('summary'));
// Name
$mform->addElement('text', 'name', get_string('name'));
- $mform->setType('name', PARAM_TEXT);
+ if (!empty($CFG->formatstringstriptags)) {
+ $mform->setType('name', PARAM_TEXT);
+ } else {
+ $mform->setType('name', PARAM_CLEAN);
+ }
$mform->addRule('name', null, 'required', null, 'client');
// Summary
$mform->addElement('header', 'general', get_string('general', 'form'));
$mform->addElement('text', 'name', get_string('name'), array('size'=>'64'));
- $mform->setType('name', PARAM_TEXT);
+ if (!empty($CFG->formatstringstriptags)) {
+ $mform->setType('name', PARAM_TEXT);
+ } else {
+ $mform->setType('name', PARAM_CLEAN);
+ }
$mform->addRule('name', null, 'required', null, 'client');
if (!$options = $DB->get_records_menu("survey", array("template"=>0), "name", "id, name")) {
// This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php)
- $version = 2008072500; // YYYYMMDD = date of the last version bump
+ $version = 2008072600; // YYYYMMDD = date of the last version bump
// XX = daily increments
$release = '2.0 dev (Build: 20080726)'; // Human-friendly version name