Namespaces | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
Classes | |
class | |
Standard base class for (assignment types). | |
class | |
Admin external page that displays a list of the installed submission plugins. | |
class | |
Used to output the attempt history for a particular assignment. | |
class | |
Used to output the attempt history chooser for a particular assignment. | |
class | |
Renderable course index summary. | |
class | |
Abstract class for feedback_plugin inherited from abstract class. | |
class | |
Implements a renderable feedback plugin feedback. | |
class | |
Renderable feedback status. | |
class | |
An assign file class that extends rendererable class and is used by the assign module. | |
class | |
Implements a renderable grading options form. | |
class | |
Renderable grading summary. | |
class | |
Extends to provide a table of assignment submissions. | |
class | |
Implements a renderable message notification. | |
class | |
Renderable header. | |
class | |
Form for editing settings overrides. | |
class | |
Abstract class for (submission/feedback). | |
class | |
Renderable header related to an individual subplugin. | |
class | |
Class that handles the display and configuration of the list of submission plugins. | |
class | |
Portfolio caller class for . | |
class | |
Abstract base class for submission plugin types. | |
class | |
Implements a renderable submission plugin submission. | |
class | |
Renderable submission status. | |
class | |
Renderable submission status. | |
class | |
This class wraps the submit for grading confirmation page. | |
class | |
Class to manage upgrades from mod_assignment to . | |
class | |
Implements a renderable user summary. | |
class | |
Define the complete choice structure for backup, with file and id annotations. | |
class | |
assign backup task that provides all the settings and steps to perform one complete backup of the activity | |
class | |
Activity base class. | |
class | |
Cognitive depth indicator - assign. | |
class | |
Social breadth indicator - assign. | |
class | |
The all submissions downloaded event class. | |
class | |
class | |
The abstract base event class. | |
class | |
class | |
class | |
The instance list viewed event class. | |
class | |
The course module viewed event class. | |
class | |
The extension granted event class. | |
class | |
class | |
class | |
class | |
class | |
class | |
class | |
The identities revealed event class. | |
class | |
class | |
The remove submission form viewed event class. | |
class | |
class | |
The statement accepted event class. | |
class | |
class | |
class | |
The submission duplicated event class. | |
class | |
class | |
The submission graded event class. | |
class | |
The submission locked event class. | |
class | |
class | |
class | |
The submission unlocked event class. | |
class | |
class | |
class | |
class | |
class | |
class | |
class | |
Grade item mappings for the activity. | |
class | |
Group observers class. | |
class | |
Grading app renderable. | |
class | |
class | |
class | |
An object for fulfilling an assign plugin data request. | |
interface | |
interface | |
interface | |
interface | |
class | |
Privacy class for requesting user data. | |
class | |
An object for collecting user IDs related to a teacher. | |
class | |
Search area for activities. | |
class | |
class | |
Set allocated marker form. | |
class | |
Set marking workflow form. | |
class | |
Assignment submission confirmation form. | |
class | |
Assignment extension dates form. | |
class | |
Assign functions. | |
class | |
class | |
Assignment grade form. | |
class | |
Assignment grading options form. | |
class | |
Assignment grading options form. | |
class | |
Assignment settings form. | |
class | |
Assignment quick grading form. | |
class | |
A custom renderer class that extends the and is used by the assign module. | |
class | |
Assign submission form. | |
class | |
Define the complete assignment structure for restore, with file and id annotations. | |
class | |
assign restore task that provides all the settings and steps to perform one complete restore of the activity | |
Functions | |
(stdClass $data, $form=null) | |
Adds an assignment instance. | |
( $cm, $from, $filter=array()) | |
Check if the module has any update that affects the current user since a given time. | |
($id) | |
delete an assignment instance | |
( $settings, $navref) | |
extend an assigment navigation settings | |
($course, $cm, $userid, $type) | |
Obtains the automatic completion state for this module based on any conditions in assign settings. | |
($coursemodule) | |
Add a get_coursemodule_info function in case any assignment type wants to add 'extra' information for the course (see resource). | |
() | |
Returns all other capabilities used by this module. | |
($course, $cm, $ ) | |
List the file areas that can be browsed. | |
($browser, $areas, $course, $cm, $ , $filearea, $itemid, $filepath, $filename) | |
File browsing support for assign module. | |
() | |
() | |
() | |
List the actions that correspond to a post of this module. | |
(&$activities, &$index, $timestart, $courseid, $cmid, $userid=0, $groupid=0) | |
Returns all assignments since a given time. | |
($ , $userid=0) | |
Return grade for given user or all users. | |
() | |
List the actions that correspond to a view of this module. | |
($ , $grades=null) | |
Create grade item for given assignment. | |
($pagetype, $parentcontext, $currentcontext) | |
Return a list of page types. | |
($course, $cm, $ , $filearea, $args, $forcedownload, array $options=array()) | |
Serves intro attachment files. | |
($ , $course=null, $cm=null) | |
This actually updates the normal and completion calendar events. | |
() | |
($course, $viewfullnames, $timestart) | |
Print recent activity from all assignments in a given course. | |
($activity, $courseid, $detail, $modnames) | |
Print recent activity from all assignments in a given course. | |
($courseid, $groupid=null) | |
Logic to happen when a/some group(s) has/have been deleted in a course. | |
($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. | |
($course, $cm, $oldmin, $oldmax, $newmin, $newmax) | |
Rescale all grades for this activity and push the new grades to the gradebook. | |
($course) | |
Course reset form defaults. | |
(&$mform) | |
Implementation of the function for printing the form elements that control whether the course reset functionality affects the assignment. | |
($courseid, $type='') | |
Removes all grades from gradebook. | |
($data) | |
This function is used by the reset_course_userdata function in moodlelib. | |
() | |
($scaleid) | |
Checks if scale is being used by any instance of assignment. | |
($feature) | |
Return the list if Moodle features this module supports. | |
($ , $override=null) | |
This function updates the events associated to the assign. | |
($ , $userid=0, $nullifnone=true) | |
Update activity grades. | |
(stdClass $data, $form) | |
Update an assignment instance. | |
($course, $user, $coursemodule, $ ) | |
Prints the complete info about a user's interaction with an assignment. | |
($course, $user, $coursemodule, $assignment) | |
Print the grade information for the assignment for this user. | |
() | |
Determines if the assignment as any null grades that were rescaled. | |
( $event, $itemcount=0) | |
Callback function that determines whether an action event should be showing its item count based on the event type and the item count. | |
(\ $event, stdClass $instance) | |
This function will update the assign module according to the event that has been modified. | |
(\ $event, stdClass $instance) | |
This function calculates the minimum and maximum cutoff values for the timestart of the given event. | |
( $event, $userid=0) | |
Is the event visible? | |
( $event, $factory, $userid=0) | |
This function receives a calendar event and returns the action associated with it, or null if there is none. | |
($cm) | |
Callback which returns human-readable strings describing the active completion custom rules for the module instance. | |
(string $filearea, array $args) | |
Given an array with a file path, it returns the itemid and the filepath for the defined filearea. | |
($args) | |
Serve the grading panel as a fragment. | |
() | |
Return a list of all the user preferences used by . | |
($id, $move, $assignid) | |
Change the sort order of an override. | |
($assignid) | |
Reorder the overrides starting at the override at the given startorder. | |
($oldversion) | |
upgrade this assignment instance - this function could be skipped but it will be needed later | |
Variables | |
global | |
global | |
= new ($section, get_string('settings', 'mod_assign'), 'moodle/site:config', $module->is_enabled() === false) | |
const | 'manual' |
const | 'none' |
const | 'untilpass' |
const | 'close' |
const | 'due' |
const | 'gradingdue' |
const | 'open' |
const | 'grantedextension' |
const | 'none' |
const | 'notsubmitted' |
const | 'requiregrading' |
const | 'singleuser' |
const | 'submitted' |
const | -1 |
const | 'graded' |
const | 'notgraded' |
const | 'introattachment' |
const | -1 |
const | 'inmarking' |
const | 'inreview' |
const | 'notmarked' |
const | 'readyforrelease' |
const | 'readyforreview' |
const | 'released' |
const | "432000" |
ASSIGN_MAX_EVENT_LENGTH = 432000 ; 5 days maximum. | |
const | 300 |
const | 'draft' |
const | 'new' |
const | 'reopened' |
const | 'submitted' |
const | -1 |
$plugin | = 'mod_assign' |
$plugin | = 2019111200 |
$plugin | = 2019111800 |
Function documentation, ◆ assign_add_instance().
assign_add_instance | ( | stdClass | , |
= | |||
) |
Adds an assignment instance.
This is done by calling the add_instance() method of the assignment type class
stdClass | $data | |
$form |
int | The instance id of the new assignment |
assign_check_updates_since | ( | , | |
, | |||
= | |||
) |
Check if the module has any update that affects the current user since a given time.
$cm | course module data | |
int | $from | the time to check updates from |
array | $filter | if we need to check only specific updates |
stdClass | an object with the different type of areas indicating if they were updated or not |
assign_delete_instance | ( | ) |
delete an assignment instance
int | $id |
bool |
assign_extend_settings_navigation | ( | , | |
) |
extend an assigment navigation settings
$settings | ||
$navref |
void |
assign_get_completion_state | ( | , | |
, | |||
, | |||
) |
Obtains the automatic completion state for this module based on any conditions in assign settings.
object | $course | Course |
object | $cm | Course-module |
int | $userid | User ID |
bool | $type | Type of comparison (or/and; can be used as return value if no conditions) |
bool | True if completed, false if not, $type if conditions not set. |
assign_get_coursemodule_info | ( | ) |
Add a get_coursemodule_info function in case any assignment type wants to add 'extra' information for the course (see resource).
Given a course_module object, this function returns any "extra" information that may be needed when printing this activity in a course listing. See get_array_of_activities() in course/lib.php .
stdClass | $coursemodule | The coursemodule object (record). |
An object on information that the courses will know about (most noticeably, an icon). |
assign_get_extra_capabilities | ( | ) |
Returns all other capabilities used by this module.
array | Array of capability strings |
assign_get_file_areas | ( | , | |
, | |||
) |
List the file areas that can be browsed.
stdClass | $course | |
stdClass | $cm | |
stdClass | $context |
array |
assign_get_file_info | ( | , | |
, | |||
, | |||
, | |||
, | |||
, | |||
, | |||
, | |||
) |
File browsing support for assign module.
$browser | ||
object | $areas | |
object | $course | |
object | $cm | |
object | $context | |
string | $filearea | |
int | $itemid | |
string | $filepath | |
string | $filename |
object | instance or null if not found |
assign_get_grade_details_for_print_overview | ( | ) |
assign_get_mysubmission_details_for_print_overview | ( | ) |
assign_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.
assign_get_recent_mod_activity | ( | & | , |
& | , | ||
, | |||
, | |||
, | |||
= , | |||
= | |||
) |
Returns all assignments since a given time.
array | $activities | The activity information is returned in this array |
int | $index | The current index in the activities array |
int | $timestart | The earliest activity to show |
int | $courseid | Limit the search to this course |
int | $cmid | The course module id |
int | $userid | Optional user id |
int | $groupid | Optional group id |
assign_get_user_grades | ( | , | |
= | |||
) |
Return grade for given user or all users.
stdClass | $assign | record of assign with an additional cmidnumber |
int | $userid | optional user id, 0 means all users |
array | array of grades, false if none |
assign_get_view_actions | ( | ) |
List the actions that correspond to a view of this module.
Note: This is not used by new logging system. Event with crud = 'r' and edulevel = LEVEL_PARTICIPATING will be considered as view action.
assign_grade_item_update | ( | , | |
= | |||
) |
Create grade item for given assignment.
stdClass | $assign | record with extra cmidnumber |
array | $grades | optional array/object of grade(s); 'reset' means reset grades in gradebook |
int | 0 if ok, error code otherwise |
assign_page_type_list | ( | , | |
, | |||
) |
Return a list of page types.
string | $pagetype | current page type |
stdClass | $parentcontext | Block's parent context |
stdClass | $currentcontext | Current context of block |
assign_pluginfile | ( | , | |
, | |||
, | |||
, | |||
, | |||
, | |||
array | = | ||
) |
Serves intro attachment files.
mixed | $course | course or id of the course |
mixed | $cm | course module or id of the course module |
context | $context | |
string | $filearea | |
array | $args | |
bool | $forcedownload | |
array | $options | additional options affecting the file serving |
bool | false if file not found, does not return if found - just send the file |
assign_prepare_update_events | ( | , | |
= , | |||
= | |||
) |
This actually updates the normal and completion calendar events.
stdClass | $assign | Assignment object (from DB). |
stdClass | $course | Course object. |
stdClass | $cm | Course module object. |
assign_print_overview | ( | ) |
assign_print_recent_activity | ( | , | |
, | |||
) |
Print recent activity from all assignments in a given course.
This is used by the recent activity block
mixed | $course | the course to print activity for |
bool | $viewfullnames | boolean to determine whether to show full names or not |
int | $timestart | the time the rendering started |
bool | true if activity was printed, false otherwise. |
assign_print_recent_mod_activity | ( | , | |
, | |||
, | |||
) |
This is used by course/recent.php
stdClass | $activity | |
int | $courseid | |
bool | $detail | |
array | $modnames |
assign_process_group_deleted_in_course | ( | , | |
= | |||
) |
Logic to happen when a/some group(s) has/have been deleted in a course.
int | $courseid | The course ID. |
int | $groupid | The group id if it is known |
assign_refresh_events | ( | = , | |
= , | |||
= | |||
) |
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 assignment event in the site is checked, else only assignment events belonging to the course specified are checked.
int | $courseid | |
int | stdClass | $instance | Assign module instance or ID. |
int | stdClass | $cm | Course module object or ID (not used in this module). |
assign_rescale_activity_grades | ( | , | |
, | |||
, | |||
, | |||
, | |||
) |
Rescale all grades for this activity and push the new grades to the gradebook.
stdClass | $course | Course db record |
stdClass | $cm | Course module db record |
float | $oldmin | |
float | $oldmax | |
float | $newmin | |
float | $newmax |
assign_reset_course_form_defaults | ( | ) |
Course reset form defaults.
object | $course |
assign_reset_course_form_definition | ( | & | ) |
Implementation of the function for printing the form elements that control whether the course reset functionality affects the assignment.
moodleform | $mform | form passed by reference |
assign_reset_gradebook | ( | , | |
= | |||
) |
Removes all grades from gradebook.
int | $courseid | The ID of the course to reset |
string | $type | Optional type of assignment to limit the reset to a particular assignment type |
assign_reset_userdata | ( | ) |
This function is used by the reset_course_userdata function in moodlelib.
This function will remove all assignment submissions and feedbacks in the database and clean up any related data.
stdClass | $data | the data submitted from the reset course. |
assign_scale_used | ( | ) |
assign_scale_used_anywhere | ( | ) |
Checks if scale is being used by any instance of assignment.
This is used to find out if scale used anywhere
int | $scaleid |
boolean | True if the scale is used by any assignment |
assign_supports | ( | ) |
Return the list if Moodle features this module supports.
string | $feature | FEATURE_xx constant for requested feature |
mixed | True if module supports feature, null if doesn't know |
assign_update_events | ( | , | |
= | |||
) |
This function updates the events associated to the assign.
If $override is non-zero, then it updates only the events associated with the specified override.
assign | $assign | the assign object. |
object | $override | (optional) limit to a specific override |
assign_update_grades | ( | , | |
= , | |||
= | |||
) |
Update activity grades.
stdClass | $assign | database record |
int | $userid | specific user only, 0 means all |
bool | $nullifnone | - not used |
assign_update_instance | ( | stdClass | , |
) |
Update an assignment instance.
This is done by calling the update_instance() method of the assignment type class
stdClass | $data | |
stdClass | $form | - unused |
object |
assign_user_complete | ( | , | |
, | |||
, | |||
) |
Prints the complete info about a user's interaction with an assignment.
stdClass | $course | |
stdClass | $user | |
stdClass | $coursemodule | |
stdClass | $assign | the database assign record |
This prints the submission summary and feedback summary for this student.
assign_user_outline | ( | , | |
, | |||
, | |||
) |
Print the grade information for the assignment for this user.
stdClass | $course | |
stdClass | $user | |
stdClass | $coursemodule | |
stdClass | $assignment |
get_assignments_with_rescaled_null_grades | ( | ) |
Determines if the assignment as any null grades that were rescaled.
Null grades are stored as -1 but should never be rescaled.
int[] | Array of the ids of all the assignments with rescaled null grades. |
mod_assign_core_calendar_event_action_shows_item_count | ( | , | |
= | |||
) |
Callback function that determines whether an action event should be showing its item count based on the event type and the item count.
$event | The calendar event. | |
int | $itemcount | The item count associated with the action event. |
mod_assign_core_calendar_event_timestart_updated | ( | \ | , |
stdClass | |||
) |
This function will update the assign module according to the event that has been modified.
$event | ||
stdClass | $instance | The module instance to get the range from |
mod_assign_core_calendar_get_valid_event_timestart_range | ( | \ | , |
stdClass | |||
) |
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 due date must be after the sbumission start date'], [1506741172, 'The due date must be before the cutoff date'] ]
If the event does not have a valid timestart range then [false, false] will be returned.
$event | The calendar event to get the time range for | |
stdClass | $instance | The module instance to get the range from |
mod_assign_core_calendar_is_event_visible | ( | , | |
= | |||
) |
Is the event visible?
This is used to determine global visibility of an event in all places throughout Moodle. For example, the ASSIGN_EVENT_TYPE_GRADINGDUE event will not be shown to students on their calendar.
$event | ||
int | $userid | User id to use for all capability checks, etc. Set to 0 for current user (default). |
bool | Returns true if the event is visible to the current user, false otherwise. |
mod_assign_core_calendar_provide_event_action | ( | , | |
, | |||
= | |||
) |
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.
$event | ||
core_calendar\action_factory | $factory | |
int | $userid | User id to use for all capability checks, etc. Set to 0 for current user (default). |
mod_assign_get_completion_active_rule_descriptions | ( | ) |
Callback which returns human-readable strings describing the active completion custom rules for the module instance.
| stdClass | $cm | object with fields ->completion and ->customdata['customcompletionrules'] |
array::$descriptions | the array of descriptions for the custom rules. |
mod_assign_get_path_from_pluginfile | ( | string | , |
array | |||
) |
Given an array with a file path, it returns the itemid and the filepath for the defined filearea.
string | $filearea | The filearea. |
array | $args | The path (the part after the filearea and before the filename). |
array | The itemid and the filepath inside the $args path, for the defined filearea. |
mod_assign_output_fragment_gradingpanel | ( | ) |
Serve the grading panel as a fragment.
array | $args | List of named arguments for the fragment loader. |
string |
mod_assign_user_preferences | ( | ) |
Return a list of all the user preferences used by mod_assign .
move_group_override | ( | , | |
, | |||
) |
Change the sort order of an override.
int | $id | of the override |
string | $move | direction of move |
int | $assignid | of the assignment |
bool | success of operation |
reorder_group_overrides | ( | ) |
Reorder the overrides starting at the override at the given startorder.
int | $assignid | of the assigment |
xmldb_assign_upgrade | ( | ) |
upgrade this assignment instance - this function could be skipped but it will be needed later
int | $oldversion | The old version of the assign module |
◆ $logs.
$logs |
$messageproviders |
$observers |
$tasks |
Search code, repositories, users, issues, pull requests..., provide feedback.
We read every piece of feedback, and take your input very seriously.
Use saved searches to filter your results more quickly.
To see all available qualifiers, see our documentation .
Folders and files.
Name | Name | |||
---|---|---|---|---|
56,250 Commits | ||||
Contributors 125.
Find centralized, trusted content and collaborate around the technologies you use most.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Get early access and see previews of new features.
I am trying to use the Moodle API (web services) to get information about (my) assignment submissions. I want to know whether I submitted an attempt for the assignment already or not. I am using the mod_assign_get_assignments function (which doesn't have too much documentation) and the results I get (when looking at the assignments portion of each course) are:
The above result is for an assignment I have already submitted.
An example of an assignment I did not submit is:
The only apparent difference between these (that might point to a way to check if I submitted it or not) is the completionsubmit property, but that cannot be the solution because a different assignment that I have submitted has it set to 0 (just like the one I didn't submit).
Does someone have an idea how I can solve this issue?
Thanks in Advance!
EDIT: mod_assign_get_submissions denies my access
{"assignments":[],"warnings":[{"item":"assignment","itemid":myitemname,"warningcode":"1","message":"No access rights in module context"}]}
I looked now into mod_assign_get_submission_status but it seems like it is only able to parse one assignment at a time, does anyone have a way to make this more efficient?
You could try using mod_assign_get_submissions instead to retrieve submissions to assignments. Available since Moodle 2.5
Reminder: Answers generated by artificial intelligence tools are not allowed on Stack Overflow. Learn more
Post as a guest.
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy .
If you want to create a new page for developers, you should create it on the site. |
This content of this page has been updated and migrated to the new . The information contained on the page should no longer be seen up-to-date. Why not and ! |
This page gives an overview of assignment submission plugins within the assignment module.
An assignment submission plugin is used to display custom form fields to a student when they are editing their assignment submission. It also has full control over the display the submitted assignment to graders and students. Plugins participate in all assignment features including backup/restore, upgrades from 2.2, offline grading, group assignments and blind marking.
An assignment submission plugin can add settings to the module settings page.
An assignment submission plugin can show a summary of the submission to students and graders.
An assignment submission plugin can add form fields to the student submission page.
Assignment submission plugins were added with the assignment module rewrite for Moodle 2.3.
A great example is the "onlinetext" submission plugin included with Moodle core.
The files for a custom submission plugin sit under "mod/assign/submission/<pluginname>". A plugin should not include any custom files outside of its own plugin folder.
Note: The plugin name should be no longer than 11 characters - this is because the database tables for a submission plugin must be prefixed with "assignsubmission_" + pluginname (17 chars + X) and the table names can be no longer than 28 chars (thanks oracle). If a plugin requires multiple database tables, the plugin name will need to be shorter to allow different table names to fit under the 28 character limit.
All examples in this document exclude the required copyright and license information from source files for brevity.
To start with we need to tell Moodle the version information for our new plugin so that it can be installed and upgraded correctly. This information is added to version.php as with any other type of Moodle plugin. The component name must begin with "assignsubmission_" to identify this as a submission plugin.
See version.php for more information.
The settings file allows us to add custom settings to the system wide configuration page for our plugin.
All submission settings should be named 'assignsubmission_pluginname/settingname' in order for the setting to be associated with the plugin.
All submission plugins should include one setting named 'default' to indicate if the plugin should be enabled by default when creating a new assignment.
This example from the submission_file plugin also checks to see if there is a maxbytes setting for this moodle installation and if found, it adds a new admin setting to the settings page. The name of the setting should begin with the plugin component name ("assignsubmission_file") in this case. The strings are specified in this plugins language file.
The language file for this plugin must have the same name as the component name (e.g. "submission_file.php"). It should at least define a string for "pluginname". For example:
This is where any additional capabilities are defined if required. This file can be omitted if there are no capabilities added by the plugin.
See Activity_modules#access.php for more information.
This is where any upgrade code is defined.
See Activity_modules#upgrade.php for more information.
This is where any database tables required to save this plugins data are defined. File submissions define a table that links to submission and contains a column to record the number of files.
This example is from the submission_comments plugin. It shows how to run custom code on installation of the plugin. In this case it makes the comments plugin the last of the three submission plugins installed by default.
This is where all the functionality for this plugin is defined. We will step through this file and describe each part as we go.
All submission plugins MUST define a class with the component name of the plugin that extends assign_submission_plugin.
Get name is abstract in submission_plugin and must be defined in your new plugin. Use the language strings to make your plugin translatable.
The "get_settings" function is called when building the settings page for the assignment. It allows this plugin to add a list of settings to the form. Notice that the settings are prefixed by the plugin name which is good practice to avoid conflicts with other plugins.
The "save_settings" function is called when the assignment settings page is submitted, either for a new assignment or when editing an existing one. For settings specific to a single instance of the assignment you can use the assign_plugin::set_config function shown here to save key/value pairs against this assignment instance for this plugin.
The get_form_elements function is called when building the submission form. It functions identically to the get_settings function except that the submission object is available (if there is a submission) to associate the settings with a single submission. This example also shows how to use a filemanager within a submission plugin. The function must return true if it has modified the form otherwise the assignment will not include a header for this plugin.
The "save" function is called to save a user submission. The parameters are the submission object and the data from the submission form. This example calls file_postupdate_standard_filemanager to copy the files from the draft file area to the filearea for this submission, it then uses the event api to trigger an assessable_file_uploaded event for the plagiarism api. It then records the number of files in the plugin specific "assignsubmission_file" table.
If this submission plugin produces one or more files, it should implement "get_files" so that the portfolio API can export a list of all the files from all of the plugins for this assignment submission. This is also used by the offline grading feature in the assignment.
The view_summary function is called to display a summary of the submission to both markers and students. It counts the number of files submitted and if it is more that a set number, it only displays a count of how many files are in the submission - otherwise it uses a helper function to write the entire list of files. This is because we want to keep the summaries really short so they can be displayed in a table. There will be a link to view the full submission on the submission status page.
The view function is called to display the entire submission to both markers and students. In this case it uses the helper function in the assignment class to write the list of files.
The can_upgrade function is used to identify old "Assignment 2.2" subtypes that can be upgraded by this plugin. This plugin supports upgrades from the old "upload" and "uploadsingle" assignment subtypes.
This function is called once per assignment instance to upgrade the settings from the old assignment to the new mod_assign. In this case it sets the maxbytes, maxfiles and alwaysshowdescription configuration settings.
The "upgrade" function upgrades a single submission from the old assignment type to the new one. In this case it involves copying all the files from the old filearea to the new one. There is a helper function available in the assignment class for this (Note: the copy will be fast as it is just adding rows to the files table). If this function returns false, the upgrade will be aborted and rolled back.
This example is from assignsubmission_onlinetext. If the plugin uses a text-editor it is ideal if the plugin implements "get_editor_fields". This allows the portfolio to retrieve the text from the plugin when exporting the list of files for a submission. This is required because the text is stored in the plugin specific table that is only known to the plugin itself. If a plugin supports multiple text areas it can return the name of each of them here.
This example is from assignsubmission_onlinetext. If the plugin uses a text-editor it is ideal if the plugin implements "get_editor_text". This allows the portfolio to retrieve the text from the plugin when exporting the list of files for a submission. This is required because the text is stored in the plugin specific table that is only known to the plugin itself. The name is used to distinguish between multiple text areas in the one plugin.
This example is from assignsubmission_onlinetext. For the same reason as the previous function, if the plugin uses a text editor, it is ideal if the plugin implements "get_editor_format". This allows the portfolio to retrieve the text from the plugin when exporting the list of files for a submission. This is required because the text is stored in the plugin specific table that is only known to the plugin itself. The name is used to distinguish between multiple text areas in the one plugin.
If a plugin has no submission data to show - it can return true from the is_empty function. This prevents a table row being added to the submission summary for this plugin. It is also used to check if a student has tried to save an assignment with no data.
Determine if a submission is empty. This is distinct from is_empty() in that it is intended to be used to determine if a submission made before saving is empty.
A plugin should implement get_file_areas if it supports saving of any files to moodle - this allows the file areas to be browsed by the moodle file manager.
Since Moodle 2.5 - a students submission can be copied to create a new submission attempt. Plugins should implement this function if they store data associated with the submission (most plugins).
The format_for_log function lets a plugin produce a really short summary of a submission suitable for adding to a log message.
The delete_instance function is called when a plugin is deleted. Note only database records need to be cleaned up - files belonging to fileareas for this assignment will be automatically cleaned up.
This file is the entry point to many standard Moodle APIs for plugins. An example is that in order for a plugin to allow users to download files contained within a filearea belonging to the plugin, they must implement the componentname_pluginfile function in order to perform their own security checks.
See File_API for more information. Example:
A submission plugin has access to a number of useful classes in the assignment module. See the phpdocs (or the code) for more information on these classes.
This abstract class is the base class for all assignment plugins (feedback or submission plugins).
It provides access to the assign class which represents the current assignment instance through "$this->assignment".
This is the base class all assignment submission plugins must extend. It contains a small number of additional function that only apply to submission plugins.
This is the main class for interacting with the assignment module.
It contains public functions that are useful for listing users, loading and updating submissions, loading and updating grades, displaying users etc.
Add calendar events.
From Moodle 3.1 onwards, submission plugins can add events to the Moodle calendar without side effects. These will be hidden and deleted in line with the assignment module. For example:
This code should be placed in the "save_settings()" method of your assign_submission_plugin class.
[ Forgot your Viterbo username or password? ]
For additional help, contact the help desk at [email protected] .
Enrollment options.
Take the PHP-REST demo client: https://github.com/moodlehq/sample-ws-clients/tree/master/PHP-REST (or another one)
For each test, you will need to change the code between /// PARAMETERs as specified
Test 1) - Specify 1 or more assignment ids for which the user has 'mod/assign:grade' capability /// PARAMETERS $assignmentids[] = 3; // user has 'mod/assign:grade' capability for this assignment $assignmentids[] = 4; // user has 'mod/assign:grade' capability for this assignment $params = array('assignmentids'=>$assignmentids); /// PARAMETERS The web service should return the submissions for the specified assignments
Test 2) - Specify the status of the submissions /// PARAMETERS $assignmentids[] = 3; // user has 'mod/assign:grade' capability for this assignment $assignmentids[] = 4; // user has 'mod/assign:grade' capability for this assignment $params = array('assignmentids'=>$assignmentids, 'status'=>'submitted'); /// PARAMETERS The web services shoudld return all submissions for the specified assignments where the status is submitted
Test 3) - Specify a range of timemodified values /// PARAMETERS $assignmentids[] = 3; // user has 'mod/assign:grade' capability for this assignment $assignmentids[] = 4; // user has 'mod/assign:grade' capability for this assignment $params = array('assignmentids'=>$assignmentids, 'since'=>1331862337, 'before'=>1331862900); /// PARAMETERS The web services shoudld return all submissions for the specified assignments where the timemodified value is between the specified range
Test 4) - An assignment is specified for which the user does not have the mod/assign:grade capability /// PARAMETERS $assignmentids[] = 20; //user does not have 'mod/assign:grade' capability for this assignment $params = array('assignmentids'=>$assignmentids); /// PARAMETERS The web service returns a warning message
Create web service mod_assignment_get_assignment_submissions. This web service will return data from the assignment_submissions table. It will have 2 parameters:
Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.
Forgotten your username or password?
Some courses may allow guest access
Student help portal phone: 252-638-7212, course availability, moodle courses will be available to students on the first day of class each semester., moodle username and password reset, find username, reset password.
IMAGES
VIDEO
COMMENTS
Two assignment modules. in Moodle 2.3! Moodle 2.3 includes two assignment modules - the new assignment module (a rewrite of the old assignment module) under /mod/assign/ and the old assignment module under /mod/assignment/ with four subtypes, renamed 'Assignments (2.2)'. For new Moodle 2.3 installs, Assignments (2.2) is disabled/hidden.
The plugin name should be no longer than 36 (11 before Moodle 4.3) characters - this is because the database tables for a submission plugin must be prefixed with assignsubmission_[pluginname] ... This function is called once per assignment instance to upgrade the settings from the old assignment to the new mod_assign.
The mod_assign activity can be extended using two sub-plugin types, namely: submission plugins, used to provide different ways for students to submit their content. feedback plugins, used to extend the ways in which feedback may be provided to students on their submissions. Tags: Assign. Assignment. Subplugin.
For documentation about Assignments (2.2), see Assignment module in the 2.2 docs. The assignment module allows teachers to collect work from students, review it and provide feedback including grades. Students can submit any digital content (files), including, for example, word-processed documents, spreadsheets, images, audio and video clips.
Click on the assignment name on the Moodle course homepage to access the summary page and click View/grade all submissions. From the Grading action drop-down menu choose Upload grading worksheet. Click Choose a file... and upload the grading worksheet to Moodle, or drag the csv file to the arrow and wait for the file name to appear in the box.
Learn about Moodle's products, like Moodle LMS or Moodle Worplace, or find a Moodle Certified Service Provider. MoodleNet Our social network to share and curate open educational resources. ... The form is \mod\assign\mod_form.php form And I want to do this without modifying core code. ...
Moodle is a powerful, and very extensible, Learning Management System. One of its core tenets is its extensibility, and this is primarily achieved through the development of plugins. ... /mod/assign/feedback: Different forms of assignment feedbacks: 2.3+ Book tools: booktool /mod/book/tool: Small information-displays or tools that can be moved ...
The mod_assign all submissions downloaded event. The mod_assign assessable submitted event. This file contains the mod_assign assign_plugin_request_data class. Assign feedback subplugin info class. This file contains the assignfeedback_provider interface. This file contains the assignfeedback_user_provider interface.
a few minutes: 1) Move the Moodle files into your web directory. 2) Create a single database for Moodle to store all. it's tables in (or choose an existing database). 3) Visit your Moodle site with a browser, you should. be taken to the install.php script, which will lead. you through creating a config.php file and then.
Although this theme and some other themes would be compatible with Moodle they don't really make full use of the enhanced UI and layouts that Moodle 4.0 offers and have the same three column layout, but they do work. I believe by the time Moodle 4.1 is released the themes should be updated make use of the enhanced UI offered by Moodle 4.0
Re: Moodle 4 upgrade error: EXCEPTION- class'mod_assign_renderer' not found by Gareth J Barnard - Tuesday, 10 January 2023, 7:29 PM The theme is also set in the database, 'config' table for the 'name' column with the value 'theme', therefore set the name of the theme without any quotes, i.e. its folder name as the value of the respective 'value ...
1. I am trying to use the Moodle API (web services) to get information about (my) assignment submissions. I want to know whether I submitted an attempt for the assignment already or not. I am using the mod_assign_get_assignments function (which doesn't have too much documentation) and the results I get (when looking at the assignments portion ...
Mod/assign not deleting submission status. Hi all, After upgrading to Moodle 3.9.6 we found that student users who use the "remove submission" option in the mod/assign plugin get a confusing situation. The file gets removed, but the submission status stays the same (assignment submitted). This creates the situation of "ghost" assignments where ...
Verify that there is a subdirectory 'assign' under your 'mod' directory and that it contains PHP files. If there isn't, something went wrong when you installed the Moodle 3 codebase, as this is a core plugin. If you uninstall it per the other advice, and you previously used that module, you will lose all data associated with that module.
Plugin naming. The plugin name should be no longer than 36 (11 before Moodle 4.3) characters - this is because the database tables for a submission plugin must be prefixed with assignsubmission_[pluginname] (17 chars + X) and the table names can be no longer than 53 (28 before Moodle 4.3) chars due to a limitation with PostgreSQL.
Learn about Moodle's products, like Moodle LMS or Moodle Worplace, or find a Moodle Certified Service Provider. MoodleNet Our social network to share and curate open educational resources.
iAssign (Interactive Assignment) package aims to enhance activities in Moodle, allowing the incorporation of "Interactive Learning Modules" (iLM) to Moodle. iAssign also provides: an area to teachers cooperate (Block); a filter to incorporate any iLM in any Moodle text (Filter); and a TinyMCE editor button (TinyMCE Plugin). Attention: in order to proper work, iAssign needs its associated ...
For additional help, contact the help desk at [email protected].
Create web service mod_assign_get_course_assignments Parameter: Capability Returned value: list of courses and assignments that this user has a particular capability in. Attachments
Description. Create web service mod_assign_get_grades. Parameters: list of assignment ids (required) since (optional) used to return only records with timemodified field >= since) Return: Array of records from the new Moodle 2.3 assign_grades table. Attachments.
When using mod_assign_get_submission to query all submissions for an assignment an empty submission is returned for each user. This seems to always be empty and share the state (e.g. status, gradingstatus) of the submission of the users group. ... Powered by a free Atlassian Jira open source license for Moodle Pty Ltd. Try Jira - bug tracking ...
This page should automatically redirect. If nothing is happening please use the continue link below. Continue
Moodle Help Tech Support Academic Support Student Services and Resources Distance Learning Librarian Accessibility. My Books; My Grades; ASL102-B01-202460 American Sign Language II. Home; Courses; Summer 2024; Communicative Disorders; ASL102-B01-202460; Enrollment options;
Test 1) - Specify 1 or more assignment ids for which the user has 'mod/assign: ... MDL-31409 Incorporate Lightwork into the Moodle core. Closed; is blocked by. MDL-31683 mod_assign_get_assignments. Closed; MDL-31270 New assignment module to replace all existing subtypes . Closed; Activity. People.
Hybrid and Online Teacher Training-HOTT Resources Center for Teaching and Learning - Moodle Support Page Distance Learning Faculty Handbook. Need Help? Student Help Desk Faculty/Staff - send email to [email protected]. You are currently using guest access . 2024SUACA-122-NWL2. Home;