if (isset($_POST['create_course_category']) && isset($_POST['title_course_category']) && strlen(trim($_POST['title_course_category'])) > 0) { if ($ctok == $_POST['sec_token']) { $courses_controller->add_course_category($_POST['title_course_category']); } } // search courses if (isset($_REQUEST['search_course'])) { //echo "<p><strong>".get_lang('SearchResultsFor')." ".api_htmlentities($_POST['search_term'], ENT_QUOTES, api_get_system_encoding())."</strong><br />"; if ($ctok == $_REQUEST['sec_token']) { $courses_controller->search_courses($_REQUEST['search_term'], null, null, null, $limit); } } // Subscribe user to course if (isset($_REQUEST['subscribe_course'])) { if ($ctok == $_GET['sec_token']) { $courses_controller->subscribe_user($_GET['subscribe_course'], $_GET['search_term'], $_GET['category_code']); } } // We are unsubscribing from a course (=Unsubscribe from course). if (isset($_GET['unsubscribe'])) { if ($ctok == $_GET['sec_token']) { $courses_controller->unsubscribe_user_from_course($_GET['unsubscribe'], $_GET['search_term'], $_GET['category_code']); //$message = remove_user_from_course($_user['user_id'], $_POST['unsubscribe']); } } // We are unsubscribing from a course (=Unsubscribe from course). if (isset($_POST['unsubscribe'])) { if ($ctok == $_POST['sec_token']) { $courses_controller->unsubscribe_user_from_course($_POST['unsubscribe']); //$message = remove_user_from_course($_user['user_id'], $_POST['unsubscribe']); }
// We are creating a new user defined course category (= Create Course Category). if (isset($_POST['create_course_category']) && isset($_POST['title_course_category']) && strlen(trim($_POST['title_course_category'])) > 0) { if ($ctok == $_POST['sec_token']) { $courses_controller->add_course_category($_POST['title_course_category']); } } // search courses if (isset($_REQUEST['search_course'])) { if ($ctok == $_REQUEST['sec_token']) { $courses_controller->search_courses($_REQUEST['search_term'], null, null, null, $limit); } } // Subscribe user to course if (isset($_REQUEST['subscribe_course'])) { if ($ctok == $_GET['sec_token']) { $courses_controller->subscribe_user($_GET['subscribe_course'], $_GET['search_term'], $categoryCode); } } // We are unsubscribing from a course (=Unsubscribe from course). if (isset($_GET['unsubscribe'])) { $search_term = isset($_GET['search_term']) ? $_GET['search_term'] : null; if ($ctok == $_GET['sec_token']) { $courses_controller->unsubscribe_user_from_course($_GET['unsubscribe'], $search_term, $categoryCode); //$message = remove_user_from_course($_user['user_id'], $_POST['unsubscribe']); } } // We are unsubscribing from a course (=Unsubscribe from course). if (isset($_POST['unsubscribe'])) { if ($ctok == $_POST['sec_token']) { $courses_controller->unsubscribe_user_from_course($_POST['unsubscribe']); //$message = remove_user_from_course($_user['user_id'], $_POST['unsubscribe']);