case WORKSHOP_ALLOCATION_MANUAL_MSG_ADDED:
$hlauthorid = $m[1];
$hlreviewerid = $m[2];
- $msg->text = get_string('allocationadded', 'workshop');
+ $msg->text = get_string('allocationadded', 'workshopallocation_manual');
$msg->sty = 'ok';
break;
case WORKSHOP_ALLOCATION_MANUAL_MSG_EXISTS:
$hlauthorid = $m[1];
$hlreviewerid = $m[2];
- $msg->text = get_string('allocationexists', 'workshop');
+ $msg->text = get_string('allocationexists', 'workshopallocation_manual');
$msg->sty = 'info';
break;
case WORKSHOP_ALLOCATION_MANUAL_MSG_NOSUBMISSION:
$hlauthorid = $m[2];
$hlreviewerid = $m[3];
if ($m[4] == 0) {
- $msg->text = get_string('areyousuretodeallocate', 'workshop');
+ $msg->text = get_string('areyousuretodeallocate', 'workshopallocation_manual');
$msg->sty = 'info';
} else {
- $msg->text = get_string('areyousuretodeallocategraded', 'workshop');
+ $msg->text = get_string('areyousuretodeallocategraded', 'workshopallocation_manual');
$msg->sty = 'error';
}
break;
// We have all data. Let it pass to the renderer and return the output
// Here, we do not use neither the core renderer nor the workshop one but use an own one
require_once(dirname(__FILE__) . '/renderer.php');
- $uioutput = $PAGE->theme->get_renderer('mod_workshop', $PAGE, 'allocation_manual');
+ $uioutput = $PAGE->theme->get_renderer('workshopallocation_manual', $PAGE);
echo $uioutput->display_allocations($this->workshop, $peer, $hlauthorid, $hlreviewerid, $msg);
}
--- /dev/null
+<?php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * English strings for Workshop - manual allocation subplugin
+ *
+ * @package mod-workshop
+ * @copyright 2009 David Mudrak <david.mudrak@gmail.com>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die();
+
+$string['addreviewee'] = 'Add reviewee';
+$string['addreviewer'] = 'Add reviewer';
+$string['allocationadded'] = 'The submission has been successfully allocated';
+$string['allocationexists'] = 'The allocation already exists';
+$string['areyousuretodeallocate'] = 'Are you sure you want deallocate the selected assessment?';
+$string['areyousuretodeallocategraded'] = 'You are going to remove the assessment that has already been graded. Are you really sure you want to do it?';
+$string['pluginname'] = 'Manual allocation';
/**
* Manual allocation renderer class
*/
-class moodle_mod_workshop_allocation_manual_renderer extends moodle_renderer_base {
+class moodle_workshopallocation_manual_renderer extends moodle_renderer_base {
/** the underlying renderer to use */
protected $output;
$handler = new moodle_url($this->page->url, array('mode' => 'new', 'of' => $user->id, 'sesskey' => sesskey()));
$options = $this->users_to_menu_options($workshop->get_peer_reviewers(), $exclude);
$select = html_select::make_popup_form($handler, 'by', $options, 'addreviewof' . $user->id, '',
- get_string('addreviewer', 'workshop'));
+ get_string('addreviewer', 'workshopallocation_manual'));
$select->nothinglabel = get_string('chooseuser', 'workshop');
- $select->set_label(get_string('addreviewer', 'workshop'), $select->id);
+ $select->set_label(get_string('addreviewer', 'workshopallocation_manual'), $select->id);
$o .= $this->output->select($select);
}
$o .= $this->output->output_start_tag('ul', array());
$handler = new moodle_url($this->page->url, array('mode' => 'new', 'by' => $user->id, 'sesskey' => sesskey()));
$options = $this->users_to_menu_options($workshop->get_peer_authors(), $exclude);
$select = html_select::make_popup_form($handler, 'of', $options, 'addreviewby' . $user->id, '',
- get_string('addreviewee', 'workshop'));
+ get_string('addreviewee', 'workshopallocation_manual'));
$select->nothinglabel = get_string('chooseuser', 'workshop');
- $select->set_label(get_string('addreviewee', 'workshop'), $select->id);
+ $select->set_label(get_string('addreviewee', 'workshopallocation_manual'), $select->id);
$o .= $this->output->select($select);
$o .= $this->output->output_start_tag('ul', array());
foreach ($user->reviewerof as $authorid => $assessmentid) {
$randomallocations = $this->random_allocation($authors, $reviewers, $curassessments, $numofreviews, $numper, $o);
$this->filter_current_assessments($randomallocations, $assessments);
$newallocations = array_merge($newallocations, $randomallocations);
- $o[] = 'ok::' . get_string('numofrandomlyallocatedsubmissions', 'workshop', count($randomallocations));
+ $o[] = 'ok::' . get_string('numofrandomlyallocatedsubmissions', 'workshopallocation_random', count($randomallocations));
unset($randomallocations);
}
if ($addselfassessment) {
$selfallocations = $this->self_allocation($authors, $reviewers, $assessments);
$newallocations = array_merge($newallocations, $selfallocations);
- $o[] = 'ok::' . get_string('numofselfallocatedsubmissions', 'workshop', count($selfallocations));
+ $o[] = 'ok::' . get_string('numofselfallocatedsubmissions', 'workshopallocation_random', count($selfallocations));
unset($selfallocations);
}
if (empty($newallocations)) {
- $o[] = 'info::' . get_string('noallocationtoadd', 'workshop');
+ $o[] = 'info::' . get_string('noallocationtoadd', 'workshopallocation_random');
} else {
$this->add_new_allocations($newallocations, $authors, $reviewers);
foreach ($newallocations as $newallocation) {
$a = new stdClass();
$a->reviewername = fullname($reviewers[0][$reviewerid]);
$a->authorname = fullname($authors[0][$authorid]);
- $o[] = 'ok::indent::' . get_string('allocationaddeddetail', 'workshop', $a);
+ $o[] = 'ok::indent::' . get_string('allocationaddeddetail', 'workshopallocation_random', $a);
}
}
if ($removecurrent) {
$delassessments = $this->get_unkept_assessments($assessments, $newallocations, $addselfassessment);
// random allocator should not be able to delete assessments that have already been graded
// by reviewer
- $o[] = 'info::' . get_string('numofdeallocatedassessment', 'workshop', count($delassessments));
+ $o[] = 'info::' . get_string('numofdeallocatedassessment', 'workshopallocation_random', count($delassessments));
foreach ($delassessments as $delassessmentkey => $delassessmentid) {
$a = new stdClass();
$a->authorname = fullname((object)array(
'lastname' => $assessments[$delassessmentid]->reviewerlastname,
'firstname' => $assessments[$delassessmentid]->reviewerfirstname));
if (!is_null($assessments[$delassessmentid]->grade)) {
- $o[] = 'error::indent::' . get_string('allocationdeallocategraded', 'workshop', $a);
+ $o[] = 'error::indent::' . get_string('allocationdeallocategraded', 'workshopallocation_random', $a);
unset($delassessments[$delassessmentkey]);
} else {
- $o[] = 'info::indent::' . get_string('assessmentdeleteddetail', 'workshop', $a);
+ $o[] = 'info::indent::' . get_string('assessmentdeleteddetail', 'workshopallocation_random', $a);
}
}
$this->workshop->delete_assessment($delassessments);
$m = optional_param('m', null, PARAM_INT); // status message code
$msg = new stdClass();
if ($m == WORKSHOP_ALLOCATION_RANDOM_MSG_SUCCESS) {
- $msg = (object)array('text' => get_string('randomallocationdone', 'workshop'), 'sty' => 'ok');
+ $msg = (object)array('text' => get_string('randomallocationdone', 'workshopallocation_random'), 'sty' => 'ok');
}
echo $OUTPUT->container_start('random-allocator');
--- /dev/null
+<?php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * English strings for Workshop allocation subplugin - Random allocation
+ *
+ * @package mod-workshop
+ * @copyright 2009 David Mudrak <david.mudrak@gmail.com>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die();
+
+$string['addselfassessment'] = 'Add self-assessments';
+$string['allocationaddeddetail'] = 'New assessment to be done: <strong>$a->reviewername</strong> is reviewer of <strong>$a->authorname</strong>';
+$string['allocationdeallocategraded'] = 'Unable to deallocate already graded assessment: reviewer <strong>$a->reviewername</strong>, submission author: <strong>$a->authorname</strong>';
+$string['allocationsettings'] = 'Allocation settings';
+$string['assessmentdeleteddetail'] = 'Assessment deallocated: <strong>$a->reviewername</strong> is no longer reviewer of <strong>$a->authorname</strong>';
+$string['assesswosubmission'] = 'Participants can assess without having submitted anything';
+$string['noallocationtoadd'] = 'No allocations to add';
+$string['numofdeallocatedassessment'] = 'Deallocating $a assessment(s)';
+$string['numofrandomlyallocatedsubmissions'] = 'Randomly allocating $a submissions';
+$string['numofselfallocatedsubmissions'] = 'Self-allocating $a submission(s)';
+$string['numperauthor'] = 'per submission';
+$string['numperreviewer'] = 'per reviewer';
+$string['pluginname'] = 'Random allocation';
+$string['randomallocationdone'] = 'Random allocation done';
+$string['removecurrentallocations'] = 'Remove current allocations';
$mform = $this->_form;
$workshop = $this->_customdata['workshop'];
- $mform->addElement('header', 'settings', get_string('allocationsettings', 'workshop'));
+ $mform->addElement('header', 'settings', get_string('allocationsettings', 'workshopallocation_random'));
$gmode = groups_get_activity_groupmode($workshop->cm, $workshop->course);
switch ($gmode) {
$mform->addElement('static', 'groupmode', get_string('groupmode', 'group'), $grouplabel);
$options_numofreviewes = array(0=>0,1=>1, 2=>2, 3=>3, 4=>4);
- $options_numper = array(WORKSHOP_USERTYPE_AUTHOR => get_string('numperauthor', 'workshop'),
- WORKSHOP_USERTYPE_REVIEWER => get_string('numperreviewer', 'workshop'));
+ $options_numper = array(WORKSHOP_USERTYPE_AUTHOR => get_string('numperauthor', 'workshopallocation_random'),
+ WORKSHOP_USERTYPE_REVIEWER => get_string('numperreviewer', 'workshopallocation_random'));
$grpnumofreviews = array();
$grpnumofreviews[] = $mform->createElement('select', 'numofreviews', '', $options_numofreviewes);
$mform->setDefault('numofreviews', 4);
$mform->setDefault('numper', WORKSHOP_USERTYPE_AUTHOR);
$mform->addGroup($grpnumofreviews, 'grpnumofreviews', get_string('numofreviews', 'workshop'), array(' '), false);
- $mform->addElement('advcheckbox', 'removecurrent', get_string('removecurrentallocations', 'workshop'));
+ $mform->addElement('advcheckbox', 'removecurrent', get_string('removecurrentallocations', 'workshopallocation_random'));
$mform->setDefault('removecurrent', 0);
- $mform->addElement('advcheckbox', 'assesswosubmission', get_string('assesswosubmission', 'workshop'));
+ $mform->addElement('advcheckbox', 'assesswosubmission', get_string('assesswosubmission', 'workshopallocation_random'));
$mform->setDefault('assesswosubmission', 0);
- $mform->addElement('advcheckbox', 'addselfassessment', get_string('addselfassessment', 'workshop'));
+ $mform->addElement('advcheckbox', 'addselfassessment', get_string('addselfassessment', 'workshopallocation_random'));
$mform->setDefault('addselfassessment', 0);
$this->add_action_buttons();
for ($i = 0; $i < $nodims; $i++) {
// dimension header
- $dimtitle = get_string('dimensionnumberaccumulative', 'workshop', $i+1);
+ $dimtitle = get_string('dimensionnumber', 'workshopgrading_accumulative', $i+1);
$mform->addElement('header', "dimensionhdr__idx_$i", $dimtitle);
// dimension id
$mform->addElement('html', $desc);
// grade for this aspect
- $label = get_string('dimensiongrade', 'workshop');
+ $label = get_string('dimensiongrade', 'workshopgrading_accumulative');
$options = make_grades_menu($fields->{'grade__idx_' . $i});
$mform->addElement('select', 'grade__idx_' . $i, $label, $options);
// comment
- $label = get_string('dimensioncomment', 'workshop');
+ $label = get_string('dimensioncomment', 'workshopgrading_accumulative');
//$mform->addElement('editor', 'peercomment__idx_' . $i, $label, null, array('maxfiles' => 0));
$mform->addElement('textarea', 'peercomment__idx_' . $i, $label, array('cols' => 60, 'rows' => 5));
}
$weights = workshop_get_dimension_weights();
for ($i = 0; $i < $norepeats; $i++) {
- $mform->addElement('header', 'dimension'.$i, get_string('dimensionnumberaccumulative', 'workshop', $i+1));
+ $mform->addElement('header', 'dimension'.$i, get_string('dimensionnumber', 'workshopgrading_accumulative', $i+1));
$mform->addElement('hidden', 'dimensionid__idx_'.$i); // the id in workshop_forms
- $mform->addElement('editor', 'description__idx_'.$i.'_editor', get_string('dimensiondescription', 'workshop'),
- '', $descriptionopts);
- $mform->addElement('modgrade', 'grade__idx_'.$i, get_string('dimensionmaxgrade','workshop'), null, true);
+ $mform->addElement('editor', 'description__idx_'.$i.'_editor',
+ get_string('dimensiondescription', 'workshopgrading_accumulative'), '', $descriptionopts);
+ $mform->addElement('modgrade', 'grade__idx_'.$i,
+ get_string('dimensionmaxgrade','workshopgrading_accumulative'), null, true);
$mform->setDefault('grade__idx_'.$i, 10);
- $mform->addElement('select', 'weight__idx_'.$i, get_string('dimensionweight', 'workshop'), $weights);
+ $mform->addElement('select', 'weight__idx_'.$i,
+ get_string('dimensionweight', 'workshopgrading_accumulative'), $weights);
$mform->setDefault('weight__idx_'.$i, 1);
}
$mform->registerNoSubmitButton('noadddims');
- $mform->addElement('submit', 'noadddims', get_string('addmoredimensionsaccumulative', 'workshop',
+ $mform->addElement('submit', 'noadddims', get_string('addmoredimensions', 'workshopgrading_accumulative',
WORKSHOP_STRATEGY_ADDDIMS));
$mform->closeHeaderBefore('noadddims');
$this->set_data($current);
--- /dev/null
+<?php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * English strings for Workshop subplugin - "Accumulative" grading strategy
+ *
+ * @package mod-workshop
+ * @copyright 2009 David Mudrak <david.mudrak@gmail.com>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die();
+
+$string['addmoredimensions'] = 'Blanks for $a more aspects';
+$string['dimensioncomment'] = 'Comment';
+$string['dimensiondescription'] = 'Description';
+$string['dimensiongrade'] = 'Grade';
+$string['dimensionmaxgrade'] = 'Best possible grade / Scale to use';
+$string['dimensionnumber'] = 'Aspect $a';
+$string['dimensionweight'] = 'Weight';
+$string['pluginname'] = 'Accumulative grading';
for ($i = 0; $i < $nodims; $i++) {
// dimension header
- $dimtitle = get_string('dimensionnumbernoerrors', 'workshop', $i+1);
+ $dimtitle = get_string('dimensionnumber', 'workshopgrading_noerrors', $i+1);
$mform->addElement('header', "dimensionhdr__idx_$i", $dimtitle);
// dimension id
$mform->addElement('html', $desc);
// evaluation of the assertion
- $label = get_string('dimensiongradenoerrors', 'workshop');
+ $label = get_string('dimensiongrade', 'workshopgrading_noerrors');
$mform->addElement('radio', 'grade__idx_' . $i, 'Your assessment', $fields->{'grade0__idx_'.$i}, 0); // todo localize
$mform->addElement('radio', 'grade__idx_' . $i, '', $fields->{'grade1__idx_'.$i}, 1);
$mform->setDefault('grade__idx_' . $i, 0);
// comment
- $label = get_string('dimensioncomment', 'workshop');
+ $label = get_string('dimensioncomment', 'workshopgrading_noerrors');
$mform->addElement('textarea', 'peercomment__idx_' . $i, $label, array('cols' => 60, 'rows' => 5));
}
$this->set_data($current);
$weights = workshop_get_dimension_weights();
for ($i = 0; $i < $norepeats; $i++) {
- $mform->addElement('header', 'dimension'.$i, get_string('dimensionnumbernoerrors', 'workshop', $i+1));
+ $mform->addElement('header', 'dimension'.$i, get_string('dimensionnumber', 'workshopgrading_noerrors', $i+1));
$mform->addElement('hidden', 'dimensionid__idx_'.$i); // the id in workshop_forms
- $mform->addElement('editor', 'description__idx_'.$i.'_editor', get_string('dimensiondescription', 'workshop'),
- '', $descriptionopts);
- $mform->addElement('text', 'grade0__idx_'.$i, get_string('noerrorsgrade0', 'workshop'), array('size'=>'15'));
+ $mform->addElement('editor', 'description__idx_'.$i.'_editor',
+ get_string('dimensiondescription', 'workshopgrading_noerrors'), '', $descriptionopts);
+ $mform->addElement('text', 'grade0__idx_'.$i, get_string('grade0', 'workshopgrading_noerrors'), array('size'=>'15'));
$mform->setDefault('grade0__idx_'.$i, $workshopconfig->noerrorsgrade0);
$mform->setType('grade0__idx_'.$i, PARAM_TEXT);
- $mform->addElement('text', 'grade1__idx_'.$i, get_string('noerrorsgrade1', 'workshop'), array('size'=>'15'));
+ $mform->addElement('text', 'grade1__idx_'.$i, get_string('grade1', 'workshopgrading_noerrors'), array('size'=>'15'));
$mform->setDefault('grade1__idx_'.$i, $workshopconfig->noerrorsgrade1);
$mform->setType('grade1__idx_'.$i, PARAM_TEXT);
- $mform->addElement('select', 'weight__idx_'.$i, get_string('dimensionweight', 'workshop'), $weights);
+ $mform->addElement('select', 'weight__idx_'.$i, get_string('dimensionweight', 'workshopgrading_noerrors'), $weights);
$mform->setDefault('weight__idx_'.$i, 1);
}
- $mform->addElement('header', 'mappingheader', get_string('noerrorsgrademapping', 'workshop'));
- $mform->addElement('static', 'mappinginfo', get_string('noerrorsmaperror', 'workshop'),
- get_string('noerrorsmapgrade', 'workshop'));
+ $mform->addElement('header', 'mappingheader', get_string('grademapping', 'workshopgrading_noerrors'));
+ $mform->addElement('static', 'mappinginfo', get_string('maperror', 'workshopgrading_noerrors'),
+ get_string('mapgrade', 'workshopgrading_noerrors'));
// get the total weight of all items == maximum weighted number of errors
$totalweight = 0;
$percents = array();
$percents[''] = '';
for ($i = 100; $i >= 0; $i--) {
- $percents[$i] = get_string('percents', 'workshop', $i);
+ $percents[$i] = get_string('percents', 'workshopgrading_noerrors', $i);
}
- $mform->addElement('static', 'mappingzero', 0, get_string('percents', 'workshop', 100));
+ $mform->addElement('static', 'mappingzero', 0, get_string('percents', 'workshopgrading_noerrors', 100));
for ($i = 1; $i <= $totalweight; $i++) {
$selects = array();
$selects[] = $mform->createElement('select', 'map__idx_'.$i, $i, $percents);
$selects[] = $mform->createElement('static', 'mapdefault__idx_'.$i, '',
- get_string('percents', 'workshop', floor(100 - $i * 100 / $totalweight)));
+ get_string('percents', 'workshopgrading_noerrors', floor(100 - $i * 100 / $totalweight)));
$mform->addGroup($selects, 'grademapping'.$i, $i, array(' '), false);
$mform->setDefault('map__idx_'.$i, '');
}
$mform->registerNoSubmitButton('noadddims');
- $mform->addElement('submit', 'noadddims', get_string('addmoredimensionsaccumulative', 'workshop',
+ $mform->addElement('submit', 'noadddims', get_string('addmoredimensions', 'workshopgrading_noerrors',
WORKSHOP_STRATEGY_ADDDIMS));
$mform->closeHeaderBefore('noadddims');
$this->set_data($current);
--- /dev/null
+<?php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * English strings for Workshop plugin - "Number of errors" grading strategy
+ *
+ * @package mod-workshop
+ * @copyright 2009 David Mudrak <david.mudrak@gmail.com>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die();
+
+$string['addmoredimensions'] = 'Blanks for $a more assertions';
+$string['configgrade0'] = 'The default word describing the negative assessment of an assertion.';
+$string['configgrade1'] = 'The default word describing the positive assessment of an assertion.';
+$string['dimensioncomment'] = 'Comment';
+$string['dimensiondescription'] = 'Description';
+$string['dimensiongrade'] = 'Grade';
+$string['dimensionnumber'] = 'Assertion $a';
+$string['dimensionweight'] = 'Weight';
+$string['grademapping'] = 'Grade mapping table';
+$string['grade0default'] = 'No';
+$string['grade0'] = 'Word for the error';
+$string['grade1default'] = 'Yes';
+$string['grade1'] = 'Word for the success';
+$string['maperror'] = 'Weighted number of errors is less than or equals';
+$string['mapgrade'] = 'Grade for submission';
+$string['percents'] = '$a %';
+$string['pluginname'] = 'Number of errors';
defined('MOODLE_INTERNAL') || die();
-$string[''] = '';
-$string[''] = '';
-$string[''] = '';
-$string[''] = '';
-$string[''] = '';
-$string[''] = '';
-$string[''] = '';
-$string[''] = '';
-$string[''] = '';
-$string[''] = '';
-$string[''] = '';
-$string[''] = '';
-$string[''] = '';
-$string[''] = '';
-$string[''] = '';
-$string[''] = '';
$string['accesscontrol'] = 'Access control';
-$string['addmoredimensionsaccumulative'] = 'Blanks for $a more aspects';
-$string['addmoredimensionsnoerrors'] = 'Blanks for $a more assertions';
-$string['addreviewee'] = 'Add reviewee';
-$string['addreviewer'] = 'Add reviewer';
-$string['addselfassessment'] = 'Add self-assessments';
-$string['addsubmissiontoreview'] = 'Assign submission';
$string['agreeassessments'] = 'Assessments must be agreed';
$string['agreeassessmentsdesc'] = 'Authors may comment assessments of their work and agree/disagree with it';
-$string['allocationaddeddetail'] = 'New assessment to be done: <strong>$a->reviewername</strong> is reviewer of <strong>$a->authorname</strong>';
-$string['allocationadded'] = 'The submission has been successfully allocated';
-$string['allocationdeallocategraded'] = 'Unable to deallocate already graded assessment: reviewer <strong>$a->reviewername</strong>, submission author: <strong>$a->authorname</strong>';
-$string['allocationexists'] = 'The allocation already exists';
-$string['allocationmanual'] = 'Manual allocation';
-$string['allocationrandom'] = 'Random allocation';
-$string['allocationsettings'] = 'Allocation settings';
$string['allocation'] = 'Submission allocation';
-$string['allocationview'] = 'View current allocations';
+$string['allocationdone'] = 'Allocation done';
+$string['allocationerror'] = 'Allocation error';
$string['areadimensiondescription'] = 'Assessment form fields';
$string['areasubmissionattachment'] = 'Submission attachments';
$string['areasubmissioncontent'] = 'Submission texts';
-$string['areyousuretodeallocate'] = 'Are you sure you want deallocate the selected assessment?';
-$string['areyousuretodeallocategraded'] = 'You are going to remove the assessment that has already been graded. Are you really sure you want to do it?';
$string['assessallexamples'] = 'Assess all examples';
$string['assessingsubmission'] = 'Assessing submission';
$string['assessmentcomps'] = 'Required level of assessments similarity';
$string['assessmentdeleted'] = 'Assessment deallocated';
-$string['assessmentdeleteddetail'] = 'Assessment deallocated: <strong>$a->reviewername</strong> is no longer reviewer of <strong>$a->authorname</strong>';
$string['assessmentend'] = 'End of assessment phase';
$string['assessmentform'] = 'Assessment form';
$string['assessmentresult'] = 'Assessment result';
$string['assessmentsettings'] = 'Assessment settings';
$string['assessmentstart'] = 'Start of assessment phase';
-$string['assesswosubmission'] = 'Participants can assess without having submitted anything';
$string['backtoeditform'] = 'Back to editing form';
$string['byfullname'] = 'by <a href=\"{$a->url}\">{$a->name}</a>';
$string['comparisonhigh'] = 'High';
$string['configgradinggrade'] = 'Default maximum grade for assessment in workshops';
$string['configmaxbytes'] = 'Default maximum submission file size for all workshops on the site (subject to course limits and other local settings)';
$string['confignexassessments'] = 'Default number of examples to be reviewed by a user in the example assessment phase';
-$string['confignoerrorsgrade0'] = 'The default word describing the negative assessment of an assertion in "Number of errors" grading strategy.';
-$string['confignoerrorsgrade1'] = 'The default word describing the positive assessment of an assertion in "Number of errors" grading strategy.';
$string['confignsassessments'] = 'Default number of allocated submissions to be reviewed by a user in the assessment phase';
$string['configstrategy'] = 'Default grading strategy for workshops';
-$string['dimensioncomment'] = 'Comment';
-$string['dimensiondescription'] = 'Description';
-$string['dimensiongrade'] = 'Grade';
-$string['dimensionmaxgrade'] = 'Best possible grade / Scale to use';
-$string['dimensionnumberaccumulative'] = 'Aspect $a';
-$string['dimensionnumbernoerrors'] = 'Assertion $a';
-$string['dimensionweight'] = 'Weight';
$string['editingassessmentform'] = 'Editing assessment form';
$string['editingsubmission'] = 'Editing submission';
$string['editsubmission'] = 'Edit submission';
$string['modulename'] = 'Workshop';
$string['nattachments'] = 'Maximum number of submission attachments';
$string['nexassessments'] = 'Number of required assessments of examples';
-$string['noallocationtoadd'] = 'No allocations to add';
-$string['noerrorsgrademapping'] = 'Grade mapping table';
-$string['noerrorsgrade0default'] = 'No';
-$string['noerrorsgrade0'] = 'Word for the error';
-$string['noerrorsgrade1default'] = 'Yes';
-$string['noerrorsgrade1'] = 'Word for the success';
-$string['noerrorsmaperror'] = 'Weighted number of errors is less than or equals';
-$string['noerrorsmapgrade'] = 'Grade for submission';
$string['nogradeyet'] = 'No grade yet';
$string['nosubmissionfound'] = 'No submission found for this user';
$string['nosubmissions'] = 'No submissions yet in this workshop';
$string['nothingtoreview'] = 'Nothing to review';
$string['noworkshops'] = 'There are no workshops in this course';
$string['nsassessments'] = 'Number of required assessments of other users\' work';
-$string['numofdeallocatedassessment'] = 'Deallocating $a assessment(s)';
-$string['numofrandomlyallocatedsubmissions'] = 'Randomly allocating $a submissions';
$string['numofreviews'] = 'Number of reviews';
-$string['numofselfallocatedsubmissions'] = 'Self-allocating $a submission(s)';
-$string['numperauthor'] = 'per submission';
-$string['numperreviewer'] = 'per reviewer';
$string['participant'] = 'Participant';
$string['participantrevierof'] = 'Participant is reviewer of';
$string['participantreviewedby'] = 'Participant is reviewed by';
-$string['percents'] = '$a%';
$string['previewassessmentform'] = 'Preview';
-$string['randomallocationdone'] = 'Random allocation done';
$string['releasegrades'] = 'Push final grades into the gradebook';
-$string['removecurrentallocations'] = 'Remove current allocations';
$string['saveandclose'] = 'Save and close';
$string['saveandcontinue'] = 'Save and continue editing';
$string['saveandpreview'] = 'Save and preview';
$string['strategydummy'] = 'Dummy strategy';
$string['strategy'] = 'Grading strategy';
$string['strategyhaschanged'] = 'The workshop grading strategy has changed since the form was opened for editing.';
-$string['strategynoerrors'] = 'Number of errors';
$string['strategynograding'] = 'No grading';
$string['strategyrubric'] = 'Rubric grading';
$string['submissionattachment'] = 'Attachment';
* $return array Array ['string' => 'string']
*/
function workshop_get_strategies() {
- $installed = get_list_of_plugins('mod/workshop/grading');
+ $installed = get_plugin_list('workshopgrading');
$forms = array();
- foreach ($installed as $strategy) {
- $forms[$strategy] = get_string('strategy' . $strategy, 'workshop');
+ foreach ($installed as $strategy => $strategypath) {
+ if (file_exists($strategypath . '/strategy.php')) {
+ $forms[$strategy] = get_string('pluginname', 'workshopgrading_' . $strategy);
+ }
}
-
return $forms;
}
require_once(dirname(__FILE__).'/lib.php'); // we extend this library here
-define('WORKSHOP_ALLOCATION_EXISTS', -1); // return status of {@link add_allocation}
+define('WORKSHOP_ALLOCATION_EXISTS', -1); // return status of {@link add_allocation}
+define('WORKSHOP_ALLOCATION_ERROR', -2); // can be passed to a workshop renderer method
/**
* Full-featured workshop API
* @return array Array ['string' => 'string'] of localized allocation method names
*/
public function installed_allocators() {
- $installed = get_list_of_plugins('mod/workshop/allocation');
+ $installed = get_plugin_list('workshopallocation');
$forms = array();
- foreach ($installed as $allocation) {
- $forms[$allocation] = get_string('allocation' . $allocation, 'workshop');
+ foreach ($installed as $allocation => $allocationpath) {
+ if (file_exists($allocationpath . '/allocator.php')) {
+ $forms[$allocation] = get_string('pluginname', 'workshopallocation_' . $allocation);
+ }
}
// usability - make sure that manual allocation appears the first
if (isset($forms['manual'])) {
*/
public function allocation_init_result($result='') {
$msg = new stdClass();
- if ($result === 'WORKSHOP_ALLOCATION_RANDOM_ERROR') {
- $msg = (object)array('text' => get_string('randomallocationerror', 'workshop'), 'sty' => 'error');
+ if ($result === WORKSHOP_ALLOCATION_ERROR) {
+ $msg = (object)array('text' => get_string('allocationerror', 'workshop'), 'sty' => 'error');
} else {
- $msg = (object)array('text' => get_string('randomallocationdone', 'workshop'), 'sty' => 'ok');
+ $msg = (object)array('text' => get_string('allocationdone', 'workshop'), 'sty' => 'ok');
}
$o = $this->status_message($msg);
if (is_array($result)) {
echo $OUTPUT->box_start();
echo $OUTPUT->heading('Workshop testing', 1);
echo "<ol>\n";
-echo '<li><a href="' . $workshop->editform_url()->out() . '">Edit grading form (' . get_string('strategy' . $workshop->strategy, 'workshop') . ')</a></li>' . "\n";
+echo '<li><a href="' . $workshop->editform_url()->out() . '">Edit grading form (' . get_string('pluginname', 'workshopgrading_' . $workshop->strategy) . ')</a></li>' . "\n";
echo "<li><a href=\"submission.php?cmid={$cm->id}\">View/edit your own submission</a></li>\n";
echo "<li><a href=\"develtools.php?tool=mksubmissions&cmid={$cm->id}\">Fake others' submissions</a></li>\n";
echo "<li><a href=\"allocation.php?cmid={$cm->id}\">Allocate submissions</a></li>\n";