Class SloodleModuleSloodleObject

Description

The Sloodle Object assignment module class.

Located in /lib/modules/module_sloodleobject.php (line 30)

SloodleModule
   |
   --SloodleModuleSloodleObject
Variable Summary
 assignment_sloodleobject $assignment
 object $cm
Method Summary
 SloodleModuleSloodleObject SloodleModuleSloodleObject ( &$_session)
 mixed get_course_id ()
 string get_intro ()
 string get_name ()
 string get_type ()
 string get_type_full ()
 bool is_too_early ([int $timestamp = null])
 int is_too_late ([int $timestamp = null])
 bool load (mixed $id)
 bool submit (SloodleUser $user, string $obj_name, int $num_prims, string $primdrop_name, string $primdrop_uuid, string $primdrop_region, string $primdrop_pos)
 bool user_can_view (SloodleUser $user)
Variables
assignment_sloodleobject $assignment = null (line 55)

Internal only - the Moodle assignment structure.

  • access: private
object $cm = null (line 40)

Internal for Moodle only - course module instance.

Corresponds to one record from the Moodle 'course_modules' table.

  • access: private
object $moodle_assignment_instance = null (line 48)

Internal only - Moodle assignment module instance database object.

Corresponds to one record from the Moodle 'assignment' table.

  • access: private

Inherited Variables

Inherited from SloodleModule

SloodleModule::$_session
Methods
Constructor SloodleModuleSloodleObject (line 63)

Constructor

SloodleModuleSloodleObject SloodleModuleSloodleObject ( &$_session)
  • &$_session
get_course_id (line 257)

Gets the identifier of the course this controller belongs to.

  • return: Course identifier. Type depends on VLE. (In Moodle, it will be an integer).
mixed get_course_id ()

Redefinition of:
SloodleModule::get_course_id()
Gets the identifier of the course this controller belongs to.
get_creation_time (line 266)

Gets the time at which this instance was created, or 0 if unknown.

  • return: Timestamp
int get_creation_time ()

Redefinition of:
SloodleModule::get_creation_time()
Gets the time at which this instance was created, or 0 if unknown.
get_intro (line 248)

Gets the intro description of this module instance, if available.

  • return: The intro description of this controller
string get_intro ()

Redefinition of:
SloodleModule::get_intro()
Gets the intro description of this module instance, if available.
get_modification_time (line 275)

Gets the time at which this instance was last modified, or 0 if unknown.

  • return: Timestamp
int get_modification_time ()

Redefinition of:
SloodleModule::get_modification_time()
Gets the time at which this instance was last modified, or 0 if unknown.
get_name (line 239)

Gets the name of this module instance.

  • return: The name of this controller
string get_name ()

Redefinition of:
SloodleModule::get_name()
Gets the name of this module instance.
get_type (line 285)

Gets the short type name of this instance.

string get_type ()

Redefinition of:
SloodleModule::get_type()
Gets the short type name of this instance.
get_type_full (line 295)

Gets the full type name of this instance, according to the current language pack, if available.

Note: should be overridden by sub-classes.

  • return: Full type name if possible, or the short name otherwise.
string get_type_full ()

Redefinition of:
SloodleModule::get_type_full()
Gets the full type name of this instance, according to the current language pack, if available.
is_too_early (line 168)

Checks if an assignment submitted at the specified time would be too early for submission.

  • return: True if assignment would be too early, or false if it's OK.
bool is_too_early ([int $timestamp = null])
  • int $timestamp: A timestamp giving the time to check (if omitted, it defaults to the current timestamp)
is_too_late (line 183)

Checks if an assignment submitted at the specified time would be too late for submission.

  • return: 1 if assignment would be too late and cannot be accepted, 0 if it is OK, or -1 if it would be late but still accepted
int is_too_late ([int $timestamp = null])
  • int $timestamp: A timestamp giving the time to check (if omitted, it defaults to the current timestamp)
load (line 75)

Loads data from the database.

Note: even if the function fails, it may still have overwritten some or all existing data in the object.

  • return: True if successful, or false otherwise
bool load (mixed $id)
  • mixed $id: The site-wide unique identifier for all modules. Type depends on VLE. On Moodle, it is an integer course module identifier ('id' field of 'course_modules' table)

Redefinition of:
SloodleModule::load()
Loads data from the database.
resubmit_allowed (line 157)

Checks if re-submissions are permitted.

  • return: True if resubmissions are permitted, or false otherwise
bool resubmit_allowed ()
submit (line 215)

Add a new submission (or replace an existing one).

Ignores all submission checks, such as permissions and time.

  • return: True if successful, or false otherwise
bool submit (SloodleUser $user, string $obj_name, int $num_prims, string $primdrop_name, string $primdrop_uuid, string $primdrop_region, string $primdrop_pos)
  • SloodleUser $user: The user making the submission
  • string $obj_name: Name of the object being submitted
  • int $num_prims: Number of prims in the object being submitted
  • string $primdrop_name: Name of the PrimDrop being submitted to
  • string $primdrop_uuid: UUID of the PrimDrop being submitted to
  • string $primdrop_region: Region of the PrimDrop being submitted to
  • string $primdrop_pos: Position vector (<x,y,z>) of the PrimDrop being submitted to
user_can_submit (line 116)

Checks if the specified user is permitted to submit to this assignment.

(Note: this only checks permissions, and no other settings, such as submission times).

  • return: True if the user has permission to submit to this assignment, or false otherwise.
bool user_can_submit (SloodleUser $user)
user_can_view (line 130)

Checks if the specified user is permitted to view submissions to this assignment.

  • return: True if the user has permission to view the submissions, or false otherwise.
bool user_can_view (SloodleUser $user)
user_has_submitted (line 144)

Checks if the specified user has submitted to this assignment already.

  • return: True if the user has previously attempted this assignment, or false otherwise
bool user_has_submitted (SloodleUser $user)

Inherited Methods

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:02:07 +0100 by phpDocumentor 1.4.0