claroline/claroline/inc/lib/course_user.lib.php File Reference

Go to the source code of this file.

Namespaces

namespace  CLUSR

Functions

 user_add_to_course ($userId, $courseCode, $admin=false, $tutor=false, $register_by_class=false)
 is_course_registration_allowed ($courseId)
 get_course_registration_key ($courseId)
 user_remove_from_course ($userId, $courseCodeList=array(), $force=false, $delTrackData=false, $unregister_by_class=false)
 user_remove_from_group ($userId, $courseId)
 user_delete_course_tracking_data ($userId, $courseId)
 user_set_course_properties ($userId, $courseId, $propertyList)
 user_set_course_manager ($status, $userId, $courseId)
 user_set_course_tutor ($status, $userId, $courseId)
 user_send_enroll_to_course_mail ($userId, $data, $course=null)
 course_user_get_properties ($userId, $courseId)
 course_user_html_form ($data, $courseId, $userId, $hiddenParam=null)
 claro_get_course_user_list ($courseId=NULL)

Function Documentation

claro_get_course_user_list ( courseId = NULL  ) 

return the list of user of the course in parameter. It use by default the current course identification

Parameters:
char $courseId course identication
Returns:
array of int

Definition at line 611 of file course_user.lib.php.

course_user_get_properties ( userId,
courseId 
)

get the main user information

Parameters:
integer $user_id user id as stored in the claroline main db
Returns:
array containing user info as 'lastName', 'firstName' 'email', 'role'

Definition at line 471 of file course_user.lib.php.

course_user_html_form ( data,
courseId,
userId,
hiddenParam = null 
)

Display form to edit course user properties

Author:
Mathieu Laurent <laurent@cerdecam.be>
Parameters:
$data array to fill the form
Todo:
$courseManagerChecked never used

Definition at line 519 of file course_user.lib.php.

get_course_registration_key ( courseId  ) 
Author:
Hugues Peeters <hugues.peeters@advalvas.be>
Parameters:
string $courseId - sys code of the course
Returns:
string registration key

Definition at line 129 of file course_user.lib.php.

is_course_registration_allowed ( courseId  ) 

Check if the registration flag of the given course is "open"

Author:
Hugues Peeters <hugues.peeters@advalvas.be>
Parameters:
string $courseId - sys code of the course
Returns:
boolean

Definition at line 109 of file course_user.lib.php.

user_add_to_course ( userId,
courseCode,
admin = false,
tutor = false,
register_by_class = false 
)

subscribe a specific user to a specific course

Author:
Hugues Peeters <hugues.peeters@advalvas.be>
Parameters:
int $user_id user ID from the course_user table
string $course_code course code from the cours table
Returns:
boolean TRUE if it succeeds, FALSE otherwise

Definition at line 32 of file course_user.lib.php.

user_delete_course_tracking_data ( userId,
courseId 
)

remove tracking user data from a course

Author:
Hugues Peeters <hugues.peeters@advalvas.be>
Parameters:
int $userId user ID from the course_user table
string $courseCode course code from the cours table
Returns:
boolean TRUE if removing suceed boolean FALSE otherwise.

Definition at line 307 of file course_user.lib.php.

user_remove_from_course ( userId,
courseCodeList = array(),
force = false,
delTrackData = false,
unregister_by_class = false 
)

unsubscribe a specific user from a specific course

Author:
Hugues Peeters <hugues.peeters@advalvas.be>
Parameters:
int $user_id user ID from the course_user table
mixed (string or array) $courseCodeList course sys code
boolean $force true possible to remove a course admin from course (default false)
boolean $deleteTrackingData (default false)
Returns:
boolean TRUE if unsubscribtion succeed boolean FALSE otherwise.

Definition at line 165 of file course_user.lib.php.

user_remove_from_group ( userId,
courseId 
)

remove a specific user from a course groups

TODO : move in group.lib.php

Author:
Hugues Peeters <hugues.peeters@advalvas.be>
Parameters:
int $userId user ID from the course_user table
string $courseCode course code from the cours table
Returns:
boolean TRUE if removing suceed boolean FALSE otherwise.

Definition at line 283 of file course_user.lib.php.

user_send_enroll_to_course_mail ( userId,
data,
course = null 
)

Send enroll to course succeded email to user

Author:
Mathieu Laurent <laurent@cerdecam.be>
Parameters:
$userId integer
$data array
Returns:
boolean

Definition at line 429 of file course_user.lib.php.

user_set_course_manager ( status,
userId,
courseId 
)

set or unset course manager status for a the user in a course

Author:
Hugues Peeters <hugues.peeters@advalvas.be>
Parameters:
boolean $status 'true' for course manager, 'false' for not
integer $user_id user ID from the course_user table
string $course_code course code from the cours table
Returns:
boolean TRUE if update succeed boolean FALSE otherwise.

Definition at line 393 of file course_user.lib.php.

user_set_course_properties ( userId,
courseId,
propertyList 
)

change the status of the user in a course

Author:
Hugues Peeters <hugues.peeters@advalvas.be>
Parameters:
$userId integer user ID from the course_user table
$courseId string course code from the cours table
$propertyList array should contain 'role', 'profileId', 'isCOurseManager', 'tutor'
Returns:
boolean TRUE if update succeed, FALSE otherwise.

Definition at line 330 of file course_user.lib.php.

user_set_course_tutor ( status,
userId,
courseId 
)

set or unset course tutor status for a user in a course

Author:
Hugues Peeters <hugues.peeters@advalvas.be>
Parameters:
boolean $status, 'true' for tutor status, 'false' for not ...
int $userId user ID from the course_user table
string $courseId course code from the cours table
Returns:
boolean TRUE if update succeed boolean FALSE otherwise.

Definition at line 412 of file course_user.lib.php.

Generated on Tue Jun 8 12:28:37 2010 for Claroline API by  doxygen 1.6.3