Note:

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

POAS Assignment development: Difference between revisions

From MoodleDocs
m (Mudrd8mz moved page Assignment development to POAS Assignment development: Renaming to avoid confusion with the standard Assignment module)
(24 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Moodle 2.0}}
{{Moodle 2.0}}
This is a proposition of Assignment module development from Volgograd State Technical University. I see no reason in keeping it as a separate module thanks to the trouble of backporting any fixes/improvments done in assignment. There is no reason to make it an assignment plugin too, as it will need a separate copy of each of the current plugins (online, offline etc).
This was a proposition of Assignment module development from POAS department of Volgograd State Technical University.  
We don't want to fork from core, but was forced to do it by Moodle team. So it will be a separate module, that you can use instead of standard assignment. There may be a convertor some time ago.


== Assignment 1.9 improvments ==
New module name will be a poasassignment.
Just several simple, but useful improvments that can be done in stable version too:
== Assignment 1.9 improvements ==
# Usability improvment: on submission.php add a cobmo box to filter the content of the table: Show all/with submissions/await grading. That speed up grading much.
Just several simple, but useful improvements that can be done in stable version too:
# New capability: viewownsubmission. Setting it to Deny makes assignment module useful in exam context - collect student's work without their further access to it.
# Usability improvement: on submission.php add a combo box to filter the content of the table: Show all/with submissions/await grading. That speed up grading much. See MDL-14238
# New capability: viewownsubmission. Setting it to Deny makes assignment module useful in exam context - collect student's work without their further access to it. See MDL-15356
# Replace link with the number of submissions (for the teacher) with more informative "The ___ of ___ submissions needs grading". MDL-17613


== Refactoring ==
== Assignment 1.9 Refactoring ==
Some areas of assignment can be reworked for greater flexibility and reducing code duplication. Assignment base is actualy an awful, bloated class where all things are intermixed. And any plugin inherits it fully. Some plugins have similar features too, implemented separately.
Some areas of assignment can be reworked for greater flexibility and reducing code duplication. Assignment base is actualy an awful, bloated class where all things are intermixed. And any plugin inherits it fully. Some plugins have similar features too, implemented separately. Overall issue for this is MDL-17329.


Any step of refactoring is designed so it can be stopped on it without trouble.
Some major improvments:
# Rework main pages to create flexible tab interface and break assignment_base on several pieces (it'll still remain as a stub class to allow plugins work just as now) - ''minor interface changes''
* 'types' will be no longer considered separate activities, just a option in the mod_form
# Unification of current core plugins, move all workflow code to the base class instead - ''minor interface changes'', ''possible minor functionality changes'' to unify plugins, if we get some sort of agreement on them
* 'type' plugins, which defines what can be submitted, will be reduced to just that purpose, all workflow would be controlled from main module (reducing numerous duplicates and inconsistences)
# Plugins should inherit specific assignment_type class, not all assignment_base (depends on 2)
* there will be two basic 'type' plugins (text and files), which can be used in any combination (from no one to both)
# Separate submission from grade handling in the code - right now it's just one object (depends on 1)
** no one is effectively an offline task
# Rework grading table code, so we can easily add a columns or changing row meaning - ''minor interface changes'' (depends on 1)
** files (reworked upload) can serve for both single and multiple files uploads
# Possibly drop assignment_base support at end, in favour of new, more clear classes (depends on all previous changes)- ''compatibility break for 3d party modules''
* there will be possible to create new activities based on this module, inheriting it's main classes, for major workflow customisations, and they will have full access to 'type' plugins


== POAS Assignment Refactoring ==
We are planning to reorganize our code base. The main purposes are:
*  make it more flexible,
*  distribute a responsibility correctly.


=== Tabs ===
Along the way, calls of deprecated functions and methods will be removed (e. g. Logging).
This will change interface slightly, but its main reason is under hood - better code organisation.
 
The assignment module has two main pages now: submitting page and grading page, which are  closely interleaved in assignment_base, but have separate php files with duplicated code.
 
Benefits:
# break assignment_base class on several smaller, more concise classes
# create an easy and modular way to add a new big pages without interfering with current pages
# get rid of the code duplication in view.php and submission.php, and submission.php file as well
# get one place for security-sensitive code of the pages/tabs, so no page author can forget to require login or check at least basic capabilities
 
The classes will be organised in a new way:
# abstract_tabbed_page class - represent's an abstract page with a set of tabs, contains functions for tabs management
# abstract_tab class - abstract class to represent a tab, contains functions for
#* dislpaying tab content and processing returned data
#* check, if the user have a capabilities required to view this tab at all, and return a error message if necessary
#* log tab action
# assignment_page class - child of abstract_tabbed_page with assignment-specific stuff; will create assignment_model instance and send it to the tab class
# assignment_view class - child of abstract_tab to place a code for view function in assignment base, and all stuff closely related to it
# assignment_grade class - child of abstract_tab to place a code for grading page (and popup window)
# assignment_model class - class to place all functions of assignment_base, related to data handling and all generally useful helper functions; it will be cleaned up during next stages
# assignment_base - will be left as a stub class to not break interface with plugins
 
=== Plugins unification ===
The most painful issue as it need's some discussion and user-visible features reorganisation. The four main plugins seems undertook a parallel development without any unification in the mind, so they have many duplicated code and slighlty different features implemented separately.
 
Big problem is a upload plugin, which is quite hacked and awfully coded, with many of unique features, not all of them worth keeping for all plugins
* the most strange thing is an ability for teacher to upload some files with a grade, as a response to a particular student's answer. Grade-and-comment is an usual Moodle thing, but files as a comment to a grade... not seen anywere in the Moodle, quite costly and I personally don't see much use for it (maybe add a files with examples to the assignment text instead, as in workshop module). Also not compatible with quick grading mode. Need discussion thought.
 
Goal:place all code related to assignment workflow in base class, leaving plugins to define what submission is and how it should be submitted and displayed.
 
Benefits:
# unified workflow for all assignment types
#* less confusion to the user
#* less code and maintenance costs
# define a plugin purpose more clearly
# get rid of many duplicated code
 
=== Type plugins ===
After previous cleanup, it will be possible to define a more clear interface for plugins, getting them as an instance of assignment_type class instead of childs of assignment_base.
 
These plugins will be viewed as 'type' plugins, i.e. plugins which define a type of submission. Inheritance from the base classes should be reserved to things, that'll add a significant amount of new functionality to an assignment workflow (such as a development proposed below), then 'type' plugins will be accesible to any such code without creating a separate set of them.
 
Benefits:
# clearly define a 'type' plugins interface and restrictions
# make a distinction between workflow-related plugins (or something) and type-related plugins; get them available to each other
 
 
Assignment_base class support can be dropped at any time from now on, if we want to force 3d party plugins to comply with new standards in 2.0 (or something), and get rid of internal legacy code as well.


=== Submission/grading separation ===
Key points are:
*  ''Namespaces.'' All classes will be organized using namespaces (like java packages).
*  ''Automatic class loading.'' Reduce usage of require().
*  ''Usage of modern API.'' Events 2, Logging 2, etc.
*  ''Advanced Grading Methods.'' The criterions will be replaced with a separate AGM plugin (POAS Criterial Grading Method or Accumulative Grading Method<sup>[Issue link?]</sup>). The POAS Assignment will support AGM.
*  ''Usage of Assignment 2 submission methods''.
*  ''A minor visual changes.''


=== Grading table abstraction ===
Known issues:
*  The Assignment 2 submission methods  does not allow their usage with other plugins (MDL-47344).


=== Remove support of old syntactical constructs ===
Planned namespace structure for mod_poasassignment is:
* '''classes/'''
** '''model/'''
*** assignment
*** individual_task
*** ...
*** '''submission/'''
**** base
*** '''distribution+strategy/'''
**** base
*** '''grader/'''
**** base
** '''view/'''
*** '''form/'''
*** '''page/'''
**** base
** '''event/'''
*** instance_available
*** assessable_submitted
*** ...


== New Features ==
== New Features ==


=== Teams ===
=== Teams ===
  This feature is on hold and may wait for a second version of module. Right now we are more focused on task distribution
One main assumption in the assignment module is need to be eliminated is "one user=one submission=one grade". The quite common practice is grouped assignments, where students can work in small groups on a task. So we need a teams support there. (Well, quite big work as many functions use this assumption).
One main assumption in the assignment module is need to be eliminated is "one user=one submission=one grade". The quite common practice is grouped assignments, where students can work in small groups on a task. So we need a teams support there. (Well, quite big work as many functions use this assumption).


Line 83: Line 70:
* submission is one per team, but a grade can be given on per-team or per-student basis
* submission is one per team, but a grade can be given on per-team or per-student basis
* teacher can define a minimum and maximum number of students in the team
* teacher can define a minimum and maximum number of students in the team
* self-organisation (with possibility of confirmation by teacher) or forced by teacher teams
* self-organization (with possibility of confirmation by teacher) or forced by teacher teams
* maximum date of team membership editing
* maximum date of team membership editing
* teacher can add themselve to teamas a mentor, then he only will be notified of events in this team
* teacher can add themselves to teamas a mentor, then he only will be notified of events in this team
* 'roles' (or workroles to avoid confusion with Moodle Roles) of people in team (either teacher or student defined) - this is a way to explain who in group will do what
* 'roles' (or workroles to avoid confusion with Moodle Roles) of people in team (either teacher or student defined) - this is a way to explain who in group will do what
** teacher-defined roles is a list, from which one or several roles can be selected for students
** teacher-defined roles is a list, from which one or several roles can be selected for students
Line 91: Line 78:


=== Individual tasks ===
=== Individual tasks ===
Individual tasks is another quite common situation in the educational process. The module can handle tasks selection and completion.
Individual tasks is quite common situation in the educational process. The module can handle tasks selection and completion.


Individual tasks features:
Individual tasks features:
* adding/editing/deleting of tasks by the teacher
* adding/editing/deleting of tasks by the teacher
* standart fields: name, description, grade factor (1 by default), min/max teamnumber (if teams activated)
* standart fields: name, description, grade factor (1 by default), min/max teamnumber (if teams activated)
* custom fields, which can be added in any given assignment, of several types: string, text, number, date, menu
* custom fields, which can be added in any given assignment, of several types: string, text, number, date, menu, file
* some fields can only be accessible to the student once he is selected a task (and it will be approved by a teacher if necessary)
* student's selection (with optional teacher approval), teacher-forced selection or random selection based on a student's selection of subset of tasks fields (number or menu mainly, i.e. some sort of 'complexity' field for example)
* student's selection (with optional teacher approval), teacher-forced selection or random selection based on a student's selection of subset of tasks fields (number or menu mainly, i.e. some sort of 'complexity' field for example)
* maximum dates of selection (and approval if necessary)
* maximum dates of selection (and approval if necessary)
* column with task name (link to the task) when grading
* column with task name (link to the task) when grading
* random filling of some task fields (number or menu mainly) on selection or approval
* random filling of some task fields (number or menu mainly) on selection or approval
** there is some problem of misuse of random generator; they are mainly dealed with fact that student's can change task and select new without teacher
** there is some problem of misuse of random generator; they are mainly dealt with fact that student's can change task and select new without teacher


