From 645beae25f39d50a4111ee74acf29ff80632391d Mon Sep 17 00:00:00 2001 From: Peter Date: Mon, 22 Jul 2019 11:18:14 +0800 Subject: [PATCH] MDL-66072 core: Remove course sharing and related capabilities --- admin/settings/subsystems.php | 3 - backup/util/checks/backup_check.class.php | 9 - backup/util/checks/restore_check.class.php | 9 - course/lib.php | 1 - course/publish/backup.php | 113 ------------ course/publish/forms.php | 36 ---- course/publish/hubselector.php | 30 ---- course/publish/index.php | 99 ----------- course/publish/lib.php | 17 -- course/publish/metadata.php | 192 --------------------- course/tests/courselib_test.php | 2 - course/tests/externallib_test.php | 4 +- lib/db/access.php | 37 ---- lib/db/upgrade.php | 6 + lib/navigationlib.php | 7 - version.php | 2 +- 16 files changed, 8 insertions(+), 559 deletions(-) delete mode 100644 course/publish/backup.php delete mode 100644 course/publish/forms.php delete mode 100644 course/publish/hubselector.php delete mode 100644 course/publish/index.php delete mode 100644 course/publish/lib.php delete mode 100644 course/publish/metadata.php diff --git a/admin/settings/subsystems.php b/admin/settings/subsystems.php index e5c660b570a..de5f75be993 100644 --- a/admin/settings/subsystems.php +++ b/admin/settings/subsystems.php @@ -48,7 +48,4 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page $optionalsubsystems->add(new admin_setting_configcheckbox('allowstealth', new lang_string('allowstealthmodules'), new lang_string('allowstealthmodules_help'), 0, 1, 0)); - - $optionalsubsystems->add(new admin_setting_configcheckbox('enablecoursepublishing', - new lang_string('enablecoursepublishing', 'hub'), new lang_string('enablecoursepublishing_help', 'hub'), 0)); } diff --git a/backup/util/checks/backup_check.class.php b/backup/util/checks/backup_check.class.php index 164da0b3856..7cd4c14af54 100644 --- a/backup/util/checks/backup_check.class.php +++ b/backup/util/checks/backup_check.class.php @@ -128,15 +128,6 @@ abstract class backup_check { // Now, if backup mode is hub or import, check userid has permissions for those modes // other modes will perform common checks only (backupxxxx capabilities in $typecapstocheck) switch ($mode) { - case backup::MODE_HUB: - if (!has_capability('moodle/backup:backuptargethub', $coursectx, $userid)) { - $a = new stdclass(); - $a->userid = $userid; - $a->courseid = $courseid; - $a->capability = 'moodle/backup:backuptargethub'; - throw new backup_controller_exception('backup_user_missing_capability', $a); - } - break; case backup::MODE_IMPORT: if (!has_capability('moodle/backup:backuptargetimport', $coursectx, $userid)) { $a = new stdclass(); diff --git a/backup/util/checks/restore_check.class.php b/backup/util/checks/restore_check.class.php index ee2b6cdbc98..35fe2d9bf9b 100644 --- a/backup/util/checks/restore_check.class.php +++ b/backup/util/checks/restore_check.class.php @@ -90,15 +90,6 @@ abstract class restore_check { // Now, if restore mode is hub or import, check userid has permissions for those modes // other modes will perform common checks only (restorexxxx capabilities in $typecapstocheck) switch ($mode) { - case backup::MODE_HUB: - if (!has_capability('moodle/restore:restoretargethub', $coursectx, $userid)) { - $a = new stdclass(); - $a->userid = $userid; - $a->courseid = $courseid; - $a->capability = 'moodle/restore:restoretargethub'; - throw new restore_controller_exception('restore_user_missing_capability', $a); - } - break; case backup::MODE_IMPORT: if (!has_capability('moodle/restore:restoretargetimport', $coursectx, $userid)) { $a = new stdclass(); diff --git a/course/lib.php b/course/lib.php index 34f94f22f8c..ef1e7dda563 100644 --- a/course/lib.php +++ b/course/lib.php @@ -4014,7 +4014,6 @@ function course_get_user_administration_options($course, $context) { $options->outcomes = !empty($CFG->enableoutcomes) && has_capability('moodle/course:update', $context); $options->badges = !empty($CFG->enablebadges); $options->import = has_capability('moodle/restore:restoretargetimport', $context); - $options->publish = !empty($CFG->enablecoursepublishing) && has_capability('moodle/course:publish', $context); $options->reset = has_capability('moodle/course:reset', $context); $options->roles = has_capability('moodle/role:switchroles', $context); } else { diff --git a/course/publish/backup.php b/course/publish/backup.php deleted file mode 100644 index f9f9d7a7ab0..00000000000 --- a/course/publish/backup.php +++ /dev/null @@ -1,113 +0,0 @@ -. // -// // -/////////////////////////////////////////////////////////////////////////// - -/** - * This page display the publication backup form - * - * @package course - * @subpackage publish - * @author Jerome Mouneyrac - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL - * @copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com - */ - -define('NO_OUTPUT_BUFFERING', true); - -require_once('../../config.php'); -require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php'); -require_once($CFG->dirroot . '/backup/moodle2/backup_plan_builder.class.php'); -require_once($CFG->libdir . '/filelib.php'); - - -//retrieve initial page parameters -$id = required_param('id', PARAM_INT); -$hubcourseid = required_param('hubcourseid', PARAM_INT); - -//some permissions and parameters checking -$course = $DB->get_record('course', array('id'=>$id), '*', MUST_EXIST); -require_login($course); - -$context = context_course::instance($course->id); -if (empty($CFG->enablecoursepublishing) || !has_capability('moodle/course:publish', $context) || !confirm_sesskey()) { - throw new moodle_exception('nopermission'); -} - -//page settings -$PAGE->set_url('/course/publish/backup.php'); -$PAGE->set_pagelayout('incourse'); -$PAGE->set_title(get_string('course') . ': ' . $course->fullname); -$PAGE->set_heading($course->fullname); - -//BEGIN backup processing -$backupid = optional_param('backup', false, PARAM_ALPHANUM); -if (!($bc = backup_ui::load_controller($backupid))) { - $bc = new backup_controller(backup::TYPE_1COURSE, $id, backup::FORMAT_MOODLE, - backup::INTERACTIVE_YES, backup::MODE_HUB, $USER->id); -} -$backup = new backup_ui($bc, - array('id' => $id, 'hubcourseid' => $hubcourseid, 'huburl' => HUB_MOODLEORGHUBURL, 'hubname' => 'Moodle.net')); -$backup->process(); -if ($backup->get_stage() == backup_ui::STAGE_FINAL) { - $backup->execute(); -} else { - $backup->save_controller(); -} - -if ($backup->get_stage() !== backup_ui::STAGE_COMPLETE) { - $renderer = $PAGE->get_renderer('core', 'backup'); - echo $OUTPUT->header(); - echo $OUTPUT->heading(get_string('publishcourseon', 'hub', 'Moodle.net'), 3, 'main'); - if ($backup->enforce_changed_dependencies()) { - debugging('Your settings have been altered due to unmet dependencies', DEBUG_DEVELOPER); - } - echo $renderer->progress_bar($backup->get_progress_bar()); - echo $backup->display($renderer); - echo $OUTPUT->footer(); - die(); -} - -//$backupfile = $backup->get_stage_results(); -$backupfile = $bc->get_results(); -$backupfile = $backupfile['backup_destination']; -//END backup processing - -//display the sending file page -echo $OUTPUT->header(); -echo $OUTPUT->heading(get_string('sendingcourse', 'hub'), 3, 'main'); -$renderer = $PAGE->get_renderer('core', 'course'); -echo $renderer->sendingbackupinfo($backupfile); -if (ob_get_level()) { - ob_flush(); -} -flush(); - -//send backup file to the hub -\core\hub\publication::upload_course_backup($hubcourseid, $backupfile); - -//delete the temp backup file from user_tohub aera -$backupfile->delete(); -$bc->destroy(); - -//Output sending success -echo $renderer->sentbackupinfo($id, HUB_MOODLEORGHUBURL, 'Moodle.net'); - -echo $OUTPUT->footer(); diff --git a/course/publish/forms.php b/course/publish/forms.php deleted file mode 100644 index 288475e0aae..00000000000 --- a/course/publish/forms.php +++ /dev/null @@ -1,36 +0,0 @@ -. // -// // -/////////////////////////////////////////////////////////////////////////// - -/** - * @package course - * @subpackage publish - * @author Jerome Mouneyrac - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL - * @copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com - * - * The forms used for course publication - */ - -defined('MOODLE_INTERNAL') || die(); - -debugging('Support for alternative hubs has been removed from Moodle in 3.4. For communication with moodle.net ' . - 'see lib/classes/hub/ .', DEBUG_DEVELOPER); diff --git a/course/publish/hubselector.php b/course/publish/hubselector.php deleted file mode 100644 index e731d4dceae..00000000000 --- a/course/publish/hubselector.php +++ /dev/null @@ -1,30 +0,0 @@ -. - -/* - * @package course - * @subpackage publish - * @author Jerome Mouneyrac - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL - * @copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com - * - * On this page the user selects where he wants to publish the course -*/ - -require('../../config.php'); - -$id = required_param('id', PARAM_INT); -redirect(new moodle_url('/course/publish/index.php', ['id' => $id])); \ No newline at end of file diff --git a/course/publish/index.php b/course/publish/index.php deleted file mode 100644 index 7bff4732681..00000000000 --- a/course/publish/index.php +++ /dev/null @@ -1,99 +0,0 @@ -. - -/* - * @package course - * @subpackage publish - * @author Jerome Mouneyrac - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL - * @copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com - * - * The user selects if he wants to publish the course on Moodle.org hub or - * on a specific hub. The site must be registered on a hub to be able to - * publish a course on it. -*/ - -require('../../config.php'); - -$courseid = required_param('id', PARAM_INT); // Course id. -$publicationid = optional_param('publicationid', 0, PARAM_INT); // Id of course publication to unpublish. - -require_login($courseid); -$shortname = format_string($COURSE->shortname); - -$PAGE->set_url('/course/publish/index.php', array('id' => $courseid)); -$PAGE->set_pagelayout('incourse'); -$PAGE->set_title(get_string('publish', 'core_hub') . ': ' . $COURSE->fullname); -$PAGE->set_heading($COURSE->fullname); - -$context = context_course::instance($courseid); -if (empty($CFG->enablecoursepublishing) || !has_capability('moodle/course:publish', $context)) { - throw new moodle_exception('nopermission'); -} - -// If the site is not registered display an error page. -if (!\core\hub\registration::is_registered()) { - echo $OUTPUT->header(); - echo $OUTPUT->heading(get_string('publishcourseon', 'hub', 'Moodle.net'), 3, 'main'); - echo $OUTPUT->box(get_string('notregisteredonhub', 'hub')); - if (has_capability('moodle/site:config', context_system::instance())) { - echo $OUTPUT->single_button(new moodle_url('/admin/registration/index.php'), get_string('register', 'admin')); - } - echo $OUTPUT->footer(); - die(); -} - -// When hub listing status is requested update statuses of all published courses. -$updatestatusid = optional_param('updatestatusid', false, PARAM_INT); -if (!empty($updatestatusid) && confirm_sesskey()) { - if (core\hub\publication::get_publication($updatestatusid, $courseid)) { - core\hub\publication::request_status_update(); - redirect($PAGE->url); - } -} - -$renderer = $PAGE->get_renderer('core', 'course'); - -// Unpublish course. -if ($publication = \core\hub\publication::get_publication($publicationid, $courseid)) { - $confirm = optional_param('confirm', 0, PARAM_BOOL); - if ($confirm && confirm_sesskey()) { - \core\hub\publication::unpublish($publication); - } else { - // Display confirmation page for unpublishing. - $publication = \core\hub\publication::get_publication($publicationid, $courseid, MUST_EXIST); - $publication->courseshortname = format_string($COURSE->shortname); - echo $OUTPUT->header(); - echo $OUTPUT->heading(get_string('unpublishcourse', 'hub', $shortname), 3, 'main'); - echo $renderer->confirmunpublishing($publication); - echo $OUTPUT->footer(); - die(); - } -} - -// List current publications and "Publish" buttons. -echo $OUTPUT->header(); - -echo $OUTPUT->heading(get_string('publishcourse', 'hub', $shortname), 3, 'main'); -echo $renderer->publicationselector($courseid); - -$publications = \core\hub\publication::get_course_publications($courseid); -if (!empty($publications)) { - echo $OUTPUT->heading(get_string('publishedon', 'hub'), 3, 'main'); - echo $renderer->registeredonhublisting($courseid, $publications); -} - -echo $OUTPUT->footer(); diff --git a/course/publish/lib.php b/course/publish/lib.php deleted file mode 100644 index 72330f6fe23..00000000000 --- a/course/publish/lib.php +++ /dev/null @@ -1,17 +0,0 @@ -. - -defined('MOODLE_INTERNAL') || die(); diff --git a/course/publish/metadata.php b/course/publish/metadata.php deleted file mode 100644 index 3042864d8b6..00000000000 --- a/course/publish/metadata.php +++ /dev/null @@ -1,192 +0,0 @@ -. // -// // -/////////////////////////////////////////////////////////////////////////// - -/* - * @package course - * @subpackage publish - * @author Jerome Mouneyrac - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL - * @copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com - * - * This page display the publication metadata form - */ - -require_once('../../config.php'); -require_once($CFG->libdir . '/filelib.php'); - - -//check user access capability to this page -$id = required_param('id', PARAM_INT); - -$course = $DB->get_record('course', array('id' => $id), '*', MUST_EXIST); -require_login($course); - -//page settings -$PAGE->set_url('/course/publish/metadata.php', array('id' => $course->id)); -$PAGE->set_pagelayout('incourse'); -$PAGE->set_title(get_string('course') . ': ' . $course->fullname); -$PAGE->set_heading($course->fullname); - -$context = context_course::instance($course->id); -if (empty($CFG->enablecoursepublishing) || !has_capability('moodle/course:publish', $context)) { - throw new moodle_exception('nopermission'); -} - -// Retrieve hub name and hub url. -require_sesskey(); - -// Set the publication form. -$advertise = optional_param('advertise', false, PARAM_BOOL); -$publicationid = optional_param('publicationid', false, PARAM_INT); -$formparams = array('course' => $course, 'advertise' => $advertise); -if ($publicationid) { - $publication = \core\hub\publication::get_publication($publicationid, $course->id, MUST_EXIST); - $formparams['publication'] = $publication; - $advertise = $formparams['advertise'] = $publication->enrollable; -} -$share = !$advertise; -$coursepublicationform = new \core\hub\course_publication_form('', $formparams); -$fromform = $coursepublicationform->get_data(); - -if (!empty($fromform)) { - - // Retrieve the course information. - $courseinfo = new stdClass(); - $courseinfo->fullname = $fromform->name; - $courseinfo->shortname = $fromform->courseshortname; - $courseinfo->description = $fromform->description; - $courseinfo->language = $fromform->language; - $courseinfo->publishername = $fromform->publishername; - $courseinfo->publisheremail = $fromform->publisheremail; - $courseinfo->contributornames = $fromform->contributornames; - $courseinfo->coverage = $fromform->coverage; - $courseinfo->creatorname = $fromform->creatorname; - $courseinfo->licenceshortname = $fromform->licence; - $courseinfo->subject = $fromform->subject; - $courseinfo->audience = $fromform->audience; - $courseinfo->educationallevel = $fromform->educationallevel; - $creatornotes = $fromform->creatornotes; - $courseinfo->creatornotes = $creatornotes['text']; - $courseinfo->creatornotesformat = $creatornotes['format']; - $courseinfo->sitecourseid = $id; - if (!empty($fromform->deletescreenshots)) { - $courseinfo->deletescreenshots = $fromform->deletescreenshots; - } - if ($share) { - $courseinfo->demourl = $fromform->demourl; - $courseinfo->enrollable = false; - } else { - $courseinfo->courseurl = $fromform->courseurl; - $courseinfo->enrollable = true; - } - - // Retrieve the outcomes of this course. - require_once($CFG->libdir . '/grade/grade_outcome.php'); - $outcomes = grade_outcome::fetch_all_available($id); - if (!empty($outcomes)) { - foreach ($outcomes as $outcome) { - $sentoutcome = new stdClass(); - $sentoutcome->fullname = $outcome->fullname; - $courseinfo->outcomes[] = $sentoutcome; - } - } - - // Retrieve the content information from the course. - $coursecontext = context_course::instance($course->id); - $courseblocks = \core\hub\publication::get_block_instances_by_context($coursecontext->id); - - if (!empty($courseblocks)) { - $blockname = ''; - foreach ($courseblocks as $courseblock) { - if ($courseblock->blockname != $blockname) { - if (!empty($blockname)) { - $courseinfo->contents[] = $content; - } - - $blockname = $courseblock->blockname; - $content = new stdClass(); - $content->moduletype = 'block'; - $content->modulename = $courseblock->blockname; - $content->contentcount = 1; - } else { - $content->contentcount = $content->contentcount + 1; - } - } - $courseinfo->contents[] = $content; - } - - $activities = get_fast_modinfo($course, $USER->id); - foreach ($activities->instances as $activityname => $activitydetails) { - $content = new stdClass(); - $content->moduletype = 'activity'; - $content->modulename = $activityname; - $content->contentcount = count($activities->instances[$activityname]); - $courseinfo->contents[] = $content; - } - - // Save into screenshots field the references to the screenshot content hash - // (it will be like a unique id from the hub perspective). - if (!empty($fromform->deletescreenshots) or $share) { - $courseinfo->screenshots = 0; - } else { - $courseinfo->screenshots = $fromform->existingscreenshotnumber; - } - $files = []; - if (!empty($fromform->screenshots)) { - $fs = get_file_storage(); - $files = $fs->get_area_files(context_user::instance($USER->id)->id, 'user', 'draft', $fromform->screenshots, - 'filepath, filename', false); - $files = array_filter($files, function(stored_file $file) { - return $file->is_valid_image(); - }); - $courseinfo->screenshots += count($files); - } - - // PUBLISH ACTION. - $hubcourseid = \core\hub\publication::publish_course($courseinfo, $files); - - // Redirect to the backup process page. - if ($share) { - $params = array('sesskey' => sesskey(), 'id' => $id, 'hubcourseid' => $hubcourseid); - $backupprocessurl = new moodle_url("/course/publish/backup.php", $params); - redirect($backupprocessurl); - } else { - // Redirect to the index publis page. - redirect(new moodle_url('/course/publish/index.php', ['id' => $id]), - get_string('coursepublished', 'hub', 'Moodle.net'), null, \core\output\notification::NOTIFY_SUCCESS); - } -} - -// OUTPUT SECTION. - -echo $OUTPUT->header(); -echo $OUTPUT->heading(get_string('publishcourseon', 'hub', 'Moodle.net'), 3, 'main'); - -// Display hub information (logo, name, description). -$renderer = $PAGE->get_renderer('core', 'course'); -if ($hubinfo = \core\hub\registration::get_moodlenet_info()) { - echo $renderer->hubinfo($hubinfo); -} - -// Display metadata form. -$coursepublicationform->display(); -echo $OUTPUT->footer(); diff --git a/course/tests/courselib_test.php b/course/tests/courselib_test.php index aa819edc2d7..5e70ddff4b8 100644 --- a/course/tests/courselib_test.php +++ b/course/tests/courselib_test.php @@ -3193,7 +3193,6 @@ class core_course_courselib_testcase extends advanced_testcase { $this->assertFalse($adminoptions->outcomes); $this->assertTrue($adminoptions->badges); $this->assertTrue($adminoptions->import); - $this->assertFalse($adminoptions->publish); $this->assertTrue($adminoptions->reset); $this->assertTrue($adminoptions->roles); } @@ -3225,7 +3224,6 @@ class core_course_courselib_testcase extends advanced_testcase { $this->assertFalse($adminoptions->outcomes); $this->assertTrue($adminoptions->badges); $this->assertFalse($adminoptions->import); - $this->assertFalse($adminoptions->publish); $this->assertFalse($adminoptions->reset); $this->assertFalse($adminoptions->roles); diff --git a/course/tests/externallib_test.php b/course/tests/externallib_test.php index ac06afab57c..c153e6984eb 100644 --- a/course/tests/externallib_test.php +++ b/course/tests/externallib_test.php @@ -2334,12 +2334,11 @@ class core_course_externallib_testcase extends externallib_advanced_testcase { $this->assertFalse($adminoptions->outcomes); $this->assertFalse($adminoptions->badges); $this->assertFalse($adminoptions->import); - $this->assertFalse($adminoptions->publish); $this->assertFalse($adminoptions->reset); $this->assertFalse($adminoptions->roles); $this->assertFalse($adminoptions->editcompletion); } else { - $this->assertCount(15, $course['options']); + $this->assertCount(14, $course['options']); $this->assertFalse($adminoptions->update); $this->assertFalse($adminoptions->filters); $this->assertFalse($adminoptions->reports); @@ -2351,7 +2350,6 @@ class core_course_externallib_testcase extends externallib_advanced_testcase { $this->assertFalse($adminoptions->outcomes); $this->assertTrue($adminoptions->badges); $this->assertFalse($adminoptions->import); - $this->assertFalse($adminoptions->publish); $this->assertFalse($adminoptions->reset); $this->assertFalse($adminoptions->roles); $this->assertFalse($adminoptions->editcompletion); diff --git a/lib/db/access.php b/lib/db/access.php index 87d472e92d8..bc24d73d71e 100644 --- a/lib/db/access.php +++ b/lib/db/access.php @@ -181,20 +181,6 @@ $capabilities = array( 'clonepermissionsfrom' => 'moodle/backup:backupcourse' ), - 'moodle/backup:backuptargethub' => array( - - 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS, - - 'captype' => 'write', - 'contextlevel' => CONTEXT_COURSE, - 'archetypes' => array( - 'editingteacher' => CAP_ALLOW, - 'manager' => CAP_ALLOW - ), - - 'clonepermissionsfrom' => 'moodle/backup:backupcourse' - ), - 'moodle/backup:backuptargetimport' => array( 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS, @@ -311,20 +297,6 @@ $capabilities = array( ), ), - 'moodle/restore:restoretargethub' => array( - - 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS, - - 'captype' => 'write', - 'contextlevel' => CONTEXT_COURSE, - 'archetypes' => array( - 'editingteacher' => CAP_ALLOW, - 'manager' => CAP_ALLOW - ), - - 'clonepermissionsfrom' => 'moodle/restore:restorecourse' - ), - 'moodle/restore:restoretargetimport' => array( 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS, @@ -1987,15 +1959,6 @@ $capabilities = array( 'editingteacher' => CAP_ALLOW, 'manager' => CAP_ALLOW ) - ), - 'moodle/course:publish' => array( - - 'captype' => 'write', - 'riskbitmask' => RISK_SPAM | RISK_PERSONAL, - 'contextlevel' => CONTEXT_SYSTEM, - 'archetypes' => array( - 'manager' => CAP_ALLOW - ) ), 'moodle/course:markcomplete' => array( 'captype' => 'write', diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 4775abd0835..c133e6528db 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -3390,5 +3390,11 @@ function xmldb_main_upgrade($oldversion) { upgrade_main_savepoint(true, 2019052001.04); } + if ($oldversion < 2019052001.12) { + // Remove unused config. + unset_config('enablecoursepublishing'); + upgrade_main_savepoint(true, 2019052001.12); + } + return true; } diff --git a/lib/navigationlib.php b/lib/navigationlib.php index bae521fa628..9be0b66465f 100644 --- a/lib/navigationlib.php +++ b/lib/navigationlib.php @@ -4530,13 +4530,6 @@ class settings_navigation extends navigation_node { $coursenode->add(get_string('import'), $url, self::TYPE_SETTING, null, 'import', new pix_icon('i/import', '')); } - // Publish course on a hub - if ($adminoptions->publish) { - $url = new moodle_url('/course/publish/index.php', array('id'=>$course->id)); - $coursenode->add(get_string('publish', 'core_hub'), $url, self::TYPE_SETTING, null, 'publish', - new pix_icon('i/publish', '')); - } - // Reset this course if ($adminoptions->reset) { $url = new moodle_url('/course/reset.php', array('id'=>$course->id)); diff --git a/version.php b/version.php index cce43223121..ffebe1eea34 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2019052001.11; // 20190520 = branching date YYYYMMDD - do not modify! +$version = 2019052001.12; // 20190520 = branching date YYYYMMDD - do not modify! // RR = release increments - 00 in DEV branches. // .XX = incremental changes.