dokeos-library
[ class tree: dokeos-library ] [ index: dokeos-library ] [ all elements ]

Class: ClassManager

Source Location: /main/inc/lib/classmanager.lib.php

Class Overview


This library contains some functions for class-management.


Author(s):

  • Bart Mollet

Methods



Class Details

[line 37]
This library contains some functions for class-management.



Tags:

author:  Bart Mollet


[ Top ]


Class Methods


method add_user [line 126]

void add_user( int $user_id, int $class_id)

Add a user to a class. If the class is subscribed to a course, the new user will also be subscribed to that course.



Parameters:

int   $user_id   The user id
int   $class_id   The class id

[ Top ]

method class_name_exists [line 77]

void class_name_exists( string $name)

Check if a classname is allready in use



Parameters:

string   $name  

[ Top ]

method create_class [line 66]

void create_class( string $name)

Create a class



Parameters:

string   $name  

[ Top ]

method delete_class [line 90]

void delete_class( int $class_id)

Delete a class



Tags:

todo:  Add option to unsubscribe class-members from the courses where the class was subscibed to


Parameters:

int   $class_id  

[ Top ]

method get_classes_in_course [line 247]

array get_classes_in_course( string $course_code)

Get all classes subscribed in a course



Tags:

return:  An array with all classes (keys: 'id','code','name')


Parameters:

string   $course_code  

[ Top ]

method get_class_id [line 234]

void get_class_id( string $name)

Get the class-id



Parameters:

string   $name   The class name

[ Top ]

method get_class_info [line 44]

void get_class_info( $class_id)

Get class information



Parameters:

   $class_id  

[ Top ]

method get_courses [line 170]

array get_courses( int $class_id)

Get all courses in which a class is subscribed



Parameters:

int   $class_id  

[ Top ]

method get_users [line 107]

array get_users( int $class_id)

Get all users from a class



Parameters:

int   $class_id  

[ Top ]

method set_name [line 56]

void set_name( string $name, int $class_id)

Change the name of a class



Parameters:

string   $name   The new name
int   $class_id   The class id

[ Top ]

method subscribe_to_course [line 188]

void subscribe_to_course( int $class_id, string $course_code)

Subscribe all members of a class to a course



Parameters:

int   $class_id   The class id
string   $course_code   The course code

[ Top ]

method unsubscribe_from_course [line 209]

void unsubscribe_from_course( int $class_id, string $course_code)

Unsubscribe a class from a course.

Only students are unsubscribed. If a user is member of 2 classes which are both subscribed to the course, the user stays in the course.




Parameters:

int   $class_id   The class id
string   $course_code   The course code

[ Top ]

method unsubscribe_user [line 143]

void unsubscribe_user( int $user_id, int $class_id)

Unsubscribe a user from a class. If the class is also subscribed in a

course, the user will be unsubscribed from that course




Parameters:

int   $user_id   The user id
int   $class_id   The class id

[ Top ]


Documentation generated on Thu, 12 Jun 2008 13:07:25 -0500 by phpDocumentor 1.4.1