]> git.mjollnir.org Git - moodle.git/commitdiff
Some files renamed to fit the coding style
authorDavid Mudrak <david.mudrak@gmail.com>
Mon, 4 Jan 2010 17:35:12 +0000 (17:35 +0000)
committerDavid Mudrak <david.mudrak@gmail.com>
Mon, 4 Jan 2010 17:35:12 +0000 (17:35 +0000)
mod/workshop/editgradingform.php
mod/workshop/grading/accumulative/gradingform.php [moved from mod/workshop/grading/accumulative/edit_accumulative_strategy_form.php with 97% similarity]
mod/workshop/grading/gradingform.php [moved from mod/workshop/grading/edit_strategy_form.php with 100% similarity]
mod/workshop/grading/strategy.php [new file with mode: 0644]

index 860c06219684ba440e138914603804b6233c21c3..c35e2671ab4bd659ed2228d492630afae12c9298 100644 (file)
@@ -70,11 +70,11 @@ $selfurl   = "{$CFG->wwwroot}/mod/workshop/editgradingform.php?id={$cm->id}";
 $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));
similarity index 97%
rename from mod/workshop/grading/accumulative/edit_accumulative_strategy_form.php
rename to mod/workshop/grading/accumulative/gradingform.php
index 42b12a37490095618ec00545783d01985ebed952..f35f63370e681d24dd384043004e48640e27d5c3 100644 (file)
@@ -28,7 +28,7 @@ if (!defined('MOODLE_INTERNAL')) {
     die('Direct access to this script is forbidden.'); //  It must be included from a Moodle page
 }
 
-require_once(dirname(dirname(__FILE__)).'/edit_strategy_form.php');  // parent class definition
+require_once(dirname(dirname(__FILE__)).'/gradingform.php');  // parent class definition
 
 
 /**
diff --git a/mod/workshop/grading/strategy.php b/mod/workshop/grading/strategy.php
new file mode 100644 (file)
index 0000000..078b0fe
--- /dev/null
@@ -0,0 +1,44 @@
+<?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 {
+
+}