Permalink
Browse files

MDL-38603 Deprecate usepeerassessment setting in Workshop

There was a plan to make use of it initially when Workshop was rewritten
for Moodle 2.0. The idea was that the Workshop could be switched into a
simplified mode where teachers only make assessments (with all the
grading strategies available). But things evolved since then and now we
have Advanced grading methods available in the new Assignment module
that solves the use case well. So, having this option available is not
only confusing but - looking at the code - pretty useless.

For now, I am just hiding the setting from the settings form and the
code always considers it as if it was enabled. In the future, the field
can disappear from the database, too.
  • Loading branch information...
1 parent 3a8c438 commit d34ea7dc3395bd470e70f17f2e07b18bd8d2ef39 @mudrd8mz mudrd8mz committed Apr 17, 2013
Showing with 6 additions and 12 deletions.
  1. +2 −2 mod/workshop/lib.php
  2. +4 −5 mod/workshop/locallib.php
  3. +0 −5 mod/workshop/mod_form.php
View
@@ -77,7 +77,7 @@ function workshop_add_instance(stdclass $workshop) {
$workshop->timecreated = time();
$workshop->timemodified = $workshop->timecreated;
$workshop->useexamples = (int)!empty($workshop->useexamples);
- $workshop->usepeerassessment = (int)!empty($workshop->usepeerassessment);
+ $workshop->usepeerassessment = 1;
$workshop->useselfassessment = (int)!empty($workshop->useselfassessment);
$workshop->latesubmissions = (int)!empty($workshop->latesubmissions);
$workshop->phaseswitchassessment = (int)!empty($workshop->phaseswitchassessment);
@@ -138,7 +138,7 @@ function workshop_update_instance(stdclass $workshop) {
$workshop->timemodified = time();
$workshop->id = $workshop->instance;
$workshop->useexamples = (int)!empty($workshop->useexamples);
- $workshop->usepeerassessment = (int)!empty($workshop->usepeerassessment);
+ $workshop->usepeerassessment = 1;
$workshop->useselfassessment = (int)!empty($workshop->useselfassessment);
$workshop->latesubmissions = (int)!empty($workshop->latesubmissions);
$workshop->phaseswitchassessment = (int)!empty($workshop->phaseswitchassessment);
@@ -101,7 +101,7 @@ class workshop {
/** @var bool optional feature: students practise evaluating on example submissions from teacher */
public $useexamples;
- /** @var bool optional feature: students perform peer assessment of others' work */
+ /** @var bool optional feature: students perform peer assessment of others' work (deprecated, consider always enabled) */
public $usepeerassessment;
/** @var bool optional feature: students perform self assessment of their own work */
@@ -2284,7 +2284,7 @@ public function get_gradebook_grades($userid) {
}
}
- if ($this->usepeerassessment and has_capability('mod/workshop:peerassess', $this->context, $userid)) {
+ if (has_capability('mod/workshop:peerassess', $this->context, $userid)) {
if (!empty($gradebook->items[1]->grades)) {
$assessmentgrade = reset($gradebook->items[1]->grades);
if (!is_null($assessmentgrade->grade)) {
@@ -2661,8 +2661,7 @@ public function __construct(workshop $workshop, $userid) {
$phase = new stdclass();
$phase->title = get_string('phasesubmission', 'workshop');
$phase->tasks = array();
- if (($workshop->usepeerassessment or $workshop->useselfassessment)
- and has_capability('moodle/course:manageactivities', $workshop->context, $userid)) {
+ if (has_capability('moodle/course:manageactivities', $workshop->context, $userid)) {
$task = new stdclass();
$task->title = get_string('taskinstructreviewers', 'workshop');
$task->link = $workshop->updatemod_url();
@@ -2844,7 +2843,7 @@ public function __construct(workshop $workshop, $userid) {
}
}
unset($a);
- if ($workshop->usepeerassessment and $numofpeers) {
+ if ($numofpeers) {
$task = new stdclass();
if ($numofpeerstodo == 0) {
$task->completed = true;
@@ -86,11 +86,6 @@ public function definition() {
$mform->addElement('checkbox', 'useexamples', $label, $text);
$mform->addHelpButton('useexamples', 'useexamples', 'workshop');
- $label = get_string('usepeerassessment', 'workshop');
- $text = get_string('usepeerassessment_desc', 'workshop');
- $mform->addElement('checkbox', 'usepeerassessment', $label, $text);
- $mform->addHelpButton('usepeerassessment', 'usepeerassessment', 'workshop');
-
$label = get_string('useselfassessment', 'workshop');
$text = get_string('useselfassessment_desc', 'workshop');
$mform->addElement('checkbox', 'useselfassessment', $label, $text);

0 comments on commit d34ea7d

Please sign in to comment.