$dimensions = $DB->get_records('workshop_forms_accumulative', array('workshopid' => $workshop->id), 'sort');
// load the form to edit the grading strategy dimensions
-$strategylib = dirname(__FILE__) . '/grading/' . $workshop->strategy . '/edit_' . $workshop->strategy . '_strategy_form.php';
-if (file_exists($strategylib)) {
- require_once($strategylib);
+$strategyform = dirname(__FILE__) . '/grading/' . $workshop->strategy . '/gradingform.php';
+if (file_exists($strategyform)) {
+ require_once($strategyform);
} else {
- print_error('errloadingstrategylib', 'workshop', $returnurl);
+ print_error('errloadingstrategyform', 'workshop', $returnurl);
}
$classname = 'workshop_edit_' . $workshop->strategy . '_strategy_form';
$mform = new $classname($selfurl, true, count($dimensions));
--- /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/>.
+
+
+/**
+ * This file defines a base class for all grading strategy editing forms.
+ *
+ * @package mod-workshop
+ * @copyright 2009 David Mudrak <david.mudrak@gmail.com>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+if (!defined('MOODLE_INTERNAL')) {
+ die('Direct access to this script is forbidden.'); // It must be included from a Moodle page
+}
+
+
+/**
+ * Strategy interface defines all methods that strategy subplugins has to implemens
+ */
+interface workshop_strategy_interface {
+
+}
+
+/**
+ * Base class for grading strategy logic.
+ */
+class workshop_strategy implements workshop_strategy_interface {
+
+}