From 0ec691c45711c60aed9fab68efa14ff3b56b65b7 Mon Sep 17 00:00:00 2001 From: moodler Date: Tue, 23 Sep 2008 03:27:46 +0000 Subject: [PATCH] MDL-15402 Fixed up the user personal repositories page so it fits in with user profile better (tabs, heading location etc) --- repository/manage_instances.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/repository/manage_instances.php b/repository/manage_instances.php index 3b70f58942..7631afc3a0 100644 --- a/repository/manage_instances.php +++ b/repository/manage_instances.php @@ -9,6 +9,7 @@ $delete = optional_param('delete', 0, PARAM_INT); $sure = optional_param('sure', '', PARAM_ALPHA); $contextid = optional_param('contextid', 0, PARAM_INT); + $usercourseid = optional_param('usercourseid', SITEID, PARAM_INT); // Extra: used for user context only if ($edit){ $pagename = 'repositoryinstanceedit'; @@ -89,6 +90,15 @@ /// Display page header print_header($title, $fullname, $navigation); + + if ($context->contextlevel == CONTEXT_USER) { + if ( !$course = $DB->get_record('course', array('id'=>$usercourseid))) { + print_error('invalidcourseid'); + } + $currenttab = 'repositories'; + include($CFG->dirroot.'/user/tabs.php'); + } + print_heading($pagename); $return = true; -- 2.39.5