}
// get the information about the assessment dimensions
- $diminfo = $grader->eval_best_dimensions_info();
+ $diminfo = $grader->get_dimensions_info();
// fetch a recordset with all assessments to process
- $rs = $grader->eval_best_get_assessments_recordset($restrict);
+ $rs = $grader->get_assessments_recordset($restrict);
$batch = array(); // will contain a set of all assessments of a single submission
$previous = null; // a previous record in the recordset
foreach ($rs as $current) {
* @param resource $restrict
* @return TODO
*/
- public function eval_best_get_assessments_recordset($restrict) {
+ public function get_assessments_recordset($restrict) {
global $DB;
$sql = 'SELECT s.id AS submissionid,
*
* @return array [dimid] => stdClass (->id ->max ->min ->weight)
*/
- public function eval_best_dimensions_info() {
+ public function get_dimensions_info() {
global $DB;
$sql = 'SELECT d.id, d.grade, d.weight, s.scale
*/
public function supports_evaluation(workshop_evaluation $evaluation);
+ /**
+ * Returns a general information about the assessment dimensions
+ *
+ * @return array [dimid] => stdClass (->id ->max ->min ->weight)
+ */
+ public function get_dimensions_info();
+
+ /**
+ * Returns recordset with detailed information of all assessments done using this strategy
+ *
+ * The returned structure must be a recordset of objects containing at least properties:
+ * submissionid, assessmentid, assessmentweight, reviewerid, gradinggrade, dimensionid and grade.
+ * It is possible to pass user id(s) of reviewer(s). Then, the method returns just the reviewer's
+ * assessments info.
+ *
+ * @param array|int|null $restrict optional id or ids of the reviewer
+ * @return moodle_recordset
+ */
+ public function get_assessments_recordset($restrict=null);
}
* @param array|int|null $restrict optional id or ids of the reviewer
* @return moodle_recordset
*/
- public function eval_best_get_assessments_recordset($restrict=null) {
+ public function get_assessments_recordset($restrict=null) {
global $DB;
$sql = 'SELECT s.id AS submissionid,
*
* @return array [dimid] => stdClass (->id ->max ->min ->weight)
*/
- public function eval_best_dimensions_info() {
+ public function get_dimensions_info() {
global $DB;
$sql = 'SELECT d.id AS id, MIN(l.grade) AS min, MAX(l.grade) AS max, 1 AS weight