Stud.IP  5.4
CoreForum Class Reference
Inheritance diagram for CoreForum:
CorePlugin ForumModule StandardPlugin StudipModule

Public Member Functions

 getTabNavigation ($course_id)
 
 getIconNavigation ($course_id, $last_visit, $user_id=null)
 
 getInfoTemplate ($course_id)
 
 getLinkToThread ($issue_id)
 
 setThreadForIssue ($issue_id, $title, $content)
 
 getNumberOfPostingsForUser ($user_id, $seminar_id=null)
 
 getNumberOfPostingsForIssue ($issue_id)
 
 getNumberOfPostingsForSeminar ($seminar_id)
 
 getNumberOfPostings ()
 
 getEntryTableInfo ()
 
 getTopTenSeminars ()
 
 migrateUser ($user_from, $user_to)
 
 deleteContents ($seminar_id)
 
 getDump ($seminar_id)
 
 getMetadata ()
 
- Public Member Functions inherited from CorePlugin
 __construct ()
 
 getPluginId ()
 
 isEnabled ()
 
 getPluginName ()
 
 getPluginURL ()
 
 getPluginVersion ()
 
 getPluginDescription ()
 
 getDescriptionMode ()
 
 isHighlighted ()
 
 getHighlightText ()
 
 isCorePlugin ()
 
 isActivated ($context=null)
 
 isActivatableForContext (Range $context)
 
- Public Member Functions inherited from ForumModule
 getNumberOfPostingsForUser ($user_id)
 

Static Public Member Functions

static overviewDidClear ($notification, $user_id)
 
static removeAbosForUserAndCourse ($notification, $course_id, $user_id)
 
static getDescription ()
 
- Static Public Member Functions inherited from CorePlugin
static onEnable ($plugin_id)
 
static onDisable ($plugin_id)
 
static onActivation ($plugin_id, $range_id)
 
static onDeactivation ($plugin_id, $range_id)
 
static checkActivation ($range_id)
 

Additional Inherited Members

- Protected Attributes inherited from CorePlugin
 $plugin_info
 

Member Function Documentation

◆ deleteContents()

deleteContents (   $seminar_id)

Clean up everything for the passed seminar, because the seminar is beeing deleted.

Parameters
string$seminar_id

Implements ForumModule.

◆ getDescription()

static getDescription ( )
static

◆ getDump()

getDump (   $seminar_id)

Return a complete HTML-Dump of all entries in the forum-module. This is used for archiving purposes, so make it pretty!

Parameters
string$seminar_id
Returns
string a single-page HTML-view of all contents in one string

Implements ForumModule.

◆ getEntryTableInfo()

getEntryTableInfo ( )

This function is called whenever Stud.IP needs to directly operate on your entries-table. Your entries-table MUST have at least fields for a date (a change-date is preferred, but make-date will suffice), posting-content, seminar_id and user_id.

The returning array must have the following structure: Array ( 'table' => 'your_entry_table, 'content' => 'your_content_field', 'chdate' => 'your_date_field', 'seminar_id' => 'your_seminar_id_field', 'user_id' => 'your_user_id_field' )

Returns
array

Implements ForumModule.

◆ getIconNavigation()

getIconNavigation (   $course_id,
  $last_visit,
  $user_id = null 
)

Return a navigation object representing this plugin in the course overview table or return NULL if you want to display no icon for this plugin (or course). The navigation object's title will not be shown, only the image (and its associated attributes like 'title') and the URL are actually used.

By convention, new or changed plugin content is indicated by a different icon and a corresponding tooltip.

Parameters
string$course_idcourse or institute range id
int$last_visittime of user's last visit
string$user_idthe user to get the navigation for
Returns
object navigation item to render or NULL

Implements StudipModule.

◆ getInfoTemplate()

getInfoTemplate (   $course_id)

Return a template (an instance of the Flexi_Template class) to be rendered on the course summary page. Return NULL to render nothing for this plugin.

The template will automatically get a standard layout, which can be configured via attributes set on the template:

title title to display, defaults to plugin name icon_url icon for this plugin (if any) admin_url admin link for this plugin (if any) admin_title title for admin link (default: Administration)

Returns
object template object to render or NULL

Implements StudipModule.

◆ getLinkToThread()

getLinkToThread (   $issue_id)

Issues can be connected with an entry in a forum. This method has to return an url to the connected topic for the passed issue_id. If no topic is connected, it has to return "false"

Parameters
string$issue_id
Returns
mixed URL or false

Implements ForumModule.

◆ getMetadata()

getMetadata ( )

{Provides metadata like a descriptional text for this module that is shown on the course "+" page to inform users about what the module acutally does. Additionally, a URL can be specified.

Returns
array metadata containg description and/or url
}

Implements StudipModule.

◆ getNumberOfPostings()

getNumberOfPostings ( )

Return the number of all postings served by your module. The results are used for statistics.

Returns
int

Implements ForumModule.

◆ getNumberOfPostingsForIssue()

getNumberOfPostingsForIssue (   $issue_id)

Return the number of postings the connected topic contains for the issue with the passed id

Parameters
type$issue_id
Returns
int

Implements ForumModule.

◆ getNumberOfPostingsForSeminar()

getNumberOfPostingsForSeminar (   $seminar_id)

Return the number of postings for the passed seminar

Parameters
type$seminar_id
Returns
int

Implements ForumModule.

◆ getNumberOfPostingsForUser()

getNumberOfPostingsForUser (   $user_id,
  $seminar_id = null 
)

◆ getTabNavigation()

getTabNavigation (   $course_id)

Return a navigation object representing this plugin in the course overview table or return NULL if you want to display no icon for this plugin (or course). The navigation object's title will not be shown, only the image (and its associated attributes like 'title') and the URL are actually used.

By convention, new or changed plugin content is indicated by a different icon and a corresponding tooltip.

Parameters
string$course_idcourse or institute range id
Returns
array navigation item to render or NULL

Implements StudipModule.

◆ getTopTenSeminars()

getTopTenSeminars ( )

The caller expects an array of the ten seminars with the most postings in your module.

Return an array of the following structure: Array ( Array ( 'seminar_id' => 'display' => 'count' => ) )

Returns
array

Implements ForumModule.

◆ migrateUser()

migrateUser (   $user_from,
  $user_to 
)

Is called when the data of a user is moved to another user. Update all user_ids with the passed new one.

Parameters
string$user_fromthe user_id of the user who has the data
string$user_tothe user_id of the user who shall receive the data

Implements ForumModule.

◆ overviewDidClear()

static overviewDidClear (   $notification,
  $user_id 
)
static

This method is called, whenever an user clicked to clear the visit timestamps and set everything as visited

Parameters
object$notification
string$user_id

◆ removeAbosForUserAndCourse()

static removeAbosForUserAndCourse (   $notification,
  $course_id,
  $user_id 
)
static

This method is called whenever a user is removed from a course and thus the forum abos will be removed.

Parameters
object$notification
string$course_id
string$user_id

◆ setThreadForIssue()

setThreadForIssue (   $issue_id,
  $title,
  $content 
)

This method is called in case of an creation OR an update of an issue. Normally one would update the title and the content of the linked topic when called

Parameters
string$issue_id
string$titlethe title of the issue
string$contentthe description of the issue

Implements ForumModule.


The documentation for this class was generated from the following file: