Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Files | Namespaces | Classes | Functions | Variables
mod_workshop

Files

file  access.php
 Capability definitions for the workshop module.
 
file  activity.php
 Search area for mod_workshop activities.
 
file  activity_base.php
 Activity base class.
 
file  assessable_uploaded.php
 The mod_workshop assessable uploaded event.
 
file  assessment_evaluated.php
 The mod_workshop assessment evaluated event.
 
file  assessment_evaluations_reset.php
 The mod_workshop assessment_evaluations reset event.
 
file  assessment_exporter.php
 Class for exporting assessment data.
 
file  assessment_form.php
 This file defines a base class for all assessment forms.
 
file  assessment_reevaluated.php
 The mod_workshop assessment_reevaluated event.
 
file  assessments_reset.php
 The mod_workshop submission assessments reset event.
 
file  backup_workshop_activity_task.class.php
 Defines backup_workshop_activity_task class.
 
file  backup_workshop_settingslib.php
 Workshop backup settings.
 
file  backup_workshop_stepslib.php
 Defines all the backup steps that will be used by backup_workshop_activity_task.
 
file  behat_mod_workshop.php
 Steps definitions related to mod_workshop.
 
file  cognitive_depth.php
 Cognitive depth indicator - workshop.
 
file  course_module_instance_list_viewed.php
 The mod_workshop instance list viewed event.
 
file  course_module_viewed.php
 The mod_workshop course module viewed event.
 
file  cron_task.php
 A scheduled task for workshop cron.
 
file  edit_form.php
 This file defines a base class for all grading strategy editing forms.
 
file  external.php
 Workshop external API.
 
file  feedbackauthor_form.php
 A form used by teachers to give feedback to authors on their submission.
 
file  feedbackreviewer_form.php
 A form used by teachers to give feedback to reviewers on assessments.
 
file  fileinfolib.php
 Provides code used during file browsing.
 
file  gradeitems.php
 Grade item mappings for the activity.
 
file  legacy_workshop_allocation_cron.php
 Legacy workshop allocation plugins cron.
 
file  lib.php
 Code for the submissions allocation support is defined here.
 
file  lib.php
 Provides support for the conversion of moodle1 backup to the moodle2 format.
 
file  lib.php
 This file defines interface of all grading evaluation classes.
 
file  lib.php
 This file defines interface of all grading strategy logic classes.
 
file  lib.php
 Library of workshop module functions needed by Moodle core and other subsystems.
 
file  lib.php
 mod_workshop data generator.
 
file  locallib.php
 Library of internal classes and functions for module workshop.
 
file  log.php
 Definition of log events.
 
file  mod_form.php
 The main workshop configuration form.
 
file  phase_switched.php
 The mod_workshop phase switched event.
 
file  portfolio_caller.php
 Provides the mod_workshop_portfolio_caller class.
 
file  provider.php
 Defines mod_workshop::privacy::provider class.
 
file  renderer.php
 Workshop module renderering methods are defined here.
 
file  restore_workshop_activity_task.class.php
 
file  restore_workshop_stepslib.php
 
file  services.php
 Workshop external functions and service definitions.
 
file  settings.php
 The workshop module configuration variables.
 
file  social_breadth.php
 Social breadth indicator - workshop.
 
file  submission_assessed.php
 The mod_workshop submission assessed event.
 
file  submission_created.php
 The mod_workshop submission created event.
 
file  submission_deleted.php
 The mod_workshop submission deleted event.
 
file  submission_exporter.php
 Class for exporting submission data.
 
file  submission_form.php
 Submit an assignment or edit the already submitted work.
 
file  submission_reassessed.php
 The mod_workshop submission reassessed event.
 
file  submission_updated.php
 The mod_workshop submission updated event.
 
file  submission_viewed.php
 The mod_workshop submission viewed event.
 
file  tasks.php
 Definition of workshop scheduled tasks.
 
file  uninstall.php
 This file replaces the legacy STATEMENTS section in db/install.xml, lib.php/modulename_install() post installation hook and partially defaults.php.
 
file  upgrade.php
 Keeps track of upgrades to the workshop module.
 
file  version.php
 Defines the version of workshop.
 
file  workshop_summary_exporter.php
 Class for exporting partial workshop data.
 
file  workshopallocation.php
 Subplugin info class.
 
file  workshopeval.php
 Subplugin info class.
 
file  workshopform.php
 Subplugin info class.
 
file  workshopform_legacy_polyfill.php
 Provides mod_workshop::privacy::workshopform_legacy_polyfill trait.
 
file  workshopform_provider.php
 Provides mod_workshop::privacy::workshopform_provider interface.
 

Namespaces

namespace  mod_workshop\analytics\indicator
  
 
namespace  mod_workshop\event
  
 
namespace  mod_workshop\external
  
 
namespace  mod_workshop\grades
  
 
namespace  mod_workshop\plugininfo
  
 
namespace  mod_workshop\privacy
  
 
namespace  mod_workshop\search
  
 
namespace  mod_workshop\task
  
 

Classes

class  backup_workshop_activity_structure_step
 Defines the complete workshop structure for backup, with file and id annotations. More...
 
class  backup_workshop_activity_task
 Provides all the settings and steps to perform one complete backup of workshop activity. More...
 
class  behat_mod_workshop
 
class  mod_workshop\analytics\indicator\activity_base
 Activity base class. More...
 
class  mod_workshop\analytics\indicator\cognitive_depth
 Cognitive depth indicator - workshop. More...
 
class  mod_workshop\analytics\indicator\social_breadth
 Social breadth indicator - workshop. More...
 
class  mod_workshop\event\assessable_uploaded
 The mod_workshop assessable uploaded event class. More...
 
class  mod_workshop\event\assessment_evaluated
 
class  mod_workshop\event\assessment_evaluations_reset
 
class  mod_workshop\event\assessment_reevaluated
 
class  mod_workshop\event\assessments_reset
 
class  mod_workshop\event\course_module_instance_list_viewed
 The mod_workshop instance list viewed event class. More...
 
class  mod_workshop\event\course_module_viewed
 The mod_workshop course module viewed event class. More...
 
class  mod_workshop\event\phase_switched
 
class  mod_workshop\event\submission_assessed
 
class  mod_workshop\event\submission_created
 
class  mod_workshop\event\submission_deleted
 
class  mod_workshop\event\submission_reassessed
 
class  mod_workshop\event\submission_updated
 
class  mod_workshop\event\submission_viewed
 
class  mod_workshop\external\assessment_exporter
 Class for exporting assessment data. More...
 
class  mod_workshop\external\submission_exporter
 Class for exporting submission data. More...
 
class  mod_workshop\external\workshop_summary_exporter
 Class for exporting partial workshop data (some fields are only viewable by admins). More...
 
class  mod_workshop\grades\gradeitems
 Grade item mappings for the activity. More...
 
class  mod_workshop\plugininfo\workshopallocation
 
class  mod_workshop\plugininfo\workshopeval
 
class  mod_workshop\plugininfo\workshopform
 
class  mod_workshop\privacy\provider
 Privacy API implementation for the Workshop activity module. More...
 
interface  mod_workshop\privacy\workshopform_provider
 Interface for grading strategy subplugins implementing the privacy API. More...
 
class  mod_workshop\search\activity
 Search area for mod_workshop activities. More...
 
class  mod_workshop\task\cron_task
 The main scheduled task for the workshop. More...
 
class  mod_workshop\task\legacy_workshop_allocation_cron
 Legacy workshop allocation plugins cron. More...
 
class  mod_workshop_external
 
class  mod_workshop_generator
 
class  mod_workshop_mod_form
 Module settings form for Workshop instances. More...
 
class  mod_workshop_portfolio_caller
 Workshop portfolio caller class to integrate with portfolio API. More...
 
class  mod_workshop_renderer
 Workshop module renderer class. More...
 
class  moodle1_mod_workshop_handler
 Workshop conversion handler. More...
 
class  moodle1_workshopform_handler
 Base class for the grading strategy subplugin handler. More...
 
class  restore_workshop_activity_structure_step
 Define all the restore steps that will be used by the restore_workshop_activity_task. More...
 
class  restore_workshop_activity_task
 workshop restore task that provides all the settings and steps to perform one complete restore of the activity More...
 
class  workshop
 Full-featured workshop API. More...
 
class  workshop_allocation_result
 Stores the information about the allocation process. More...
 
interface  workshop_allocator
 Allocators are responsible for assigning submissions to reviewers for assessments. More...
 
class  workshop_assessment
 Represents a rendarable full assessment. More...
 
class  workshop_assessment_base
 Common base class for assessments rendering. More...
 
class  workshop_assessment_form
 Base class for all assessment forms. More...
 
class  workshop_edit_strategy_form
 Base class for editing all the strategy grading forms. More...
 
class  workshop_evaluation
 Base class for all grading evaluation subplugins. More...
 
class  workshop_evaluation_settings_form
 Base form to hold eventual evaluation settings. More...
 
class  workshop_example_assessment
 Represents a renderable training assessment of an example submission. More...
 
class  workshop_example_reference_assessment
 Represents a renderable reference assessment of an example submission. More...
 
class  workshop_example_submission
 Renderable object containing all the information needed to display the example submission. More...
 
class  workshop_example_submission_summary
 Renderable object containing a basic set of information needed to display the example submission summary. More...
 
class  workshop_feedback
 Base class for renderable feedback for author and feedback for reviewer. More...
 
class  workshop_feedback_author
 Renderable feedback for the author of submission. More...
 
class  workshop_feedback_reviewer
 Renderable feedback for the reviewer. More...
 
class  workshop_feedbackauthor_form
 
class  workshop_feedbackreviewer_form
 
class  workshop_file_info_overallfeedback_container
 Represents virtual root node for all files in overall feedbacks. More...
 
class  workshop_file_info_submissions_container
 Represents virtual root node for all submissions. More...
 
class  workshop_final_grades
 Holds the final grades for the activity as are stored in the gradebook. More...
 
class  workshop_grading_report
 Renderable component containing all the data needed to display the grading report. More...
 
class  workshop_message
 Renderable message to be displayed to the user. More...
 
interface  workshop_strategy
 Strategy interface defines all methods that strategy subplugins has to implement. More...
 
class  workshop_submission
 Renderable object containing all the information needed to display the submission. More...
 
class  workshop_submission_base
 Common base class for submissions and example submissions rendering. More...
 
class  workshop_submission_form
 
class  workshop_submission_summary
 Renderable object containing a basic set of information needed to display the submission summary. More...
 
class  workshop_user_plan
 Represents the user planner tool. More...
 

Functions

 mod_workshop_core_calendar_event_timestart_updated (\calendar_event $event, stdClass $workshop)
 This function will update the workshop module according to the event that has been modified. More...
 
 mod_workshop_core_calendar_get_valid_event_timestart_range (\calendar_event $event, stdClass $workshop)
 This function calculates the minimum and maximum cutoff values for the timestart of the given event. More...
 
 mod_workshop_core_calendar_provide_event_action (calendar_event $event, core_calendar\action_factory $factory, int $userid=0)
 This function receives a calendar event and returns the action associated with it, or null if there is none. More...
 
 mod_workshop_get_fontawesome_icon_map ()
 Get icon mapping for font-awesome.
 
 mod_workshop_get_path_from_pluginfile (string $filearea, array $args)
 Given an array with a file path, it returns the itemid and the filepath for the defined filearea. More...
 
 mod_workshop_uninstall ()
 This is called at the beginning of the uninstallation process to give the module a chance to clean-up its hacks, bits etc. More...
 
 workshop_add_instance (stdclass $workshop)
 Saves a new instance of the workshop into the database. More...
 
 workshop_calendar_update (stdClass $workshop, $cmid)
 Updates the calendar events associated to the given workshop. More...
 
 workshop_check_updates_since (cm_info $cm, $from, $filter=array())
 Check if the module has any update that affects the current user since a given time. More...
 
 workshop_delete_instance ($id)
 Given an ID of an instance of this module, this function will permanently delete the instance and any data that depends on it. More...
 
 workshop_extend_navigation (navigation_node $navref, stdclass $course, stdclass $module, cm_info $cm)
 Extends the global navigation tree by adding workshop nodes if there is a relevant content. More...
 
 workshop_extend_settings_navigation (settings_navigation $settingsnav, navigation_node $workshopnode=null)
 Extends the settings navigation with the Workshop settings. More...
 
 workshop_get_file_areas ($course, $cm, $context)
 
 workshop_get_file_info ($browser, $areas, $course, $cm, $context, $filearea, $itemid, $filepath, $filename)
 
 workshop_get_post_actions ()
 List the actions that correspond to a post of this module. More...
 
 workshop_get_recent_mod_activity (&$activities, &$index, $timestart, $courseid, $cmid, $userid=0, $groupid=0)
 Returns all activity in course workshops since a given time. More...
 
 workshop_get_view_actions ()
 List the actions that correspond to a view of this module. More...
 
 workshop_grade_item_category_update ($workshop)
 Update the grade items categories if they are changed via mod_form.php. More...
 
 workshop_grade_item_update (stdclass $workshop, $submissiongrades=null, $assessmentgrades=null)
 Creates or updates grade items for the give workshop instance. More...
 
 workshop_page_type_list ($pagetype, $parentcontext, $currentcontext)
 Return a list of page types. More...
 
 workshop_pluginfile ($course, $cm, $context, $filearea, array $args, $forcedownload, array $options=array())
 
 workshop_print_recent_activity ($course, $viewfullnames, $timestart)
 Given a course and a time, this module should find recent activity that has occurred in workshop activities and print it out. More...
 
 workshop_print_recent_mod_activity ($activity, $courseid, $detail, $modnames, $viewfullnames)
 Print single activity item prepared by {. More...
 
 workshop_refresh_events ($courseid=0, $instance=null, $cm=null)
 This standard function will check all instances of this module and make sure there are up-to-date events created for each of them. More...
 
 workshop_reset_course_form_defaults (stdClass $course)
 Provides default values for the workshop settings in the course reset form. More...
 
 workshop_reset_course_form_definition ($mform)
 Extends the course reset form with workshop specific settings. More...
 
 workshop_reset_userdata (stdClass $data)
 Performs the reset of all workshop instances in the course. More...
 
 workshop_scale_used ()
 
 workshop_scale_used_anywhere ($scaleid)
 Is a given scale used by any instance of workshop? More...
 
 workshop_supports ($feature)
 Returns the information if the module supports a feature. More...
 
 workshop_update_grades (stdclass $workshop, $userid=0)
 
 workshop_update_instance (stdclass $workshop)
 Given an object containing all the necessary data, (defined by the form in mod_form.php) this function will update an existing instance with new data. More...
 
 workshop_upgrade_transform_instance (stdClass $old)
 Given a record containing data from 1.9 workshop table, returns object containing data as should be saved in 2.0 workshop table. More...
 
 workshop_user_complete ($course, $user, $mod, $workshop)
 Print a detailed representation of what a user has done with a given particular instance of this module, for user activity reports. More...
 
 workshop_user_outline ($course, $user, $mod, $workshop)
 Return a small object with summary information about what a user has done with a given particular instance of this module Used for user activity reports. More...
 
 xmldb_workshop_upgrade ($oldversion)
 Performs upgrade of the database structure and data. More...
 

Variables

 $capabilities
 
global mod_workshop\event::$CFG
 
 $functions
 
 $logs
 
 $plugin = 2020060900
 
 $tasks
 
$plugin component = 'mod_workshop'
 
$plugin version = 2020061501
 
const WORKSHOP_EVENT_TYPE_ASSESSMENT_CLOSE 'closeassessment'
 
const WORKSHOP_EVENT_TYPE_ASSESSMENT_OPEN 'openassessment'
 
const WORKSHOP_EVENT_TYPE_SUBMISSION_CLOSE 'closesubmission'
 
const WORKSHOP_EVENT_TYPE_SUBMISSION_OPEN 'opensubmission'
 
const WORKSHOP_SUBMISSION_TYPE_AVAILABLE 1
 
const WORKSHOP_SUBMISSION_TYPE_DISABLED 0
 
const WORKSHOP_SUBMISSION_TYPE_REQUIRED 2
 

Detailed Description

Function Documentation

◆ mod_workshop_core_calendar_event_timestart_updated()

mod_workshop_core_calendar_event_timestart_updated ( \calendar_event  $event,
stdClass  $workshop 
)

This function will update the workshop module according to the event that has been modified.

Parameters
calendar_event$event
stdClass$workshopThe module instance to get the range from

◆ mod_workshop_core_calendar_get_valid_event_timestart_range()

mod_workshop_core_calendar_get_valid_event_timestart_range ( \calendar_event  $event,
stdClass  $workshop 
)

This function calculates the minimum and maximum cutoff values for the timestart of the given event.

It will return an array with two values, the first being the minimum cutoff value and the second being the maximum cutoff value. Either or both values can be null, which indicates there is no minimum or maximum, respectively.

If a cutoff is required then the function must return an array containing the cutoff timestamp and error string to display to the user if the cutoff value is violated.

A minimum and maximum cutoff return value will look like: [ [1505704373, 'The date must be after this date'], [1506741172, 'The date must be before this date'] ]

Parameters
calendar_event$eventThe calendar event to get the time range for
stdClass$workshopThe module instance to get the range from
Return values
arrayReturns an array with min and max date.

◆ mod_workshop_core_calendar_provide_event_action()

mod_workshop_core_calendar_provide_event_action ( calendar_event  $event,
core_calendar\action_factory  $factory,
int  $userid = 0 
)

This function receives a calendar event and returns the action associated with it, or null if there is none.

This is used by block_myoverview in order to display the event appropriately. If null is returned then the event is not displayed on the block.

Parameters
calendar_event$event
core_calendar::action_factory$factory
int$useridUser id to use for all capability checks, etc. Set to 0 for current user (default).
Return values
core_calendar::local::event::entities::action_interface|null

◆ mod_workshop_get_path_from_pluginfile()

mod_workshop_get_path_from_pluginfile ( string  $filearea,
array  $args 
)

Given an array with a file path, it returns the itemid and the filepath for the defined filearea.

Parameters
string$fileareaThe filearea.
array$argsThe path (the part after the filearea and before the filename).
Return values
array|nullThe itemid and the filepath inside the $args path, for the defined filearea.

◆ mod_workshop_uninstall()

mod_workshop_uninstall ( )

This is called at the beginning of the uninstallation process to give the module a chance to clean-up its hacks, bits etc.

where possible.

Return values
booltrue if success

◆ workshop_add_instance()

workshop_add_instance ( stdclass  $workshop)

Saves a new instance of the workshop into the database.

Given an object containing all the necessary data, (defined by the form in mod_form.php) this function will save a new instance and return the id number of the new instance.

Parameters
stdClass$workshopAn object from the form in mod_form.php
Return values
intThe id of the newly inserted workshop record

◆ workshop_calendar_update()

workshop_calendar_update ( stdClass  $workshop,
  $cmid 
)

Updates the calendar events associated to the given workshop.

Parameters
stdClass$workshopthe workshop instance record
int$cmidcourse module id

◆ workshop_check_updates_since()

workshop_check_updates_since ( cm_info  $cm,
  $from,
  $filter = array() 
)

Check if the module has any update that affects the current user since a given time.

Parameters
cm_info$cmcourse module data
int$fromthe time to check updates from
array$filterif we need to check only specific updates
Return values
stdClassan object with the different type of areas indicating if they were updated or not
Since
Moodle 3.4

◆ workshop_delete_instance()

workshop_delete_instance (   $id)

Given an ID of an instance of this module, this function will permanently delete the instance and any data that depends on it.

Parameters
int$idId of the module instance
Return values
booleanSuccess/Failure

◆ workshop_extend_navigation()

workshop_extend_navigation ( navigation_node  $navref,
stdclass  $course,
stdclass  $module,
cm_info  $cm 
)

Extends the global navigation tree by adding workshop nodes if there is a relevant content.

This can be called by an AJAX request so do not rely on $PAGE as it might not be set up properly.

Parameters
navigation_node$navrefAn object representing the navigation tree node of the workshop module instance
stdClass$course
stdClass$module
cm_info$cm

◆ workshop_extend_settings_navigation()

workshop_extend_settings_navigation ( settings_navigation  $settingsnav,
navigation_node  $workshopnode = null 
)

Extends the settings navigation with the Workshop settings.

This function is called when the context for the page is a workshop module. This is not called by AJAX so it is safe to rely on the $PAGE.

Parameters
settings_navigation$settingsnavsettings_navigation
navigation_node$workshopnodenavigation_node

◆ workshop_get_post_actions()

workshop_get_post_actions ( )

List the actions that correspond to a post of this module.

This is used by the participation report.

Note: This is not used by new logging system. Event with crud = ('c' || 'u' || 'd') and edulevel = LEVEL_PARTICIPATING will be considered as post action.

Return values
array

◆ workshop_get_recent_mod_activity()

workshop_get_recent_mod_activity ( $activities,
$index,
  $timestart,
  $courseid,
  $cmid,
  $userid = 0,
  $groupid = 0 
)

Returns all activity in course workshops since a given time.

Parameters
array$activitiessequentially indexed array of objects
int$index
int$timestart
int$courseid
int$cmid
int$useriddefaults to 0
int$groupiddefaults to 0
Return values
voidadds items into $activities and increases $index

◆ workshop_get_view_actions()

workshop_get_view_actions ( )

List the actions that correspond to a view of this module.

This is used by the participation report.

Note: This is not used by new logging system. Event with crud = 'r' and edulevel = LEVEL_PARTICIPATING will be considered as view action.

Return values
array

◆ workshop_grade_item_category_update()

workshop_grade_item_category_update (   $workshop)

Update the grade items categories if they are changed via mod_form.php.

We must do it manually here in the workshop module because modedit supports only single grade item while we use two.

Parameters
stdClass$workshopAn object from the form in mod_form.php

◆ workshop_grade_item_update()

workshop_grade_item_update ( stdclass  $workshop,
  $submissiongrades = null,
  $assessmentgrades = null 
)

Creates or updates grade items for the give workshop instance.

Needed by grade_update_mod_grades() in lib/gradelib.php. Also used by workshop_update_grades().

Parameters
stdClass$workshopinstance object with extra cmidnumber property
stdClass$submissiongradesdata for the first grade item
stdClass$assessmentgradesdata for the second grade item
Return values
void

◆ workshop_page_type_list()

workshop_page_type_list (   $pagetype,
  $parentcontext,
  $currentcontext 
)

Return a list of page types.

Parameters
string$pagetypecurrent page type
stdClass$parentcontextBlock's parent context
stdClass$currentcontextCurrent context of block

◆ workshop_print_recent_activity()

workshop_print_recent_activity (   $course,
  $viewfullnames,
  $timestart 
)

Given a course and a time, this module should find recent activity that has occurred in workshop activities and print it out.

Return true if there was output, or false is there was none.

Parameters
stdClass$course
bool$viewfullnames
int$timestart
Return values
boolean

◆ workshop_print_recent_mod_activity()

workshop_print_recent_mod_activity (   $activity,
  $courseid,
  $detail,
  $modnames,
  $viewfullnames 
)

Print single activity item prepared by {.

See also
workshop_get_recent_mod_activity()}

◆ workshop_refresh_events()

workshop_refresh_events (   $courseid = 0,
  $instance = null,
  $cm = null 
)

This standard function will check all instances of this module and make sure there are up-to-date events created for each of them.

If courseid = 0, then every workshop event in the site is checked, else only workshop events belonging to the course specified are checked.

Parameters
integer$courseidThe Course ID.
int | stdClass$instanceworkshop module instance or ID.
int | stdClass$cmCourse module object or ID.
Return values
boolReturns true if the calendar events were successfully updated.

◆ workshop_reset_course_form_defaults()

workshop_reset_course_form_defaults ( stdClass  $course)

Provides default values for the workshop settings in the course reset form.

Parameters
stdClass$courseThe course to be reset.

◆ workshop_reset_course_form_definition()

workshop_reset_course_form_definition (   $mform)

Extends the course reset form with workshop specific settings.

Parameters
MoodleQuickForm$mform

◆ workshop_reset_userdata()

workshop_reset_userdata ( stdClass  $data)

Performs the reset of all workshop instances in the course.

Parameters
stdClass$dataThe actual course reset settings.
Return values
arrayList of results, each being array[(string)component, (string)item, (string)error]

◆ workshop_scale_used()

workshop_scale_used ( )
Deprecated:
since Moodle 3.8

◆ workshop_scale_used_anywhere()

workshop_scale_used_anywhere (   $scaleid)

Is a given scale used by any instance of workshop?

The function asks all installed grading strategy subplugins. The workshop core itself does not use scales. Both grade for submission and grade for assessments do not use scales.

Parameters
int$scaleidid of the scale to check
Return values
bool

◆ workshop_supports()

workshop_supports (   $feature)

Returns the information if the module supports a feature.

See also
plugin_supports() in lib/moodlelib.php
Parameters
string$featureFEATURE_xx constant for requested feature
Return values
mixedtrue if the feature is supported, null if unknown

◆ workshop_update_instance()

workshop_update_instance ( stdclass  $workshop)

Given an object containing all the necessary data, (defined by the form in mod_form.php) this function will update an existing instance with new data.

Parameters
stdClass$workshopAn object from the form in mod_form.php
Return values
boolsuccess

◆ workshop_upgrade_transform_instance()

workshop_upgrade_transform_instance ( stdClass  $old)

Given a record containing data from 1.9 workshop table, returns object containing data as should be saved in 2.0 workshop table.

Parameters
stdClass$oldrecord from 1.9 workshop table
Return values
stdClass

◆ workshop_user_complete()

workshop_user_complete (   $course,
  $user,
  $mod,
  $workshop 
)

Print a detailed representation of what a user has done with a given particular instance of this module, for user activity reports.

Parameters
stdClass$courseThe course record.
stdClass$userThe user record.
cm_info | stdClass$modThe course module info object or record.
stdClass$workshopThe workshop instance record.
Return values
stringHTML

◆ workshop_user_outline()

workshop_user_outline (   $course,
  $user,
  $mod,
  $workshop 
)

Return a small object with summary information about what a user has done with a given particular instance of this module Used for user activity reports.

$return->time = the time they did it $return->info = a short text description

Parameters
stdClass$courseThe course record.
stdClass$userThe user record.
cm_info | stdClass$modThe course module info object or record.
stdClass$workshopThe workshop instance record.
Return values
stdclass|null

◆ xmldb_workshop_upgrade()

xmldb_workshop_upgrade (   $oldversion)

Performs upgrade of the database structure and data.

Workshop supports upgrades from version 1.9.0 and higher only. During 1.9 > 2.0 upgrade, there are significant database changes.

Parameters
int$oldversionthe version we are upgrading from
Return values
boolresult

Variable Documentation

◆ $logs

$logs
Initial value:
= array(
array('module'=>'workshop', 'action'=>'add', 'mtable'=>'workshop', 'field'=>'name'),
array('module'=>'workshop', 'action'=>'update', 'mtable'=>'workshop', 'field'=>'name'),
array('module'=>'workshop', 'action'=>'view', 'mtable'=>'workshop', 'field'=>'name'),
array('module'=>'workshop', 'action'=>'view all', 'mtable'=>'workshop', 'field'=>'name'),
array('module'=>'workshop', 'action'=>'add submission', 'mtable'=>'workshop_submissions', 'field'=>'title'),
array('module'=>'workshop', 'action'=>'update submission', 'mtable'=>'workshop_submissions', 'field'=>'title'),
array('module'=>'workshop', 'action'=>'view submission', 'mtable'=>'workshop_submissions', 'field'=>'title'),
array('module'=>'workshop', 'action'=>'add assessment', 'mtable'=>'workshop_submissions', 'field'=>'title'),
array('module'=>'workshop', 'action'=>'update assessment', 'mtable'=>'workshop_submissions', 'field'=>'title'),
array('module'=>'workshop', 'action'=>'add example', 'mtable'=>'workshop_submissions', 'field'=>'title'),
array('module'=>'workshop', 'action'=>'update example', 'mtable'=>'workshop_submissions', 'field'=>'title'),
array('module'=>'workshop', 'action'=>'view example', 'mtable'=>'workshop_submissions', 'field'=>'title'),
array('module'=>'workshop', 'action'=>'add reference assessment', 'mtable'=>'workshop_submissions', 'field'=>'title'),
array('module'=>'workshop', 'action'=>'update reference assessment', 'mtable'=>'workshop_submissions', 'field'=>'title'),
array('module'=>'workshop', 'action'=>'add example assessment', 'mtable'=>'workshop_submissions', 'field'=>'title'),
array('module'=>'workshop', 'action'=>'update example assessment', 'mtable'=>'workshop_submissions', 'field'=>'title'),
array('module'=>'workshop', 'action'=>'update aggregate grades', 'mtable'=>'workshop', 'field'=>'name'),
array('module'=>'workshop', 'action'=>'update clear aggregated grades', 'mtable'=>'workshop', 'field'=>'name'),
array('module'=>'workshop', 'action'=>'update clear assessments', 'mtable'=>'workshop', 'field'=>'name'),
)

◆ $tasks

$tasks
Initial value:
= [
[
'classname' => '\mod_workshop\task\cron_task',
'blocking' => 0,
'minute' => '*',
'hour' => '*',
'day' => '*',
'month' => '*',
'dayofweek' => '*'
],
[
'classname' => '\mod_workshop\task\legacy_workshop_allocation_cron',
'blocking' => 0,
'minute' => '*',
'hour' => '*',
'day' => '*',
'month' => '*',
'dayofweek' => '*'
]
]