]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-15402 Fixed up the user personal repositories page so it fits in with user profi...
authormoodler <moodler>
Tue, 23 Sep 2008 03:27:46 +0000 (03:27 +0000)
committermoodler <moodler>
Tue, 23 Sep 2008 03:27:46 +0000 (03:27 +0000)
repository/manage_instances.php

index 3b70f58942998b05933442544e2751dca3bfc7da..7631afc3a020f704ff21bd693187b96e05df18ae 100644 (file)
@@ -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';
 
 /// 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;