From: David Mudrak Date: Mon, 4 Jan 2010 17:35:12 +0000 (+0000) Subject: Some files renamed to fit the coding style X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=725d615401bec72d08e9773897ff49b645e318d9;p=moodle.git Some files renamed to fit the coding style --- diff --git a/mod/workshop/editgradingform.php b/mod/workshop/editgradingform.php index 860c062196..c35e2671ab 100644 --- a/mod/workshop/editgradingform.php +++ b/mod/workshop/editgradingform.php @@ -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)); diff --git a/mod/workshop/grading/accumulative/edit_accumulative_strategy_form.php b/mod/workshop/grading/accumulative/gradingform.php similarity index 97% rename from mod/workshop/grading/accumulative/edit_accumulative_strategy_form.php rename to mod/workshop/grading/accumulative/gradingform.php index 42b12a3749..f35f63370e 100644 --- a/mod/workshop/grading/accumulative/edit_accumulative_strategy_form.php +++ b/mod/workshop/grading/accumulative/gradingform.php @@ -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/edit_strategy_form.php b/mod/workshop/grading/gradingform.php similarity index 100% rename from mod/workshop/grading/edit_strategy_form.php rename to mod/workshop/grading/gradingform.php diff --git a/mod/workshop/grading/strategy.php b/mod/workshop/grading/strategy.php new file mode 100644 index 0000000000..078b0fe56c --- /dev/null +++ b/mod/workshop/grading/strategy.php @@ -0,0 +1,44 @@ +. + + +/** + * This file defines a base class for all grading strategy editing forms. + * + * @package mod-workshop + * @copyright 2009 David Mudrak + * @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 { + +}