Class SloodleModulePresenter

Description

The Sloodle presenter module class.

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

SloodleModule
   |
   --SloodleModulePresenter
Variable Summary
 object $cm
 object $presenter
Method Summary
 SloodleModulePresenter SloodleModulePresenter ( &$_session)
 True add_entry (string $source, string $type, string $name, [integer $position = -1])
 void delete_entry (int $id)
 True edit_entry (int $id, string $source, string $type, string $name, [integer $position = -1])
 mixed get_course_id ()
 string get_intro ()
 string get_name ()
 Array get_slides ()
 string get_type ()
 string get_type_full ()
 bool load (mixed $id)
 void move_entry (int $id, bool $forward)
 void relocate_entry (int $id, int $pos)
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 $presenter = null (line 49)

Internal only - a database objects representing the Presenter itself.

Corresponds to one record from the Moodle 'mdl_sloodle_presenter' 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

Inherited Variables

Inherited from SloodleModule

SloodleModule::$_session
Methods
Constructor SloodleModulePresenter (line 58)

Constructor

SloodleModulePresenter SloodleModulePresenter ( &$_session)
  • &$_session
add_entry (line 168)

Adds a new entry to the presentation.

  • return: if successful, or false on failure.
True add_entry (string $source, string $type, string $name, [integer $position = -1])
  • string $source: A string containing the source address -- must start with http for absolute URLs
  • string $type: Name of the type of source, e.g. "web", "image", or "video"
  • string $name: Name of the slide
  • integer $position: Integer indicating the position of the new entry. If negative, then it is placed last in the presentation.
delete_entry (line 233)

Deletes the identified entry by ID.

Only works if the entry is part of this presentation.

void delete_entry (int $id)
  • int $id: The ID of an entry record to delete
edit_entry (line 202)

Edits an existing entry in the presentation.

  • return: if successful, or false on failure.
True edit_entry (int $id, string $source, string $type, string $name, [integer $position = -1])
  • int $id: The ID of the entry in the database.
  • string $source: A string containing the source address -- must start with http for absolute URLs
  • string $type: Name of the type of source, e.g. "web", "image", or "video"
  • string $name: Name of the slide
  • integer $position: Integer indicating the desired position of the entry. If negative, then its position is left unchanged.
get_course_id (line 352)

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

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_entry_urls (line 107)

Gets an array of absolute URLs to images in this slideshow, all correctly ordered.

  • return: numeric array, each element associates an entry ID to a numeric array of URL string, the name of the source type, and the name of the slide.
2d get_entry_urls ()
get_frame_height (line 323)

Gets the height of the Presenter frame (for viewing in Moodle).

  • return: Height of the Presenter frame.
int get_frame_height ()
get_frame_width (line 314)

Gets the width of the Presenter frame (for viewing in Moodle).

  • return: Width of the Presenter frame.
int get_frame_width ()
get_intro (line 343)

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

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

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_slides (line 127)

Gets an ordered associative array of slides in presentation order.

  • return: associating slide IDs to SloodlePresenterSlide objects if successful, or false if not.
Array get_slides ()
get_type (line 380)

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

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

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.
move_entry (line 247)

Moves the ID'd entry forward or back in the presentation ordering.

Only works if the entry is part of this presentation.

void move_entry (int $id, bool $forward)
  • int $id: The ID of the entry to move.
  • bool $forward: TRUE to move the entry forward (closer to the beginning) or FALSE to push it back (closer to the end)
relocate_entry (line 272)

Relocates the identified entry to the specified position in the presentation.

Positions count from 1 upwards. If an entry already exists in that location, then the existing entry is pushed to the next position.

void relocate_entry (int $id, int $pos)
  • int $id: The ID of the entry to relocate
  • int $pos: The position in the presentation to move the slide to
validate_ordering (line 295)

Validates the ordering value of all entries in the presenter.

Gives each record an ordering value from 10 upwards, incrementing by 10 each time.

void validate_ordering ()

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