Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed some problem that extend user enrolment is not working properly

  • Loading branch information...
commit 986935e9b72f8c7c33f820dd51ad7e78ba0c512f 1 parent 027761d
patrickslee authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 user/extendenrol.php
View
4 user/extendenrol.php
@@ -45,7 +45,7 @@
}
print_heading(get_string('extendenrol'));
-echo "<form method=\"post\" action=\"{$_SERVER['PHP_SELF']}\" name=\"form\">\n";
+echo "<form method=\"post\" action=\"extendenrol.php\" name=\"form\">\n";
echo '<input type="hidden" name="id" value="'.$course->id.'" />';
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
$table->head = array (get_string('fullname'), get_string('enrolmentstart'), get_string('enrolmentend'), get_string('extendperiod'));
@@ -55,7 +55,7 @@
$nochange = get_string('nochange');
foreach ($_POST as $k => $v) {
if (preg_match('/^user(\d+)$/',$k,$m)) {
- 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]}"))) {
+ 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"))) {
continue;
}
$table->data[] = array(
Please sign in to comment.
Something went wrong with that request. Please try again.