SloodleModuleChoiceThe Sloodle choice module class.
Located in /lib/modules/module_choice.php (line 26)
SloodleModule | --SloodleModuleChoice
object
$cm
= null (line 36)
Internal for Moodle only - course module instance.
Corresponds to one record from the Moodle 'course_modules' table.
object
$moodle_choice_instance
= null (line 44)
Internal only - Moodle choice module instance database object.
Corresponds to one record from the Moodle 'choice' table.
int
$numunanswered
= 0 (line 51)
The number of (non-admin) users on the course who have not yet answered this choice.
array
$options
= array() (line 58)
The options available for this choice, as an associative array of IDs to SloodleChoiceOption objects.
Inherited from SloodleModule
SloodleModule::$_session
Constructor
Checks if users are allowed to re-select their answer in this choice.
Checks if results are to be shown.
(Some choices only allow results after the choice is closed).
Gets the identifier of the course this controller belongs to.
Gets the time at which this instance was created, or 0 if unknown.
Gets the intro description of this module instance, if available.
Gets the time at which this instance was last modified, or 0 if unknown.
Gets the name of this module instance.
Gets the number of people who have not yet answered the choice.
Counts all users on the course, including students and teachers.
Gets the short type name of this instance.
Gets the full type name of this instance, according to the current language pack, if available.
Note: should be overridden by sub-classes.
Determines if the choice has not opened yet.
Determines if the choice has already closed.
Determines if the choice is currently open.
Loads data from the database.
Note: even if the function fails, it may still have overwritten some or all existing data in the object.
Selects an option in this choice on behalf of the specified user.
Logs the user in to the VLE if necessary. If a general error occurs, FALSE will be returned. Otherwise, an integer status code will be returned. The following status codes are typical responses: * 10011 = added new choice selection * 10012 = updated existing choice selection * 10013 = user previously selected same option * -10011 = User already made a selection, and re-selection is not allowed * -10012 = max number of selections for this option already made * -10013 = choice is not yet open * -10014 = choice is already closed
Inherited From SloodleModule
SloodleModule::SloodleModule()
SloodleModule::get_course_id()
SloodleModule::get_creation_time()
SloodleModule::get_intro()
SloodleModule::get_modification_time()
SloodleModule::get_name()
SloodleModule::get_type()
SloodleModule::get_type_full()
SloodleModule::load()
Documentation generated on Fri, 17 Jul 2009 11:01:58 +0100 by phpDocumentor 1.4.0