Class SloodleModuleMap

Description

The Sloodle map resource module class.

Located in /lib/modules/module_map.php (line 23)

SloodleModule
   |
   --SloodleModuleMap
Variable Summary
 object $cm
 object $sloodle_map
Method Summary
 SloodleModuleMap SloodleModuleMap ( &$_session)
 bool add_location ( $globalx,  $globaly,  $region,  $localx,  $localy,  $localz,  $name, [ $desc = ''])
 mixed get_course_id ()
 integer get_initial_zoom ()
 string get_intro ()
 array get_locations ()
 string get_name ()
 string get_type ()
 string get_type_full ()
 bool load (mixed $id)
 bool set_initial_coordinates ( $x,  $y)
Variables
object $cm = null (line 33)

Internal for Moodle only - course module instance.

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

  • access: private
object $sloodle_instance = null (line 41)

Internal only - Sloodle module instance database object.

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

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

Instance of the extra Map data from the sloodle_map table.

  • access: private

Inherited Variables

Inherited from SloodleModule

SloodleModule::$_session
Methods
Constructor SloodleModuleMap (line 56)

Constructor

SloodleModuleMap SloodleModuleMap ( &$_session)
  • &$_session
add_location (line 188)

Adds a new location to this map.

  • return: True if successful or false if not.
bool add_location ( $globalx,  $globaly,  $region,  $localx,  $localy,  $localz,  $name, [ $desc = ''])
  • $globalx
  • $globaly
  • $region
  • $localx
  • $localy
  • $localz
  • $name
  • $desc
check_allow_drag (line 149)

Checks if map dragging should be enabled.

bool check_allow_drag ()
check_pan_controls (line 140)

Checks if the pan controls should be visible.

bool check_pan_controls ()
check_zoom_controls (line 158)

Checks if the zoom controls should be visible.

bool check_zoom_controls ()
get_course_id (line 231)

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 240)

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_initial_coordinates (line 105)

Gets the initial coordinates of the map.

  • return: Numeric array (or list) containing X and Y floating point components, as global coordinates.
array get_initial_coordinates ()
get_initial_zoom (line 131)

Gets the initial zoom factor of the map (1 - 6).

integer get_initial_zoom ()
get_intro (line 222)

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_locations (line 169)

Returns a numeric array of locations associated with this map. Sorted by name.

Each element is an object direct from the sloodle_map_location table.

array get_locations ()
get_modification_time (line 249)

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 213)

Gets the name of this module instance.

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

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

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 269)

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.
load (line 68)

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.
set_initial_coordinates (line 116)

Sets the initial coordinates of the map.

  • return: True if successful, or false if not.
bool set_initial_coordinates ( $x,  $y)
  • $x
  • $y

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