Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

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

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

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

param: \assign_files $tree
return: string

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.

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)
return: void

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

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

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

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

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

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

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

param: \assign_submit_for_grading_page $page
return: string

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

return: void

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

param: assign_header $header
return: string

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

param: \assign_plugin_header $header
return: string

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

param: \assign_grading_summary $summary
return: string

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

param: \assign_feedback_status $status
return: string

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

param: \assign_submission_status_compact $status
return: string

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

param: assign_submission_status $status
return: string

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

param: \assign_attempt_history_chooser $history
return: string

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

param: \assign_attempt_history $history
return: string

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

param: \assign_submission_plugin_submission $submissionplugin
return: string

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

param: \assign_grading_table $table
return: string

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

param: \assign_feedback_plugin_feedback $feedbackplugin
return: string

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

param: \assign_course_index_summary $indexsummary
return: string

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

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

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

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

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

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
return: string HTML

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

param: \moodleform $mform
return: string HTML

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.

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

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

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

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

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

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

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

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

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