We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 26ca82f + f2ca4e4 commit 4634c58Copy full SHA for 4634c58
main/course_home/course_home.php
@@ -142,7 +142,9 @@
142
if ($is_speacialcourse) {
143
$autoreg = Security::remove_XSS($_GET['autoreg']);
144
if ($autoreg == 1) {
145
- CourseManager::subscribe_user($user_id, $course_code, $status = STUDENT);
+ if (CourseManager::subscribe_user($user_id, $course_code, $status = STUDENT)) {
146
+ Session::write('is_allowed_in_course', true);
147
+ }
148
}
149
150
if (isset($_GET['action']) && $_GET['action'] == 'subscribe') {
0 commit comments