mirror of
https://github.com/moodle/moodle.git
synced 2025-03-20 15:40:17 +01:00
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.
This commit is contained in:
parent
3a8c4380c0
commit
d34ea7dc33
@ -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 @@ class workshop {
|
||||
}
|
||||
}
|
||||
|
||||
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 @@ class workshop_user_plan implements renderable {
|
||||
$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 @@ class workshop_user_plan implements renderable {
|
||||
}
|
||||
}
|
||||
unset($a);
|
||||
if ($workshop->usepeerassessment and $numofpeers) {
|
||||
if ($numofpeers) {
|
||||
$task = new stdclass();
|
||||
if ($numofpeerstodo == 0) {
|
||||
$task->completed = true;
|
||||
|
@ -86,11 +86,6 @@ class mod_workshop_mod_form extends moodleform_mod {
|
||||
$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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user