mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-73363 page: Remove printheading settings from page.
This commit is contained in:
parent
e63604fb6d
commit
95b674062f
@ -72,7 +72,7 @@ class moodle1_mod_page_handler extends moodle1_resource_successor_handler {
|
||||
$page['timemodified'] = $data['timemodified'];
|
||||
|
||||
// populate display and displayoptions fields
|
||||
$options = array('printheading' => 1, 'printintro' => 0);
|
||||
$options = array('printintro' => 0);
|
||||
if ($data['popup']) {
|
||||
$page['display'] = RESOURCELIB_DISPLAY_POPUP;
|
||||
$rawoptions = explode(',', $data['popup']);
|
||||
|
2
mod/page/lang/en/deprecated.txt
Normal file
2
mod/page/lang/en/deprecated.txt
Normal file
@ -0,0 +1,2 @@
|
||||
printheading,mod_page
|
||||
printheadingexplain,mod_page
|
@ -66,11 +66,13 @@ $string['popupheight'] = 'Pop-up height (in pixels)';
|
||||
$string['popupheightexplain'] = 'Specifies default height of popup windows.';
|
||||
$string['popupwidth'] = 'Pop-up width (in pixels)';
|
||||
$string['popupwidthexplain'] = 'Specifies default width of popup windows.';
|
||||
$string['printheading'] = 'Display page name';
|
||||
$string['printheadingexplain'] = 'Display page name above content?';
|
||||
$string['printintro'] = 'Display page description';
|
||||
$string['printintroexplain'] = 'Display page description above content?';
|
||||
$string['printlastmodified'] = 'Display last modified date';
|
||||
$string['printlastmodifiedexplain'] = 'Display last modified date below content?';
|
||||
$string['privacy:metadata'] = 'The Page resource plugin does not store any personal data.';
|
||||
$string['search:activity'] = 'Page';
|
||||
|
||||
// Deprecated since 4.0.
|
||||
$string['printheading'] = 'Display page name';
|
||||
$string['printheadingexplain'] = 'Display page name above content?';
|
||||
|
@ -104,7 +104,6 @@ function page_add_instance($data, $mform = null) {
|
||||
$displayoptions['popupwidth'] = $data->popupwidth;
|
||||
$displayoptions['popupheight'] = $data->popupheight;
|
||||
}
|
||||
$displayoptions['printheading'] = $data->printheading;
|
||||
$displayoptions['printintro'] = $data->printintro;
|
||||
$displayoptions['printlastmodified'] = $data->printlastmodified;
|
||||
$data->displayoptions = serialize($displayoptions);
|
||||
@ -154,7 +153,6 @@ function page_update_instance($data, $mform) {
|
||||
$displayoptions['popupwidth'] = $data->popupwidth;
|
||||
$displayoptions['popupheight'] = $data->popupheight;
|
||||
}
|
||||
$displayoptions['printheading'] = $data->printheading;
|
||||
$displayoptions['printintro'] = $data->printintro;
|
||||
$displayoptions['printlastmodified'] = $data->printlastmodified;
|
||||
$data->displayoptions = serialize($displayoptions);
|
||||
@ -488,7 +486,6 @@ function page_dndupload_handle($uploadinfo) {
|
||||
$data->display = $config->display;
|
||||
$data->popupheight = $config->popupheight;
|
||||
$data->popupwidth = $config->popupwidth;
|
||||
$data->printheading = $config->printheading;
|
||||
$data->printintro = $config->printintro;
|
||||
$data->printlastmodified = $config->printlastmodified;
|
||||
|
||||
|
@ -88,8 +88,6 @@ class mod_page_mod_form extends moodleform_mod {
|
||||
$mform->setDefault('popupheight', $config->popupheight);
|
||||
}
|
||||
|
||||
$mform->addElement('advcheckbox', 'printheading', get_string('printheading', 'page'));
|
||||
$mform->setDefault('printheading', $config->printheading);
|
||||
$mform->addElement('advcheckbox', 'printintro', get_string('printintro', 'page'));
|
||||
$mform->setDefault('printintro', $config->printintro);
|
||||
$mform->addElement('advcheckbox', 'printlastmodified', get_string('printlastmodified', 'page'));
|
||||
@ -134,9 +132,6 @@ class mod_page_mod_form extends moodleform_mod {
|
||||
if (isset($displayoptions['printintro'])) {
|
||||
$defaultvalues['printintro'] = $displayoptions['printintro'];
|
||||
}
|
||||
if (isset($displayoptions['printheading'])) {
|
||||
$defaultvalues['printheading'] = $displayoptions['printheading'];
|
||||
}
|
||||
if (isset($displayoptions['printlastmodified'])) {
|
||||
$defaultvalues['printlastmodified'] = $displayoptions['printlastmodified'];
|
||||
}
|
||||
|
@ -39,8 +39,6 @@ if ($ADMIN->fulltree) {
|
||||
//--- modedit defaults -----------------------------------------------------------------------------------
|
||||
$settings->add(new admin_setting_heading('pagemodeditdefaults', get_string('modeditdefaults', 'admin'), get_string('condifmodeditdefaults', 'admin')));
|
||||
|
||||
$settings->add(new admin_setting_configcheckbox('page/printheading',
|
||||
get_string('printheading', 'page'), get_string('printheadingexplain', 'page'), 1));
|
||||
$settings->add(new admin_setting_configcheckbox('page/printintro',
|
||||
get_string('printintro', 'page'), get_string('printintroexplain', 'page'), 0));
|
||||
$settings->add(new admin_setting_configcheckbox('page/printlastmodified',
|
||||
|
@ -22,8 +22,6 @@ Feature: Configure page appearance
|
||||
|
||||
Examples:
|
||||
| feature | lookfor | value | shouldornot |
|
||||
| Display page name | PageName1 | 1 | should |
|
||||
| Display page name | PageName1 | 0 | should not |
|
||||
| Display page description | PageDesc1 | 1 | should |
|
||||
| Display page description | PageDesc1 | 0 | should not |
|
||||
| Display last modified date | Last modified: | 1 | should |
|
||||
|
@ -51,9 +51,6 @@ class mod_page_generator extends testing_module_generator {
|
||||
if (!isset($record->display)) {
|
||||
$record->display = RESOURCELIB_DISPLAY_AUTO;
|
||||
}
|
||||
if (!isset($record->printheading)) {
|
||||
$record->printheading = 1;
|
||||
}
|
||||
if (!isset($record->printintro)) {
|
||||
$record->printintro = 0;
|
||||
}
|
||||
|
5
mod/page/upgrade.txt
Normal file
5
mod/page/upgrade.txt
Normal file
@ -0,0 +1,5 @@
|
||||
This files describes API changes in the mod_page code.
|
||||
|
||||
=== 4.0 ===
|
||||
|
||||
* Removed printheading from page and admin settings. This will now be handled by the activity header and/or theme.
|
@ -59,10 +59,6 @@ $PAGE->set_url('/mod/page/view.php', array('id' => $cm->id));
|
||||
$options = empty($page->displayoptions) ? [] : (array) unserialize_array($page->displayoptions);
|
||||
|
||||
$activityheader = ['hidecompletion' => false];
|
||||
if (empty($options['printheading'])) {
|
||||
$activityheader['title'] = '';
|
||||
}
|
||||
|
||||
if (empty($options['printintro']) || !trim(strip_tags($page->intro))) {
|
||||
$activityheader['description'] = '';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user