Class SloodleModuleBlog

Description

The Sloodle blog module class.

Located in /lib/modules/module_blog.php (line 33)

SloodleModule
   |
   --SloodleModuleBlog
Method Summary
 SloodleModuleBlog SloodleModuleBlog ( &$_session)
 bool add_entry (string $subject, string $body, [string $visibility = ''])
 mixed get_course_id ()
 string get_intro ()
 string get_name ()
 SloodleBlogPost|bool get_post (mixed $id)
 string get_type ()
 string get_type_full ()
 bool is_enabled ()
 bool user_can_write ()
Variables

Inherited Variables

Inherited from SloodleModule

SloodleModule::$_session
Methods
Constructor SloodleModuleBlog (line 45)

Constructor

SloodleModuleBlog SloodleModuleBlog ( &$_session)
  • &$_session
add_entry (line 82)

Attempts to write a new blog entry to the database, attributed to the user currently loaded in the SloodleSession.

All of the text provided in parameters _must_ be database-safe!

  • return: True if successful or false otherwise
bool add_entry (string $subject, string $body, [string $visibility = ''])
  • string $subject: The subject line of the post
  • string $body: The body of the post
  • string $visibility: The visibility identifier of the post (defaults to site level)
get_course_id (line 209)

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

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

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_latest_public_post (line 139)

Gets the most recent public post.

SloodleBlogPost|bool get_latest_public_post ()
get_latest_site_post (line 153)

Gets the most recent public/site level post.

SloodleBlogPost|bool get_latest_site_post ()
get_latest_user_post (line 168)

Gets the most recent post by a particular user, regardless of visibility.

SloodleBlogPost|bool get_latest_user_post ([SloodleUser $user = null])
get_modification_time (line 227)

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

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_post (line 125)

Gets the identified post.

SloodleBlogPost|bool get_post (mixed $id)
  • mixed $id: The unique site-wide identifier of the post.
get_type (line 237)

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

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_enabled (line 56)

Checks if blogging is enabled on the site.

  • return: True if blogging is enabled, or false otherwise
bool is_enabled ()
user_can_write (line 68)

Checks if the currently logged-in user has permission to create blog entries.

  • return: True if user has permission, or false otherwise
bool user_can_write ()

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 Mon, 07 Jul 2008 12:32:51 +0100 by phpDocumentor 1.4.0