Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed some problem that extend user enrolment is not working properly

  • Loading branch information...
commit 986935e9b72f8c7c33f820dd51ad7e78ba0c512f 1 parent 027761d
authored November 29, 2005

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  user/extendenrol.php
4  user/extendenrol.php
@@ -45,7 +45,7 @@
45 45
 }
46 46
 
47 47
 print_heading(get_string('extendenrol'));
48  
-echo "<form method=\"post\" action=\"{$_SERVER['PHP_SELF']}\" name=\"form\">\n";
  48
+echo "<form method=\"post\" action=\"extendenrol.php\" name=\"form\">\n";
49 49
 echo '<input type="hidden" name="id" value="'.$course->id.'" />';
50 50
 echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
51 51
 $table->head  = array (get_string('fullname'), get_string('enrolmentstart'), get_string('enrolmentend'), get_string('extendperiod'));
@@ -55,7 +55,7 @@
55 55
 $nochange = get_string('nochange');
56 56
 foreach ($_POST as $k => $v) {
57 57
     if (preg_match('/^user(\d+)$/',$k,$m)) {
58  
-        if (!($user = get_record_sql("SELECT * FROM {$CFG->prefix}user u INNER JOIN {$CFG->prefix}user_students s ON u.id=s.userid WHERE u.id={$m[1]}"))) {
  58
+        if (!($user = get_record_sql("SELECT * FROM {$CFG->prefix}user u INNER JOIN {$CFG->prefix}user_students s ON u.id=s.userid WHERE u.id={$m[1]} AND s.course=$course->id"))) {
59 59
             continue;
60 60
         }
61 61
         $table->data[] = array(

0 notes on commit 986935e

Please sign in to comment.
Something went wrong with that request. Please try again.