Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Class: renderer  - X-Ref

A custom renderer class that extends the plugin_renderer_base and is used by the assign module.

assign_files(\context $context, $userid, $filearea, $component, $course = null, $coursemodule = null)   X-Ref
Rendering assignment files

return: string
param: \context $context
param: int $userid
param: string $filearea
param: string $component
param: stdClass $course
param: stdClass $coursemodule

render_assign_files(\assign_files $tree)   X-Ref
Rendering assignment files

return: string
param: \assign_files $tree

add_table_row_tuple(\html_table $table, $first, $second, $firstattributes = [],$secondattributes = [])   X-Ref
Utility function to add a row of data to a table with 2 columns where the first column is the table's header.
Modified the table param and does not return a value.

return: void
param: \html_table $table The table to append the row of data to
param: string $first The first column text
param: string $second The second column text
param: array $firstattributes The first column attributes (optional)
param: array $secondattributes The second column attributes (optional)

render_assign_gradingmessage(\assign_gradingmessage $result)   X-Ref
Render a grading message notification

return: string
param: \assign_gradingmessage $result The result to render

render_assign_form(\assign_form $form)   X-Ref
Render the generic form

return: string
param: \assign_form $form The form to render

render_assign_user_summary(\assign_user_summary $summary)   X-Ref
Render the user summary

return: string
param: \assign_user_summary $summary The user summary to render

render_assign_submit_for_grading_page($page)   X-Ref
Render the submit for grading page

return: string
param: \assign_submit_for_grading_page $page

render_footer()   X-Ref
Page is done - render the footer.

return: void

render_assign_header(assign_header $header)   X-Ref
Render the header.

return: string
param: assign_header $header

render_assign_plugin_header(\assign_plugin_header $header)   X-Ref
Render the header for an individual plugin.

return: string
param: \assign_plugin_header $header

render_assign_grading_summary(\assign_grading_summary $summary)   X-Ref
Render a table containing the current status of the grading process.

return: string
param: \assign_grading_summary $summary

render_assign_feedback_status(\assign_feedback_status $status)   X-Ref
Render a table containing all the current grades and feedback.

return: string
param: \assign_feedback_status $status

render_assign_submission_status_compact(\assign_submission_status_compact $status)   X-Ref
Render a compact view of the current status of the submission.

return: string
param: \assign_submission_status_compact $status

render_assign_submission_status(assign_submission_status $status)   X-Ref
Render a table containing the current status of the submission.

return: string
param: assign_submission_status $status

render_assign_attempt_history_chooser(\assign_attempt_history_chooser $history)   X-Ref
Output the attempt history chooser for this assignment

return: string
param: \assign_attempt_history_chooser $history

render_assign_attempt_history(\assign_attempt_history $history)   X-Ref
Output the attempt history for this assignment

return: string
param: \assign_attempt_history $history

render_assign_submission_plugin_submission(\assign_submission_plugin_submission $submissionplugin)   X-Ref
Render a submission plugin submission

return: string
param: \assign_submission_plugin_submission $submissionplugin

render_assign_grading_table(\assign_grading_table $table)   X-Ref
Render the grading table.

return: string
param: \assign_grading_table $table

render_assign_feedback_plugin_feedback(\assign_feedback_plugin_feedback $feedbackplugin)   X-Ref
Render a feedback plugin feedback

return: string
param: \assign_feedback_plugin_feedback $feedbackplugin

render_assign_course_index_summary(\assign_course_index_summary $indexsummary)   X-Ref
Render a course index summary

return: string
param: \assign_course_index_summary $indexsummary

get_time_remaining(\mod_assign\output\assign_submission_status $status)   X-Ref
Get the time remaining for a submission.

return: array The first element is the time remaining as a human readable
param: \mod_assign\output\assign_submission_status $status

htmllize_tree(\assign_files $tree, $dir)   X-Ref
Internal function - creates htmls structure suitable for YUI tree.

return: string
param: \assign_files $tree
param: array $dir

flexible_table(\flexible_table $table, $rowsperpage, $displaylinks)   X-Ref
Helper method dealing with the fact we can not just fetch the output of flexible_table

return: string HTML
param: \flexible_table $table The table to render
param: int $rowsperpage How many assignments to render in a page
param: bool $displaylinks - Whether to render links in the table

moodleform(\moodleform $mform)   X-Ref
Helper method dealing with the fact we can not just fetch the output of moodleforms

return: string HTML
param: \moodleform $mform

render_grading_app(grading_app $app)   X-Ref
Defer to template.

param: grading_app $app - All the data to render the grading app.

submission_actionmenu(\mod_assign\output\actionmenu $actionmenu)   X-Ref
Renders the submission action menu.

return: string Rendered action menu.
param: \mod_assign\output\actionmenu $actionmenu The actionmenu

render_user_submission_actionmenu(\mod_assign\output\user_submission_actionmenu $actionmenu)   X-Ref
Renders the user submission action menu.

return: string The rendered action menu.
param: \mod_assign\output\user_submission_actionmenu $actionmenu The actionmenu

render_override_actionmenu(\mod_assign\output\override_actionmenu $actionmenu)   X-Ref
Renders the override action menu.

return: string The rendered override action menu.
param: \mod_assign\output\override_actionmenu $actionmenu The actionmenu

render_grading_actionmenu(\mod_assign\output\grading_actionmenu $actionmenu)   X-Ref
Renders the grading action menu.

return: string The rendered grading action menu.
param: \mod_assign\output\grading_actionmenu $actionmenu The actionmenu

format_activity_text($assign, $cmid)   X-Ref
Formats activity intro text.

return: string
param: object $assign Instance of assign.
param: int $cmid Course module ID.