Differences Between: [Versions 310 and 400] [Versions 311 and 400] [Versions 39 and 400] [Versions 400 and 402] [Versions 400 and 403]
Tour helper.
Copyright: | 2016 Andrew Nicols <andrew@nicols.co.uk> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 629 lines (19 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
helper:: (32 methods):
get_edit_step_link()
get_move_tour_link()
get_move_step_link()
get_new_step_link()
get_view_tour_link()
get_reset_tour_for_all_link()
get_edit_tour_link()
get_import_tour_link()
get_export_tour_link()
get_duplicate_tour_link()
get_delete_tour_link()
get_list_tour_link()
format_icon_link()
get_filler_icon()
get_delete_step_link()
render_tourname_inplace_editable()
render_tourdescription_inplace_editable()
render_tourenabled_inplace_editable()
render_stepname_inplace_editable()
get_tours()
get_tour()
get_tour_from_sortorder()
count_tours()
reset_tour_sortorder()
get_steps()
get_step()
get_step_from_sortorder()
bootstrap()
get_all_filters()
get_all_clientside_filters()
get_string_from_input()
is_language_string_from_input()
get_edit_step_link($tourid, $stepid = null, $targettype = null) X-Ref |
Get the link to edit the step. If no stepid is specified, then a link to create a new step is provided. The $targettype must be specified in this case. return: moodle_url param: int $tourid The tour that the step belongs to. param: int $stepid The step ID. param: int $targettype The type of step. |
get_move_tour_link($tourid, $direction = self::MOVE_DOWN) X-Ref |
Get the link to move the tour. return: moodle_url param: int $tourid The tour ID. param: int $direction The direction to move in |
get_move_step_link($stepid, $direction = self::MOVE_DOWN) X-Ref |
Get the link to move the step. return: moodle_url param: int $stepid The step ID. param: int $direction The direction to move in |
get_new_step_link($tourid, $targettype = null) X-Ref |
Get the link ot create a new step. return: moodle_url The required URL. param: int $tourid The ID of the tour to attach this step to. param: int $targettype The type of target. |
get_view_tour_link($tourid) X-Ref |
Get the link used to view the tour. return: moodle_url The URL. param: int $tourid The ID of the tour to display. |
get_reset_tour_for_all_link($tourid) X-Ref |
Get the link used to reset the tour state for all users. return: moodle_url The URL. param: int $tourid The ID of the tour to display. |
get_edit_tour_link($tourid = null) X-Ref |
Get the link used to edit the tour. return: moodle_url The URL. param: int $tourid The ID of the tour to edit. |
get_import_tour_link() X-Ref |
Get the link used to import the tour. return: moodle_url The URL. |
get_export_tour_link($tourid) X-Ref |
Get the link used to export the tour. return: moodle_url The URL. param: int $tourid The ID of the tour to export. |
get_duplicate_tour_link($tourid) X-Ref |
Get the link used to duplicate the tour. return: moodle_url The URL. param: int $tourid The ID of the tour to duplicate. |
get_delete_tour_link($tourid) X-Ref |
Get the link used to delete the tour. return: moodle_url The URL. param: int $tourid The ID of the tour to delete. |
get_list_tour_link() X-Ref |
Get the link for listing tours. return: moodle_url The URL. |
format_icon_link($url, $icon, $alt, $iconcomponent = 'moodle', $options = array() X-Ref |
Get a filler icon for display in the actions column of a table. return: string param: string $url The URL for the icon. param: string $icon The icon identifier. param: string $alt The alt text for the icon. param: string $iconcomponent The icon component. param: array $options Display options. |
get_filler_icon($options = array() X-Ref |
Get a filler icon for display in the actions column of a table. return: string param: array $options Display options. |
get_delete_step_link($stepid) X-Ref |
Get the link for deleting steps. return: moodle_url The URL. param: int $stepid The ID of the step to display. |
render_tourname_inplace_editable(tour $tour) X-Ref |
Render the inplace editable used to edit the tour name. return: inplace_editable param: tour $tour The tour to edit. |
render_tourdescription_inplace_editable(tour $tour) X-Ref |
Render the inplace editable used to edit the tour description. return: inplace_editable param: tour $tour The tour to edit. |
render_tourenabled_inplace_editable(tour $tour) X-Ref |
Render the inplace editable used to edit the tour enable state. return: inplace_editable param: tour $tour The tour to edit. |
render_stepname_inplace_editable(step $step) X-Ref |
Render the inplace editable used to edit the step name. return: inplace_editable param: step $step The step to edit. |
get_tours() X-Ref |
Get all of the tours. return: stdClass[] |
get_tour($tourid) X-Ref |
Get the specified tour. return: tour param: int $tourid The tour that the step belongs to. |
get_tour_from_sortorder($sortorder) X-Ref |
Fetch the tour with the specified sortorder. return: tour param: int $sortorder The sortorder of the tour. |
count_tours() X-Ref |
Return the count of all tours. return: int |
reset_tour_sortorder() X-Ref |
Reset the sortorder for all tours. |
get_steps($tourid) X-Ref |
Get all of the steps in the tour. return: step[] param: int $tourid The tour that the step belongs to. |
get_step($stepid) X-Ref |
Fetch the specified step. return: step param: int $stepid The id of the step to fetch. |
get_step_from_sortorder($tourid, $sortorder) X-Ref |
Fetch the step with the specified sortorder. return: step param: int $tourid The tour that the step belongs to. param: int $sortorder The sortorder of the step. |
bootstrap() X-Ref |
Handle addition of the tour into the current page. |
get_all_filters() X-Ref |
Get a list of all possible filters. return: array |
get_all_clientside_filters() X-Ref |
Get a list of all clientside filters. return: array |
get_string_from_input(string $content) X-Ref |
Attempt to fetch any matching langstring if the content is in the format identifier,component. return: string Processed content, any langstring will be converted to translated text param: string $content Step's content or Tour's name or Tour's description |
is_language_string_from_input(string $string) X-Ref |
Check if the given string contains any matching langstring. return: bool param: string $string |