1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- require_once(dirname(__FILE__).'/../inc/global.inc.php');
- $libpath = api_get_path(LIBRARY_PATH);
- require_once(dirname(__FILE__).'/cm_webservice.php');
- class WSCMCourses extends WSCM
- {
- public function get_courses_code($username, $password) {
- if($this->verifyUserPass($username, $password) == "valid") {
- $user_id = UserManager::get_user_id_from_username($username);
- $listOfCourses = UserManager::get_personal_session_course_list($user_id);
- $courses_id = "#";
- foreach ($listOfCourses as $course){
- $courses_id .= $course['code']."#";
- }
- return $courses_id;
- } else {
- return get_lang('InvalidId');
- }
- }
- public function get_course_title($username, $password, $course_code)
- {
- if($this->verifyUserPass($username, $password) == "valid")
- {
- $course_info = CourseManager::get_course_information($course_code);
- return $course_info['title'];
- } else
- return get_lang('InvalidId');
- }
- }
|