Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Class: mod_workshop_renderer  - X-Ref

Workshop module renderer class

render_workshop_message(workshop_message $message)   X-Ref
Renders workshop message

param: workshop_message $message to display
return: string html code

render_workshop_submission(workshop_submission $submission)   X-Ref
Renders full workshop submission

param: workshop_submission $submission
return: string HTML

render_workshop_submission_summary(workshop_submission_summary $summary)   X-Ref
Renders short summary of the submission

param: workshop_submission_summary $summary
return: string text to be echo'ed

render_workshop_example_submission(workshop_example_submission $example)   X-Ref
Renders full workshop example submission

param: workshop_example_submission $example
return: string HTML

render_workshop_example_submission_summary(workshop_example_submission_summary $summary)   X-Ref
Renders short summary of the example submission

param: workshop_example_submission_summary $summary
return: string text to be echo'ed

render_workshop_user_plan(workshop_user_plan $plan)   X-Ref
Renders the user plannner tool

param: workshop_user_plan $plan prepared for the user
return: string html code to be displayed

render_workshop_allocation_result(workshop_allocation_result $result)   X-Ref
Renders the result of the submissions allocation process

param: workshop_allocation_result $result as returned by the allocator's init() method
return: string HTML to be echoed

render_workshop_grading_report(workshop_grading_report $gradingreport)   X-Ref
Renders the workshop grading report

param: workshop_grading_report $gradingreport
return: string html code

render_workshop_feedback_author(workshop_feedback_author $feedback)   X-Ref
Renders the feedback for the author of the submission

param: workshop_feedback_author $feedback
return: string HTML

render_workshop_feedback_reviewer(workshop_feedback_reviewer $feedback)   X-Ref
Renders the feedback for the reviewer of the submission

param: workshop_feedback_reviewer $feedback
return: string HTML

helper_render_feedback($feedback)   X-Ref
Helper method to rendering feedback

param: workshop_feedback_author|workshop_feedback_reviewer $feedback
return: string HTML

render_workshop_assessment(workshop_assessment $assessment)   X-Ref
Renders the full assessment

param: workshop_assessment $assessment
return: string HTML

render_workshop_example_assessment(workshop_example_assessment $assessment)   X-Ref
Renders the assessment of an example submission

param: workshop_example_assessment $assessment
return: string HTML

render_workshop_example_reference_assessment(workshop_example_reference_assessment $assessment)   X-Ref
Renders the reference assessment of an example submission

param: workshop_example_reference_assessment $assessment
return: string HTML

overall_feedback(workshop_assessment $assessment)   X-Ref
Renders the overall feedback for the author of the submission

param: workshop_assessment $assessment
return: string HTML

perpage_selector($current=10)   X-Ref
Renders a perpage selector for workshop listings

The scripts using this have to define the $PAGE->url prior to calling this
and deal with eventually submitted value themselves.

param: int $current current value of the perpage parameter
return: string HTML

render_workshop_final_grades(workshop_final_grades $grades)   X-Ref
Renders the user's final grades

param: workshop_final_grades $grades with the info about grades in the gradebook
return: string HTML

helper_submission_attachments($submissionid, $format = 'html')   X-Ref
Renders a list of files attached to the submission

If format==html, then format a html string. If format==text, then format a text-only string.
Otherwise, returns html for non-images and html to display the image inline.

param: int $submissionid submission identifier
param: string format the format of the returned string - html|text
return: string formatted text to be echoed

helper_user_plan_tasks(array $tasks)   X-Ref
Renders the tasks for the single phase in the user plan

param: stdClass $tasks
return: string html code

helper_sortable_heading($text, $sortid=null, $sortby=null, $sorthow=null)   X-Ref
Renders a text with icons to sort by the given column

This is intended for table headings.

param: string $text    The heading text
param: string $sortid  The column id used for sorting
param: string $sortby  Currently sorted by (column id)
param: string $sorthow Currently sorted how (ASC|DESC)
return: string

helper_grading_report_participant(stdclass $participant, array $userinfo)   X-Ref

param: stdClass $participant
param: array $userinfo
return: string

helper_grading_report_submission(stdclass $participant)   X-Ref

param: stdClass $participant
return: string

helper_grading_report_assessment($assessment, $shownames, array $userinfo, $separator)   X-Ref

param: stdClass|null $assessment
param: bool $shownames
param: string $separator between the grade and the reviewer/author
return: string

helper_grading_report_grade($grade, $over=null)   X-Ref
Formats the aggreagated grades


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

array_nth(array $a, $n)   X-Ref
Helper function returning the n-th item of the array

param: array $a
param: int   $n from 0 to m, where m is th number of items in the array
return: mixed the $n-th element of $a

fullname_format()   X-Ref
Tries to guess the fullname format set at the site

return: string fl|lf