=== User interface - tabs ===
=== User interface - tabs ===
Line 108: Line 96:
New features will require more pages, so it's better to use tabs for them. Tabs visibility will be based on user's capabilities.
New features will require more pages, so it's better to use tabs for them. Tabs visibility will be based on user's capabilities.


Urgent reminders will be places on top (or bottom?) of every tab with color highliting;
Urgent reminders will be places on top (or bottom?) of every tab with color highlighting;
* for students
* for students
** if he is late to select a task/become a member of team
** if he is late to select a task/become a member of team
Line 116: Line 104:
** if there are students without task/team after date of last approval
** if there are students without task/team after date of last approval


=== Plugins capabilities enhancement ===
=== Grades aggregation ===
* plugins can define their own tabs
Sometimes teacher want to grade student's submissions by several grading scales and than having the computer to calculate resulting grade. Is this possible using gradebook or should be duplicated in module is under investignation.
*# tabs can be implemented as classes
* ''maybe'' plugins can add a columns to the grading table


=== Grading plugins ===
=== Grading semi-plugins ===
Sometimes assignments allow for automatic, or semi-automatic grading. It's nice to have options to have a plugin system for this.
Sometimes assignments allow for automatic, or semi-automatic grading. It's nice to have options to have a plugin system for this.


Line 134: Line 120:
* (2) student(s) can add themselves to the team, teacher can add students to the team (in last case student notified that he/she was added)
* (2) student(s) can add themselves to the team, teacher can add students to the team (in last case student notified that he/she was added)
* (2) students can plead to free them from team/task, teacher can disapprove (if allowed) members or task (students is notified if they are disapproved)
* (2) students can plead to free them from team/task, teacher can disapprove (if allowed) members or task (students is notified if they are disapproved)
* (2) after the team will have at least minumum number of participants -> '''have enought people''' (3)
* (2) after the team will have at least minimum number of participants -> '''have enough people''' (3)
* (3) all (2) operatoins still available
* (3) all (2) operations still available
* (3) students can confirm his will to work with team(now that he knows all it's memebers), teacher can approve a team - approvment automatically cleared if team membership changes (people that have approves is notified)
* (3) students can confirm his will to work with team(now that he knows all it's members), teacher can approve a team - approvment automatically cleared if team membership changes (people that have approves is notified)
* (3) after the date of last approval, no more changes in teams available for students, (for teachers it's depends on capabilities), if there is an unapproved team the teacher will be shown (and sent) urgent reminder
* (3) after the date of last approval, no more changes in teams available for students, (for teachers it's depends on capabilities), if there is an unapproved team the teacher will be shown (and sent) urgent reminder
* (3) after the students (if allowed) approved a team and task -> '''ready''' (4) (if teacher approvment needed) or '''working''' (5) (students and teacher notified)
* (3) after the students (if allowed) approved a team and task -> '''ready''' (4) (if teacher approvment needed) or '''working''' (5) (students and teacher notified)
* (4) after teacher approval -> '''working''' (5) (students notified)
* (4) after teacher approval -> '''working''' (5) (students notified)
* (4) in case of teacher disapproval -> '''have enought people''' (3) (students notified)
* (4) in case of teacher disapproval -> '''have enough people''' (3) (students notified)
* (5) any student in the team can submit work with flag 'please check our progress' (if allowed), then teacher is notified and able to give comment but not grade (teacher notified, student's notified of comment)
* (5) any student in the team can submit work with flag 'please check our progress' (if allowed), then teacher is notified and able to give comment but not grade (teacher notified, student's notified of comment)
* (5) any student in team can make a normal submit, but it (optionally) may need an approval from other memebers for grading -> '''await grading''' (6) (teacher notified)
* (5) any student in team can make a normal submit, but it (optionally) may need an approval from other members for grading -> '''await grading''' (6) (teacher notified)
* (6) the teacher can only grade a team in '''await grading''' status
* (6) the teacher can only grade a team in '''await grading''' status
* (6) teacher grades, but grade isn't final -> '''reworking''' (5) (students notified)
* (6) teacher grades, but grade isn't final -> '''reworking''' (5) (students notified)
Line 149: Line 135:


Well it's probably looked worse than is. The actual user will see only part of options, and all forms of approval can be disabled.
Well it's probably looked worse than is. The actual user will see only part of options, and all forms of approval can be disabled.
=== Files handling ===
There is some confusion about files handling in current version of assignment module. This is need to be corrected. So there should be a several types of files:
# '''assignment''' files - files that is showed and accessible to all, and associated with assignment in general even if individual tasks is used (such as guidelines for it's completion that apply to all regardless of individual task);
# '''task''' files - some file(s) that teacher want to give students before they start to work on particular task;
# '''submission''' files - files that was submitted by a particular student (team);
# '''reply''' (comment) files - files that was uploaded by a teacher when grading submitted work, usually rewised versions of submitted files (thanks to A.T. Wyatt comment there)


== Implementation ==
== Implementation ==


=== New options ===
=== New options ===
Let's see an assignment creation/editing screen. Assigment module will keep all existing options.
Let's see an assignment creation/editing screen. Assignment module will keep all existing options.


New options that will be added:
New options that will be added:
Line 162: Line 156:
** min and max count of members of team
** min and max count of members of team
** the grade will be individual or one per team
** the grade will be individual or one per team
** if students must confirm it will to work with team (first student, who create a team, may not be happy with someone who add youself to it later)
** if students must confirm it will to work with team (first student, who create a team, may not be happy with someone who add yourself to it later)
** if teacher must confirm team membership
** if teacher must confirm team membership
** if all team memebers must confirm a submission before grading
** if all team members must confirm a submission before grading
* individual task options (active only if tasks is selected)
* individual task options (active only if tasks is selected)
** allow using same tasks - can several students do one task or all tasks must be different?
** allow using same tasks - can several students do one task or all tasks must be different?
** allow using same tasks in one group
** allow using same tasks in one group
** individual date - allow individual due dates to the task
** individual date - allow individual due dates to the task
** individual team memebers count - if teams used, can particular task override min/max number of students in team
** individual team members count - if teams used, can particular task override min/max number of students in team
** teacher must confirm task selection
** teacher must confirm task selection
** random task assignment
** random task assignment
  Dmitry, can you please place appropriate screenshot there --[[User:Oleg Sychev|Oleg Sychev]] 08:53, 3 December 2008 (CST)
 


=== DB structure ===
=== DB structure ===
[[Image:db_shema.jpg]]
[[Image:db schema.jpg]]


The new db structure have such tables:
The new db structure have such tables:
* '''assignment''' - main table which have new options:
* '''poasassignment''' - main table which have new options :
*# maxmembersontask - maximum count of members which must to do the task
*# maxmembersontask - maximum count of members which must to do the task
*# minmembersontask - minimum count of members which must to do the task
*# minmembersontask - minimum count of members which must to do the task
Line 187: Line 181:
*# timereception - start time for tasks reception
*# timereception - start time for tasks reception
*# flags - all binary options
*# flags - all binary options
* '''assignment_tasks''' - table for task list of instance of activity:
* '''poasassignment_tasks''' - table for task list of instance of activity:
*# name - the name of task
*# name - the name of task
*# descripiton - task "body"
*# descripiton - task "body"
Line 194: Line 188:
*# maxmembers - maximum workgroup members on task
*# maxmembers - maximum workgroup members on task
*# minmembers - minimum workgroup members on task
*# minmembers - minimum workgroup members on task
* '''assignment_fields''' - define list of custom fields:
* '''poasassignment_fields''' - define list of custom fields:
*# ftype - type of the field
*# ftype - type of the field
*# name - name of the field
*# name - name of the field
Line 203: Line 197:
*# rndparam - if this field used to define filter for random selection of task
*# rndparam - if this field used to define filter for random selection of task
*# rndshow - if this field will get random value on task selection (number or menu fields only)
*# rndshow - if this field will get random value on task selection (number or menu fields only)
* '''assignment_field_consts''' - define consts for the fields type of list
* '''poasassignment_field_consts''' - define consts for the fields type of list
* '''assignment_values''' - values for particular task/workgroup
* '''poasassignment_values''' - values for particular task/workgroup
* '''assignment_workgroups''' - table for working groups, also submissions stuff go there
* '''poasassignment_workgroups''' - table for teams, also submissions stuff go there
* '''assignment_workgroup_members''' - members of working group, grade stuff go there:
* '''poasassignment_workgroup_members''' - members of teams, grade stuff go there:
*# userid -  
*# userid -  
*# grade - this is the grade for submission
*# grade - this is the grade for submission
Line 215: Line 209:
*# deletefrom - please kick me from this working group (or task)
*# deletefrom - please kick me from this working group (or task)
*# deletecomment - explanation why student needs to delete from this working group
*# deletecomment - explanation why student needs to delete from this working group
* '''assignment_role''' - roles for the task:
* '''poasassignment_role''' - roles for the task:
*# one task have many roles
*# one task have many roles
*# one student perform many roles
*# one student perform many roles
  Rethink tables/columns, define how a type plugin can use db, rename workgroups into teams everywhere --[[User:Oleg Sychev|Oleg Sychev]] 11:12, 11 September 2009 (UTC)


=== Tabs ===
=== Tabs ===
Line 230: Line 225:
* student: show team members (when teams used)
* student: show team members (when teams used)
* student: can approve team and submission, select or type his roles
* student: can approve team and submission, select or type his roles
* teacher: the number of submissions will be shown JFI as there is a tab for grading now (maybe as a link, just as in quiz now - maybe it must be moved to down center area)
* teacher: the number of submissions will be shown JFI as there is a tab for grading now (maybe as a link, just as in quiz now - it must be moved to down center area)
* teacher: the number of submissions will be showed as <need grading>/<all submissions>
* teacher: the number of submissions will be showed as <need grading>/<all submissions>


==== Custom tasks fields ====
==== Custom fields ====
This tab is for managing custom fields for the tasks. The author can add/edit/delete fields there.
This tab is for managing custom fields for the tasks. The author can add/edit/delete fields there.


Line 243: Line 238:
* student: browsing task list, viewing task details
* student: browsing task list, viewing task details
* student (without teams): selecting a task
* student (without teams): selecting a task
* student (in team mode): see current teams(at least uncomplete), create team for a task, apply for team membership
* student (in team mode): see current teams(at least incomplete), create team for a task, apply for team membership




Line 256: Line 251:
* grade columns/popus will be showed only when grading is allowed (or if person has mod/assignment:manageanything capability)
* grade columns/popus will be showed only when grading is allowed (or if person has mod/assignment:manageanything capability)
*# team grades - each string represent a team
*# team grades - each string represent a team
*# individual grades - each string repesent a student, but they are sorted by team and teams is spaced somehow
*# individual grades - each string represents a student, but they are sorted by team and teams is spaced somehow
* make an option for the teachers to make any grade final, forbidding further re-submissions and/or regrading (a person with mod/assignment:manageanything can still regrade); in teams with individual grading mode re-submission will be forbidden only when all team members receive final grade
* make an option for the teachers to make any grade final, forbidding further re-submissions and/or regrading (a person with mod/assignment:manageanything can still regrade); in teams with individual grading mode re-submission will be forbidden only when all team members receive final grade
* dropdown to choose whom to display in the table (and in the popup): all, with submissions only, needs grading only
* dropdown to choose whom to display in the table (and in the popup): all, with submissions only, needs grading only
  Dmitry, please add a screenshots there as soon as you will have them --[[User:Oleg Sychev|Oleg Sychev]] 15:17, 1 December 2008 (CST)


=== Capabilities ===
=== Capabilities ===
Current capabilities
Current capabilities
* mod/assignment:view - actually quite strange capability that can completely block you from assignment
* mod/poasassignment:view - actually quite strange capability that can completely block you from assignment
* mod/assignment:submit - ability to submit a work
* mod/poasassignment:submit - ability to submit a work
* mod/assignment:grade - ability to grade submissions
* mod/poasassignment:grade - ability to grade submissions


New capabilities
New capabilities
* mod/assignment:viewownsubmission (can be backported to 1.9) - sometimes we need to not allowing the student to see own submission (exams cases mostly)
* mod/poasassignment:viewownsubmission (can be backported to 1.9) - sometimes we need to not allowing the student to see own submission (exams cases mostly)
* mod/assignment:manageanything - person with high authority, for whom don't apply usual restrictions: he can edit/delete tasks on which people worked right now, manage group membership and their tasks after an approval, override final grades and so on
* mod/poasassignment:manageanything - person with high authority, for whom don't apply usual restrictions: he can edit/delete tasks on which people worked right now, manage group membership and their tasks after an approval, override final grades and so on
* mod/assignment:managetasks - ability to create, edit and delete tasks
* mod/poasassignment:managetasks - ability to create, edit and delete tasks
* mod/assignment:managefields - ability to manage custom fields of tasks
* mod/poasassignment:managefields - ability to manage custom fields of tasks
* mod/assignment:finalgrades - can make grades final
* mod/poasassignment:finalgrades - can make grades final
* mod/assignment:manageteams - ability to create, force students to the team, approve students (teacher's ability)
* mod/poasassignment:manageteams - ability to create, force students to the team, approve students (teacher's ability)
* mod/assignment:managetaskselection - ability to manage tasks selection for any student (teacher's ability)
* mod/poasassignment:managetaskselection - ability to manage tasks selection for any student (teacher's ability)
* mod/assignment:manageownteam - ability to create new team, apply to existing one, confirm memebership of the others in this team (student's ability, setting it to Deny will create an assignment where only teachers can manage teams membership)
* mod/poasassignment:manageownteam - ability to create new team, apply to existing one, confirm memebership of the others in this team (student's ability, setting it to Deny will create an task where only teachers can manage teams membership)
* mod/assignment:selectowntask - student's ability to select task (setting to Deny allows for teachers-only tasks selection)
* mod/poasassignment:selectowntask - student's ability to select task (setting to Deny allows for teachers-only tasks selection)
* mod/assignment:seeotherstasks - student's ability - if he/she is able to see what tasks are selected by other people, or he can see only if it free for selection
* mod/poasassignment:seeotherstasks - student's ability - if he/she is able to see what tasks are selected by other people, or he can see only if it free for selection
 
=== Events ===
Events will be added in future releases.
{| class="nicetable"
|-
 
! Event name
! Event data
! Description
 
|-
 
| '''\mod_poasassignment\event\instance_available'''
|
; contextinstanceid : Poasassignment course module ID.
| Fired when 'available from' time comes (if specified), instantly when creating a course element or when element become visible to the students.
 
|-
 
| '''\mod_poasassignment\event\instance_unavailable'''
|
; contextinstanceid : Poasassignment course module ID.
| Fired when time for submissions expired, course module hidden from students or deleted.
 
|-
 
| '''\mod_poasassignment\event\task_selected'''
|
; contextinstanceid : Poasassignment course module ID.
; userid : Student's user ID.
| Fired when an invidual task is selected for the student (either by himself, by teacher or automatically)


=== Assignment base class reworking ===
|-


==== Issues ====
| '''\mod_poasassignment\event\assessable_submitted'''
# there are number of functions closely related to one user=one assignment=one grade issue
|
#* submissions
; contextinstanceid : Poasassignment course module ID.
#* update_main_listing
; userid : Student's user ID.
#* display_submission
| Fired when the student adds a ''non-draft'' submission.
#* display_submissions
#* process_feedback as it's assume userid in feedback, ''maybe'' process_outcomes too
#* get_submission, prepare_new_submission
#* print_user_files - troublesome function, it will still work with call in user_complete, but probably not work with display_submission (this call is quite strange, as it probably must be handled by plugin on the same basis as print_student_answer
#* reset_user_data
#* any grading-related functions
# we must use new tabs system instead of submitted_link function
# email_teachers function need reworking to get more options available, as there will be more events that need to be emailed to teachers
#* maybe we will need email_students function too?
# all plugins override view function now, instead of one of it's subfunctions; this is quite strange and can be removed


==== Solutions ====
|-


| '''\mod_poasassignment\event\submission_graded'''
|
; contextinstanceid : Poasassignment course module ID.
; userid : Teacher's user ID.
; relateduserid : Student's user ID.
; other->isfinal : Is this grade final.
| Fired when the student's attempt is graded by the instructor.
|}


==== New functions ====
[[Category:Assignment]]
# Ability to add new tabs for plugins
# Ability to add student's/teacher's notification events for plugins
# Ability to override some parts of grading table for plugin (change the meaning of the rows and columns)

Revision as of 10:11, 22 October 2014

Moodle 2.0


This was a proposition of Assignment module development from POAS department of Volgograd State Technical University. We don't want to fork from core, but was forced to do it by Moodle team. So it will be a separate module, that you can use instead of standard assignment. There may be a convertor some time ago.

New module name will be a poasassignment.

Assignment 1.9 improvements

Just several simple, but useful improvements that can be done in stable version too:

  1. Usability improvement: on submission.php add a combo box to filter the content of the table: Show all/with submissions/await grading. That speed up grading much. See MDL-14238
  2. New capability: viewownsubmission. Setting it to Deny makes assignment module useful in exam context - collect student's work without their further access to it. See MDL-15356
  3. Replace link with the number of submissions (for the teacher) with more informative "The ___ of ___ submissions needs grading". MDL-17613

Assignment 1.9 Refactoring

Some areas of assignment can be reworked for greater flexibility and reducing code duplication. Assignment base is actualy an awful, bloated class where all things are intermixed. And any plugin inherits it fully. Some plugins have similar features too, implemented separately. Overall issue for this is MDL-17329.

Some major improvments:

  • 'types' will be no longer considered separate activities, just a option in the mod_form
  • 'type' plugins, which defines what can be submitted, will be reduced to just that purpose, all workflow would be controlled from main module (reducing numerous duplicates and inconsistences)
  • there will be two basic 'type' plugins (text and files), which can be used in any combination (from no one to both)
    • no one is effectively an offline task
    • files (reworked upload) can serve for both single and multiple files uploads
  • there will be possible to create new activities based on this module, inheriting it's main classes, for major workflow customisations, and they will have full access to 'type' plugins

POAS Assignment Refactoring

We are planning to reorganize our code base. The main purposes are:

  • make it more flexible,
  • distribute a responsibility correctly.

Along the way, calls of deprecated functions and methods will be removed (e. g. Logging).

Key points are:

  • Namespaces. All classes will be organized using namespaces (like java packages).
  • Automatic class loading. Reduce usage of require().
  • Usage of modern API. Events 2, Logging 2, etc.
  • Advanced Grading Methods. The criterions will be replaced with a separate AGM plugin (POAS Criterial Grading Method or Accumulative Grading Method[Issue link?]). The POAS Assignment will support AGM.
  • Usage of Assignment 2 submission methods.
  • A minor visual changes.

Known issues:

  • The Assignment 2 submission methods does not allow their usage with other plugins (MDL-47344).

Planned namespace structure for mod_poasassignment is:

  • classes/
    • model/
      • assignment
      • individual_task
      • ...
      • submission/
        • base
      • distribution+strategy/
        • base
      • grader/
        • base
    • view/
      • form/
      • page/
        • base
    • event/
      • instance_available
      • assessable_submitted
      • ...

New Features

Teams

 This feature is on hold and may wait for a second version of module. Right now we are more focused on task distribution

One main assumption in the assignment module is need to be eliminated is "one user=one submission=one grade". The quite common practice is grouped assignments, where students can work in small groups on a task. So we need a teams support there. (Well, quite big work as many functions use this assumption).

Team is a group of students whose work will results in one submission. Teams features:

  • submission is one per team, but a grade can be given on per-team or per-student basis
  • teacher can define a minimum and maximum number of students in the team
  • self-organization (with possibility of confirmation by teacher) or forced by teacher teams
  • maximum date of team membership editing
  • teacher can add themselves to teamas a mentor, then he only will be notified of events in this team
  • 'roles' (or workroles to avoid confusion with Moodle Roles) of people in team (either teacher or student defined) - this is a way to explain who in group will do what
    • teacher-defined roles is a list, from which one or several roles can be selected for students
    • if teacher doesn't want do define specific roles, students can enter text, explaining their role in the group

Individual tasks

Individual tasks is quite common situation in the educational process. The module can handle tasks selection and completion.

Individual tasks features:

  • adding/editing/deleting of tasks by the teacher
  • standart fields: name, description, grade factor (1 by default), min/max teamnumber (if teams activated)
  • custom fields, which can be added in any given assignment, of several types: string, text, number, date, menu, file
  • some fields can only be accessible to the student once he is selected a task (and it will be approved by a teacher if necessary)
  • student's selection (with optional teacher approval), teacher-forced selection or random selection based on a student's selection of subset of tasks fields (number or menu mainly, i.e. some sort of 'complexity' field for example)
  • maximum dates of selection (and approval if necessary)
  • column with task name (link to the task) when grading
  • random filling of some task fields (number or menu mainly) on selection or approval
    • there is some problem of misuse of random generator; they are mainly dealt with fact that student's can change task and select new without teacher

User interface - tabs

Currently assignment have only two main pages: intro/submit (view.php) and grading (submission.php), so it can go away with the link in upper right corner.

New features will require more pages, so it's better to use tabs for them. Tabs visibility will be based on user's capabilities.

Urgent reminders will be places on top (or bottom?) of every tab with color highlighting;

  • for students
    • if he is late to select a task/become a member of team
    • if he is late to submit work
  • for teachers
    • if student from his/her group asks to delete him from team (or task change)
    • if there are students without task/team after date of last approval

Grades aggregation

Sometimes teacher want to grade student's submissions by several grading scales and than having the computer to calculate resulting grade. Is this possible using gradebook or should be duplicated in module is under investignation.

Grading semi-plugins

Sometimes assignments allow for automatic, or semi-automatic grading. It's nice to have options to have a plugin system for this.

maybe One user can get several tasks

That needs further discussion. It's something not very uncommon in real word teaching, but somewhat difficult to cope with "one course module=one grade" thing.

Tasks workflow

Let's see a task workflow in most complicated case (maximum features will be used). States names are somewhat awkward and is subject to change (can anyone propose better names?)

  • initially task is free (1)
  • (1) student or teacher can create a team -> creating team (2)
  • (2) student(s) can add themselves to the team, teacher can add students to the team (in last case student notified that he/she was added)
  • (2) students can plead to free them from team/task, teacher can disapprove (if allowed) members or task (students is notified if they are disapproved)
  • (2) after the team will have at least minimum number of participants -> have enough people (3)
  • (3) all (2) operations still available
  • (3) students can confirm his will to work with team(now that he knows all it's members), teacher can approve a team - approvment automatically cleared if team membership changes (people that have approves is notified)
  • (3) after the date of last approval, no more changes in teams available for students, (for teachers it's depends on capabilities), if there is an unapproved team the teacher will be shown (and sent) urgent reminder
  • (3) after the students (if allowed) approved a team and task -> ready (4) (if teacher approvment needed) or working (5) (students and teacher notified)
  • (4) after teacher approval -> working (5) (students notified)
  • (4) in case of teacher disapproval -> have enough people (3) (students notified)
  • (5) any student in the team can submit work with flag 'please check our progress' (if allowed), then teacher is notified and able to give comment but not grade (teacher notified, student's notified of comment)
  • (5) any student in team can make a normal submit, but it (optionally) may need an approval from other members for grading -> await grading (6) (teacher notified)
  • (6) the teacher can only grade a team in await grading status
  • (6) teacher grades, but grade isn't final -> reworking (5) (students notified)
  • (6) teacher gives final grade -> graded (7) (students notified)
  • (7) person of higher authority will be able to override grade and add something to comment (but maybe not freely edit it, the name of the first grader and regrader will be saved in comment). (students and teacher notified)

Well it's probably looked worse than is. The actual user will see only part of options, and all forms of approval can be disabled.

Files handling

There is some confusion about files handling in current version of assignment module. This is need to be corrected. So there should be a several types of files:

  1. assignment files - files that is showed and accessible to all, and associated with assignment in general even if individual tasks is used (such as guidelines for it's completion that apply to all regardless of individual task);
  2. task files - some file(s) that teacher want to give students before they start to work on particular task;
  3. submission files - files that was submitted by a particular student (team);
  4. reply (comment) files - files that was uploaded by a teacher when grading submitted work, usually rewised versions of submitted files (thanks to A.T. Wyatt comment there)

Implementation

New options

Let's see an assignment creation/editing screen. Assignment module will keep all existing options.

New options that will be added:

  • use individual tasks
  • use teams
  • last date of approval - active if tasks or teams used, time to which all considerations about group memebrship and tasks selections must be done
  • team options (active only if teams selected)
    • min and max count of members of team
    • the grade will be individual or one per team
    • if students must confirm it will to work with team (first student, who create a team, may not be happy with someone who add yourself to it later)
    • if teacher must confirm team membership
    • if all team members must confirm a submission before grading
  • individual task options (active only if tasks is selected)
    • allow using same tasks - can several students do one task or all tasks must be different?
    • allow using same tasks in one group
    • individual date - allow individual due dates to the task
    • individual team members count - if teams used, can particular task override min/max number of students in team
    • teacher must confirm task selection
    • random task assignment


DB structure

db schema.jpg

The new db structure have such tables:

  • poasassignment - main table which have new options :
    1. maxmembersontask - maximum count of members which must to do the task
    2. minmembersontask - minimum count of members which must to do the task
    3. mintaskonmember - minimum count of tasks for one member(needs discussion)
    4. maxtaskonmember - maximum count of tasks for one member(needs discussion)
    5. timedistrib - initial time for task distribution
    6. timeconfirmation - the date after that a student not may create/come into new working group
    7. timereception - start time for tasks reception
    8. flags - all binary options
  • poasassignment_tasks - table for task list of instance of activity:
    1. name - the name of task
    2. descripiton - task "body"
    3. deadline - individual date for task reception
    4. factor - factor for grade
    5. maxmembers - maximum workgroup members on task
    6. minmembers - minimum workgroup members on task
  • poasassignment_fields - define list of custom fields:
    1. ftype - type of the field
    2. name - name of the field
    3. showintable - additional column in table of tasks
    4. maxvalue - maximum value for the field(only numbers)
    5. minvalue - minimum value for the field(only numbers)
    6. optional - optional field?
    7. rndparam - if this field used to define filter for random selection of task
    8. rndshow - if this field will get random value on task selection (number or menu fields only)
  • poasassignment_field_consts - define consts for the fields type of list
  • poasassignment_values - values for particular task/workgroup
  • poasassignment_workgroups - table for teams, also submissions stuff go there
  • poasassignment_workgroup_members - members of teams, grade stuff go there:
    1. userid -
    2. grade - this is the grade for submission
    3. submissioncomment -
    4. format,teacher,timemarked,mailed - old fields of assignment_submissions
    5. ownrole - role which student want implement during task execution
    6. finalgrade - final grade(yes/no)?
    7. deletefrom - please kick me from this working group (or task)
    8. deletecomment - explanation why student needs to delete from this working group
  • poasassignment_role - roles for the task:
    1. one task have many roles
    2. one student perform many roles
 Rethink tables/columns, define how a type plugin can use db, rename workgroups into teams everywhere --Oleg Sychev 11:12, 11 September 2009 (UTC)

Tabs

Info/submit

This is an initial tab, that will work basically the same as before.

New abilities:

  • show additional dates (i.e. dates of last approval and so on)
  • student: show individual task (?tasks?) when the individual tasks is selected
  • student: show task status (see workflow of the task above)
  • student: show team members (when teams used)
  • student: can approve team and submission, select or type his roles
  • teacher: the number of submissions will be shown JFI as there is a tab for grading now (maybe as a link, just as in quiz now - it must be moved to down center area)
  • teacher: the number of submissions will be showed as <need grading>/<all submissions>

Custom fields

This tab is for managing custom fields for the tasks. The author can add/edit/delete fields there.

Tasks

New tab, accessible when individual task feature activated.

Abilities:

  • teacher: adding, editing, deleting a task (editing and deleting assigned tasks may be prohibited)
  • student: browsing task list, viewing task details
  • student (without teams): selecting a task
  • student (in team mode): see current teams(at least incomplete), create team for a task, apply for team membership


Grading

This is an evolved grading page (submission.php), for teachers use.

New abilities:

  • the table will reflect a status of task (maybe with icons)
  • individual tasks: the table will additionally reflect task name (as a link to popup with it's description) and a grade factor
  • teams: the table (and popup for grading too) will have two modes:
  • teams and/or individual tasks: in case any form of teacher approvment is needed, columns for approvment will be showed
  • grade columns/popus will be showed only when grading is allowed (or if person has mod/assignment:manageanything capability)
    1. team grades - each string represent a team
    2. individual grades - each string represents a student, but they are sorted by team and teams is spaced somehow
  • make an option for the teachers to make any grade final, forbidding further re-submissions and/or regrading (a person with mod/assignment:manageanything can still regrade); in teams with individual grading mode re-submission will be forbidden only when all team members receive final grade
  • dropdown to choose whom to display in the table (and in the popup): all, with submissions only, needs grading only

Capabilities

Current capabilities

  • mod/poasassignment:view - actually quite strange capability that can completely block you from assignment
  • mod/poasassignment:submit - ability to submit a work
  • mod/poasassignment:grade - ability to grade submissions

New capabilities

  • mod/poasassignment:viewownsubmission (can be backported to 1.9) - sometimes we need to not allowing the student to see own submission (exams cases mostly)
  • mod/poasassignment:manageanything - person with high authority, for whom don't apply usual restrictions: he can edit/delete tasks on which people worked right now, manage group membership and their tasks after an approval, override final grades and so on
  • mod/poasassignment:managetasks - ability to create, edit and delete tasks
  • mod/poasassignment:managefields - ability to manage custom fields of tasks
  • mod/poasassignment:finalgrades - can make grades final
  • mod/poasassignment:manageteams - ability to create, force students to the team, approve students (teacher's ability)
  • mod/poasassignment:managetaskselection - ability to manage tasks selection for any student (teacher's ability)
  • mod/poasassignment:manageownteam - ability to create new team, apply to existing one, confirm memebership of the others in this team (student's ability, setting it to Deny will create an task where only teachers can manage teams membership)
  • mod/poasassignment:selectowntask - student's ability to select task (setting to Deny allows for teachers-only tasks selection)
  • mod/poasassignment:seeotherstasks - student's ability - if he/she is able to see what tasks are selected by other people, or he can see only if it free for selection

Events

Events will be added in future releases.

Event name Event data Description
\mod_poasassignment\event\instance_available
contextinstanceid
Poasassignment course module ID.
Fired when 'available from' time comes (if specified), instantly when creating a course element or when element become visible to the students.
\mod_poasassignment\event\instance_unavailable
contextinstanceid
Poasassignment course module ID.
Fired when time for submissions expired, course module hidden from students or deleted.
\mod_poasassignment\event\task_selected
contextinstanceid
Poasassignment course module ID.
userid
Student's user ID.
Fired when an invidual task is selected for the student (either by himself, by teacher or automatically)
\mod_poasassignment\event\assessable_submitted
contextinstanceid
Poasassignment course module ID.
userid
Student's user ID.
Fired when the student adds a non-draft submission.
\mod_poasassignment\event\submission_graded
contextinstanceid
Poasassignment course module ID.
userid
Teacher's user ID.
relateduserid
Student's user ID.
other->isfinal
Is this grade final.
Fired when the student's attempt is graded by the instructor.