Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Assignment Subtypes Combined

From MoodleDocs

Introduction

This feature is part of the assignment module redevelopment project (https://docs.moodle.org/dev/Assignment). It involves creating a new module (mod_assign) that supersedes the previous one (mod_assignment). It provides all of the features of the four standard subtypes within one module (ie - you can enable file uploads, online text, notes, feedback etc).

Examples

See the use cases in the assignment redevelopment page.

This list is not exhaustive - the new assignment module will allow combinations that were not previously possible (e.g. An online assignment that also accepts file submissions)

Requirements

Core requirements

  • No loss of functionality from old assignment module to new assignment module
  • Supports Upgrade from old assignment module to new assignment module
  • Support for Portfolio API
  • Support for Plagiarism API
  • Full backup/restore support

Optional requirements

  • Allow subclasses to extend the standard assignment module (similar to the sub-types - but as a complete new module)

Pre-requisites

Moodle 2.3 required

Community bonding period

Milestones

  • Document proposed design and get community feedback
  • Decide list of settings
  • Decide code/file structure layout
  • Create mockups

Decisions

Base class

There are 2 options for creating this module. These have been proposed in the Meta-ticket (MDL-26997) and all responses so far have chosen option A.

Option A

Is to create a new assignmentlib.php which contains an abstract base class for creating assignments and can be overridden by sub-classes. The new mod_assign would be an example of a module implementing the abstract base class. This would allow other custom assignment types to reuse alot of code particularly in creating the user interfaces and supporting standard features from the base class. The sub-type could then customise the implementation by disabling standard features (such as file uploads) and adding new functionality (such as an alternative submission type). The question is whether there is enough custom code in the assignment module to make this worthwhile. The most complex user interface is currently the grading page and there has been discussion of moving this into the gradebook.

Option B

Is to create the new module as a self contained module within the mod_assign folder. This would not allow people to extend it but they could copy the code into a new module and modify it as much as they like. This option is simpler but has drawbacks for maintaining forked code etc.

Coding period

Milestones

  • Implement proposed design (new module only)
  • Implement Backup/Restore
  • Implement Upgrades
  • Code complete - ready for integration

File structure

Class Diagram

Mockups

Screenshots