Note:

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

Workshop: Difference between revisions

From MoodleDocs
m (Added link to XML schema)
mNo edit summary
Line 3: Line 3:
This page describes the current implementation of the [[Workshop module]]. See also [[Workshop 2.0 specification]] and [[Workshop 2.0 testing]].
This page describes the current implementation of the [[Workshop module]]. See also [[Workshop 2.0 specification]] and [[Workshop 2.0 testing]].


= Diagrams and schemas =
== Overview of Workshop architecture ==


== Database structure ==
Rewriting Workshop from scratch for Moodle 2.0 was a great opportunity to use new APIs and approaches to activity module development. In some areas, Workshop was a pioneering component adopting new frameworks - like File API, HTML rendering or subplugins support.
 
Many of Workshop features are implemented as subplugins (see mod/workshop/db/subplugins.php). That allows to extend current functionality without hacking Workshop core system.
 
=== Workshop core ===
 
Workshop core consists of common module functions in lib.php (required by Moodle itself) and methods of class workshop defined in locallib.php.
 
=== Grading strategies ===
 
Grading strategies are defined as workshopform subplugins in mod/workshop/form/ subdirectories. At any given time, just one type of the subplugin is used by workshop. But the data are kept so teachers can switch strategies as they need.
 
=== Allocators ===
 
Allocation subplugins are used to allocate submissions to the students for peer-review. They are defined as workshopallocation subplugins in mod/workshop/allocation/ subdirectories. Teacher can use any installed allocator to distribute submission. Allocators are responsible for creating records in workshop_assessment table.
 
=== Grading evaluators ===
 
Grading evaluators calculate grades for assessments (aka grading grades). They are defined workshopeval subplugins in mod/workshop/eval/ subdirectories.
 
== Diagrams and schemas ==
 
=== Database structure ===
[[Image:workshop_erd.png|400px|thumb|left|ER diagram of DB tables used in/by Workshop module]]
[[Image:workshop_erd.png|400px|thumb|left|ER diagram of DB tables used in/by Workshop module]]
<br clear="all"/>
<br clear="all"/>


== XML structure ==
=== XML structure ===
For the purpose of backup/moodle2, the following XML schema is used. Note that only accumulative grading strategy is illustrated here. All other grading strategy subplugins are integrated in a similar way.
For the purpose of backup/moodle2, the following XML schema is used.
[[Image:workshop_xml.png|400px|thumb|left|XML diagram of elements tree in workshop.xml]]
[[Image:workshop_xml.png|400px|thumb|left|XML diagram of elements tree in workshop.xml]]
<br clear="all"/>
<br clear="all"/>


== Classes ==
=== Classes ===
The following UML diagram explains the structure of classes defined in workshop subplugins.
The following UML diagram explains the structure of classes defined in workshop subplugins.
[[Image:workshop_classes.png|400px|thumb|left|UML class diagram]]
[[Image:workshop_classes.png|400px|thumb|left|UML class diagram]]
<br clear="all"/>
<br clear="all"/>


== Grades calculation ==
=== Gradebook integration ===
[[Image:workshop_grades_calculation.png|400px|thumb|left|The scheme of grades calculation in Workshop]]
[[Image:workshop_grades_calculation.png|400px|thumb|left|The scheme of grades calculation in Workshop]]
<br clear="all"/>
<br clear="all"/>

Revision as of 15:06, 14 October 2010

Note: This page is a work-in-progress. Feedback and suggested improvements are welcome. Please join the discussion on moodle.org or use the page comments.

Moodle 2.0


This page describes the current implementation of the Workshop module. See also Workshop 2.0 specification and Workshop 2.0 testing.

Overview of Workshop architecture

Rewriting Workshop from scratch for Moodle 2.0 was a great opportunity to use new APIs and approaches to activity module development. In some areas, Workshop was a pioneering component adopting new frameworks - like File API, HTML rendering or subplugins support.

Many of Workshop features are implemented as subplugins (see mod/workshop/db/subplugins.php). That allows to extend current functionality without hacking Workshop core system.

Workshop core

Workshop core consists of common module functions in lib.php (required by Moodle itself) and methods of class workshop defined in locallib.php.

Grading strategies

Grading strategies are defined as workshopform subplugins in mod/workshop/form/ subdirectories. At any given time, just one type of the subplugin is used by workshop. But the data are kept so teachers can switch strategies as they need.

Allocators

Allocation subplugins are used to allocate submissions to the students for peer-review. They are defined as workshopallocation subplugins in mod/workshop/allocation/ subdirectories. Teacher can use any installed allocator to distribute submission. Allocators are responsible for creating records in workshop_assessment table.

Grading evaluators

Grading evaluators calculate grades for assessments (aka grading grades). They are defined workshopeval subplugins in mod/workshop/eval/ subdirectories.

Diagrams and schemas

Database structure

ER diagram of DB tables used in/by Workshop module


XML structure

For the purpose of backup/moodle2, the following XML schema is used.

XML diagram of elements tree in workshop.xml


Classes

The following UML diagram explains the structure of classes defined in workshop subplugins.

UML class diagram


Gradebook integration

The scheme of grades calculation in Workshop