Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] workshop #746

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions data/migratedPages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1719,6 +1719,9 @@ Web_services_API:
Web_services_files_handling:
- filePath: "/docs/apis/subsystems/external/files.md"
slug: "/docs/apis/subsystems/external/files"
Workshop:
- filePath: "/docs/apis/plugintypes/mod_workshop/index.md"
slug: "/docs/apis/plugintypes/mod_workshop/"
Writing_acceptance_tests:
- filePath: "/general/development/tools/behat/writing.md"
slug: "/general/development/tools/behat/writing"
Expand Down
6 changes: 3 additions & 3 deletions docs/apis/plugintypes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ The underscore character is not supported in activity modules for legacy reasons
| [Quiz reports](https://docs.moodle.org/dev/Quiz_reports) | quiz | /mod/quiz/report | Display and analyse the results of quizzes, or just plug miscellaneous behaviour into the quiz module | 1.1+ |
| [Quiz access rules](https://docs.moodle.org/dev/Quiz_access_rules) | quizaccess | /mod/quiz/accessrule | Add conditions to when or where quizzes can be attempted, for example only from some IP addresses, or student must enter a password first | 2.2+ |
| [SCORM reports](https://docs.moodle.org/dev/SCORM_reports) | scormreport | /mod/scorm/report | Analysis of SCORM attempts | 2.2+ |
| [Workshop grading strategies](https://docs.moodle.org/dev/Workshop_grading_strategies) | workshopform | /mod/workshop/form | Define the type of the grading form and implement the calculation of the grade for submission in the [Workshop](https://docs.moodle.org/dev/Workshop) module | 2.0+ |
| [Workshop allocation methods](https://docs.moodle.org/dev/Workshop_allocation_methods) | workshopallocation | /mod/workshop/allocation | Define ways how submissions are assigned for assessment in the [Workshop](https://docs.moodle.org/dev/Workshop) module | 2.0+ |
| [Workshop evaluation methods](https://docs.moodle.org/dev/Workshop_evaluation_methods) | workshopeval | /mod/workshop/eval | Implement the calculation of the grade for assessment (grading grade) in the [Workshop](https://docs.moodle.org/dev/Workshop) module | 2.0+ |
| [Workshop grading strategies](https://docs.moodle.org/dev/Workshop_grading_strategies) | workshopform | /mod/workshop/form | Define the type of the grading form and implement the calculation of the grade for submission in the [Workshop](./mod_workshop/index.md) module | 2.0+ |
| [Workshop allocation methods](https://docs.moodle.org/dev/Workshop_allocation_methods) | workshopallocation | /mod/workshop/allocation | Define ways how submissions are assigned for assessment in the [Workshop](./mod_workshop/index.md) module | 2.0+ |
| [Workshop evaluation methods](https://docs.moodle.org/dev/Workshop_evaluation_methods) | workshopeval | /mod/workshop/eval | Implement the calculation of the grade for assessment (grading grade) in the [Workshop](./mod_workshop/index.md) module | 2.0+ |
| [Blocks](./blocks/index.md) | block | /blocks | Small information-displays or tools that can be moved around pages | 2.0+ |
| [Question types](https://docs.moodle.org/dev/Question_types) | qtype | /question/type | Different types of question (for example multiple-choice, drag-and-drop) that can be used in quizzes and other activities | 1.6+ |
| [Question behaviours](https://docs.moodle.org/dev/Question_behaviours) | qbehaviour | /question/behaviour | Control how student interact with questions during an attempt | 2.1+ |
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
63 changes: 63 additions & 0 deletions docs/apis/plugintypes/mod_workshop/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
title: Workshop
tags: []
---
:::info
Work in progress
:::
Comment on lines +3 to +7
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than using an admonition:

Suggested change
tags: []
---
:::info
Work in progress
:::
tags: []
documentationDraft: true
---


import { Since } from '@site/src/components';

<Since versions={["2.0"]} />
Comment on lines +10 to +11
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<Since versions={["2.0"]} />

There's no point really including any really old since tags. No-one should be using 1.9- and no-one should be developing for it.

We're trying to update our dev docs to be version specific to avoid having to spend a lot of time understanding which items only relate to an ancient version of Moodle.


This page describes the current implementation of the [Workshop module](https://docs.moodle.org/dev/Workshop_module). See also [Workshop 2.0 specification](https://docs.moodle.org/dev/Workshop_2.0_specification) and [Workshop 2.0 testing](https://docs.moodle.org/dev/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.
Comment on lines +15 to +17
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thsi is just fluff. We don't need to know about 2.0, and the changes from 1.9, etc.

We don't need the Overview title. We just need to know that this page describes the implementation, and that it uses subplugins.

Suggested change
## 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.
## Architecture


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

[400px](https://docs.moodle.org/Image/workshop_erd.png)
<br clear="all"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be unnecessary

Suggested change
<br clear="all"/>


### XML structure

For the purpose of backup/moodle2, the following XML schema is used.
[400px](https://docs.moodle.org/Image/workshop_xml.png)
<br clear="all"/>

### Classes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto... and the rest


The following UML diagram explains the structure of classes defined in workshop subplugins.
[400px](https://docs.moodle.org/Image/workshop_classes.png)
<br clear="all"/>

### Gradebook integration

[400px](https://docs.moodle.org/Image/workshop_grades_calculation.png)
<br clear="all"/>

## Debugging and testing

- [Workshop/fakesubmissions.php](https://docs.moodle.org/dev/Workshop/fakesubmissions.php)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This throws a spelling warning. We can fix that by either:

Putting it in backticks:

Suggested change
- [Workshop/fakesubmissions.php](https://docs.moodle.org/dev/Workshop/fakesubmissions.php)
- [`workshop/fakesubmissions.php`](https://docs.moodle.org/dev/Workshop/fakesubmissions.php)

OR

Adding to a cspell ignore list:

Suggested change
- [Workshop/fakesubmissions.php](https://docs.moodle.org/dev/Workshop/fakesubmissions.php)
- [Workshop/fakesubmissions.php](https://docs.moodle.org/dev/Workshop/fakesubmissions.php)
<!-- cspell:ignore fakesubmissions -->

Loading