Commit 9717aa2d authored by Eloy Lafuente's avatar Eloy Lafuente
Browse files

MDL-32709 book: delete some not needed stuff

parent f7e6dd4d
......@@ -115,10 +115,6 @@ $PAGE->set_heading(format_string($course->fullname));
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('editingchapter', 'mod_book'));
if (debugging()) {
echo $OUTPUT->box($OUTPUT->notification(get_string('missingfilemanagement', 'mod_book', html_writer::link('http://tracker.moodle.org/browse/MDL-28019', 'MDL-28019'))));
}
$mform->display();
echo $OUTPUT->footer();
......@@ -109,6 +109,5 @@ $string['errorchapter'] = 'Error reading book chapter.';
$string['page-mod-book-x'] = 'Any book module page';
$string['missingfilemanagement'] = 'Dear users of Book module, I supposed you have already notised that it is not possible to delete or manage files used in Book chapters. Please vote in {$a} to get this fixed, thanks. Petr Škoda';
$string['subplugintype_booktool'] = 'Book tool';
$string['subplugintype_booktool_plural'] = 'Book tools';
......@@ -297,10 +297,6 @@ function book_extend_settings_navigation(settings_navigation $settingsnav, navig
return;
}
if (empty($PAGE->cm->context)) {
$PAGE->cm->context = get_context_instance(CONTEXT_MODULE, $PAGE->cm->instance);
}
$plugins = get_plugin_list('booktool');
foreach ($plugins as $plugin => $dir) {
if (file_exists("$dir/lib.php")) {
......
......@@ -37,13 +37,9 @@ function booktool_exportimscp_extend_settings_navigation(settings_navigation $se
return;
}
if (empty($PAGE->cm->context)) {
$PAGE->cm->context = get_context_instance(CONTEXT_MODULE, $PAGE->cm->instance);
}
if (has_capability('booktool/exportimscp:export', $PAGE->cm->context)) {
$url = new moodle_url('/mod/book/tool/exportimscp/index.php', array('id'=>$PAGE->cm->id));
$icon = new pix_icon('generate', '', 'booktool_exportimscp', array('class'=>'icon'));
$node->add(get_string('generateimscp', 'booktool_exportimscp'), $url, navigation_node::TYPE_SETTING, null, null, $icon);
}
}
\ No newline at end of file
}
......@@ -37,12 +37,8 @@ function booktool_importhtml_extend_settings_navigation(settings_navigation $set
return;
}
if (empty($PAGE->cm->context)) {
$PAGE->cm->context = get_context_instance(CONTEXT_MODULE, $PAGE->cm->instance);
}
if (has_capability('booktool/importhtml:import', $PAGE->cm->context)) {
$url = new moodle_url('/mod/book/tool/importhtml/index.php', array('id'=>$PAGE->cm->id));
$node->add(get_string('import', 'booktool_importhtml'), $url, navigation_node::TYPE_SETTING, null, null, null);
}
}
\ No newline at end of file
}
......@@ -37,10 +37,6 @@ function booktool_print_extend_settings_navigation(settings_navigation $settings
return;
}
if (empty($PAGE->cm->context)) {
$PAGE->cm->context = get_context_instance(CONTEXT_MODULE, $PAGE->cm->instance);
}
$params = $PAGE->url->params();
if (empty($params['id']) or empty($params['chapterid'])) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment