[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/mod/assign/ -> submissionplugin.php (summary)

This file contains the definition for the abstract class for submission_plugin This class provides all the functionality for submission plugins.

Copyright: 2012 NetSpot {@link http://www.netspot.com.au}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 140 lines (5 kb)
Included or required:0 times
Referenced: 2 times
Includes or requires: 0 files

Defines 10 functions

  get_subtype()
  allow_submissions()
  precheck_submission()
  submit_for_grading()
  copy_submission()
  lock()
  unlock()
  revert_to_draft()
  add_attempt()
  submission_is_empty()

Functions
Functions that are not part of a class:

get_subtype()   X-Ref
return subtype name of the plugin

return: string

allow_submissions()   X-Ref
This plugin accepts submissions from a student
The comments plugin has no submission component so should not be counted
when determining whether to show the edit submission link.

return: boolean

precheck_submission($submission)   X-Ref
Check if the submission plugin has all the required data to allow the work
to be submitted for grading

param: stdClass $submission the assign_submission record being submitted.
return: bool|string 'true' if OK to proceed with submission, otherwise a

submit_for_grading($submission)   X-Ref
Carry out any extra processing required when the work is submitted for grading

param: stdClass $submission the assign_submission record being submitted.
return: void

copy_submission( stdClass $oldsubmission, stdClass $submission)   X-Ref
Copy the plugin specific submission data to a new submission record.

param: stdClass $oldsubmission - Old submission record
param: stdClass $submission - New submission record
return: bool

lock($submission, stdClass $flags)   X-Ref
Carry out any extra processing required when the work is locked.

param: stdClass|false $submission - assign_submission data if any
param: stdClass $flags - User flags record
return: void

unlock($submission, stdClass $flags)   X-Ref
Carry out any extra processing required when the work is unlocked.

param: stdClass|false $submission - assign_submission data if any
param: stdClass $flags - User flags record
return: void

revert_to_draft(stdClass $submission)   X-Ref
Carry out any extra processing required when the work reverted to draft.

param: stdClass $submission - assign_submission data
return: void

add_attempt(stdClass $oldsubmission, stdClass $newsubmission)   X-Ref
Carry out any extra processing required when a student is given a new attempt
(i.e. when the submission is "reopened"

param: stdClass $oldsubmission The previous attempt
param: stdClass $newsubmission The new attempt

submission_is_empty(stdClass $data)   X-Ref
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.

param: stdClass $data The submission data
return: bool



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1