]> git.mjollnir.org Git - moodle.git/commitdiff
enrol MDL-19795 Added set_url calls, and fixed misc minor errors
authorsamhemelryk <samhemelryk>
Thu, 15 Oct 2009 03:17:57 +0000 (03:17 +0000)
committersamhemelryk <samhemelryk>
Thu, 15 Oct 2009 03:17:57 +0000 (03:17 +0000)
enrol/authorize/index.php
enrol/authorize/uploadcsv.php
enrol/imsenterprise/importnow.php
enrol/mnet/allowed_courses.php
enrol/mnet/enrol.php
enrol/paypal/return.php

index b1ce8c395d912acf6542c206f162ea8c2821e888..8f2bf5bbe6869ed36e63f3d05d3789598e6726dc 100644 (file)
@@ -1,4 +1,4 @@
-<?php // $Id$
+<?php
 
 /// Load libraries
     require_once('../../config.php');
     $courseid = optional_param('course', SITEID, PARAM_INT);
     $userid   = optional_param('user', 0, PARAM_INT);
 
+    $url = new moodle_url($CFG->wwwroot.'/enrol/authorize/index.php');
+    if ($orderid !== 0) {
+        $url->param('order', $orderid);
+    }
+    if ($courseid !== SITEID) {
+        $url->param('course', $courseid);
+    }
+    if ($userid !== 0) {
+        $url->param('user', $userid);
+    }
+    $PAGE->set_url($url);
+
 /// Get course
     if (! $course = $DB->get_record('course', array('id'=>$courseid))) {
         print_error('invalidcourseid', '', '', $courseid);
index b88a8c43eecdda67ca9200efd7831a044eccf107..de3219ee76bdad3f2c2752d804119c8c91ffd23a 100644 (file)
@@ -15,6 +15,7 @@
     $struploadcsv = get_string('uploadcsv', 'enrol_authorize');
     $managebutton = "<form method='get' action='index.php'><div><input type='submit' value='".get_string('paymentmanagement', 'enrol_authorize')."' /></div></form>";
 
+    $PAGE->set_url(new moodle_url($CFG->wwwroot.'/enrol/authorize/uploadcsv.php'));
     $PAGE->navbar->add(get_string('paymentmanagement', 'enrol_authorize'), 'index.php');
     $PAGE->navbar->add($struploadcsv, 'uploadcsv.php');
     $PAGE->set_title($struploadcsv);
index 05fefb8d1825dbe22152e83785794e88bd7a6b27..15f6a78092f242db9ed1d620d774f1402cf26d07 100644 (file)
@@ -10,6 +10,7 @@ if (!$site = get_site()) {
 /// get language strings
 $str = get_strings(array('enrolments', 'users', 'administration', 'settings'));
 
+$PAGE->set_url(new moodle_url($CFG->wwwroot.'/enrol/imsenterprise/importnow.php'));
 $PAGE->set_title("$site->shortname: $str->enrolments");
 $PAGE->set_heading($site->fullname);
 $PAGE->navbar->add($str->administration, new moodle_url($CFG->wwwroot.'/'.$CFG->admin.'/index.php'));
index caef51cbbf5084f9906b22b0a9f3fa853a41f09e..5781c89eb8aad1c22cdfb6e5c848ceb090edb38e 100644 (file)
@@ -19,7 +19,6 @@ $removecategory = optional_param('removecategory', 0, PARAM_BOOL);
 $addcourse      = optional_param('addcourse', 0, PARAM_BOOL);
 $removecourse   = optional_param('removecourse', 0, PARAM_BOOL);
 
-require_login();
 $sitecontext = get_context_instance(CONTEXT_SYSTEM);
 $sesskey = sesskey();
 $formerror = array();
index 95154196a74e3328444278cea2469c6e267a73b1..aa7efe00e5253f0857f079e01508a55bcf6f3ea4 100644 (file)
@@ -8,7 +8,7 @@ class enrolment_plugin_mnet {
 
     /// Override the base config_form() function
     function config_form($frm) {
-        global $CFG;
+        global $CFG, $OUTPUT, $PAGE;
 
        $vars = array('enrol_mnet_allow_allcourses',
                      'enrol_mnet_allowed_categories',
index 400beba4462e5f7b6b6f1f41e976dd2bb80ab6fc..c5157e5e2596a2ed352edc86c3bf701f62b6fe65 100644 (file)
@@ -29,6 +29,7 @@
         redirect($destination, get_string('paymentthanks', '', $course->fullname));
 
     } else {   /// Somehow they aren't enrolled yet!  :-(
+        $PAGE->set_url($destination);
         echo $OUTPUT->header();
         notice(get_string('paymentsorry', '', get_string('defaultcourseteacher')), $destination);
     }