|
|
|
@ -37,9 +37,9 @@ class CourseManager |
|
|
|
|
/** |
|
|
|
|
* Creates a course |
|
|
|
|
* @param array with the columns in the main.course table |
|
|
|
|
* @param mixed false if the course was not created, array with the course info |
|
|
|
|
* @return mixed false if the course was not created, array with the course info |
|
|
|
|
*/ |
|
|
|
|
static function create_course($params) |
|
|
|
|
public static function create_course($params) |
|
|
|
|
{ |
|
|
|
|
global $_configuration; |
|
|
|
|
// Check portal limits |
|
|
|
@ -105,7 +105,8 @@ class CourseManager |
|
|
|
|
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University |
|
|
|
|
* @assert ('') === false |
|
|
|
|
*/ |
|
|
|
|
public static function get_course_information($course_code) { |
|
|
|
|
public static function get_course_information($course_code) |
|
|
|
|
{ |
|
|
|
|
return Database::fetch_array(Database::query( |
|
|
|
|
"SELECT *, id as real_id FROM ".Database::get_main_table(TABLE_MAIN_COURSE)." |
|
|
|
|
WHERE code='".Database::escape_string($course_code)."'"),'ASSOC' |
|
|
|
@ -636,6 +637,7 @@ class CourseManager |
|
|
|
|
/** |
|
|
|
|
* Lists all virtual courses |
|
|
|
|
* @return array Course info (course code => details) of all virtual courses on the platform |
|
|
|
|
* @deprecated virtual course feature is not supported |
|
|
|
|
*/ |
|
|
|
|
public static function get_virtual_course_list() { |
|
|
|
|
$sql_result = Database::query("SELECT * FROM ".Database::get_main_table(TABLE_MAIN_COURSE)." WHERE target_course_code IS NOT NULL"); |
|
|
|
@ -1649,6 +1651,7 @@ class CourseManager |
|
|
|
|
* @param $real_course_code, the id (char) of the real course |
|
|
|
|
* |
|
|
|
|
* @return array of course info arrays |
|
|
|
|
* @deprecated virtual course feature is not supported |
|
|
|
|
*/ |
|
|
|
|
public static function get_list_of_virtual_courses_for_specific_user_and_real_course($user_id, $course_code) { |
|
|
|
|
$result_array = array(); |
|
|
|
@ -1723,6 +1726,7 @@ class CourseManager |
|
|
|
|
* @param string Course language |
|
|
|
|
* @param string Course category |
|
|
|
|
* @return bool True on success, false on error |
|
|
|
|
* @deprecated virtual course feature is not supported |
|
|
|
|
*/ |
|
|
|
|
public static function attempt_create_virtual_course($real_course_code, $course_title, $wanted_course_code, $course_language, $course_category) { |
|
|
|
|
//better: create parameter list, check the entire list, when false display errormessage |
|
|
|
@ -1751,6 +1755,7 @@ class CourseManager |
|
|
|
|
* @param string Course category |
|
|
|
|
* @return true if the course creation succeeded, false otherwise |
|
|
|
|
* @todo research: expiration date of a course |
|
|
|
|
* @deprecated virtual course feature is not supported |
|
|
|
|
*/ |
|
|
|
|
public static function create_virtual_course($real_course_code, $course_title, $wanted_course_code, $course_language, $course_category) { |
|
|
|
|
global $firstExpirationDelay; |
|
|
|
|