// where should the user be sent after closing the editing form
$returnurl = "{$CFG->wwwroot}/mod/workshop/view.php?id={$cm->id}";
// the URL of this editing form
-$selfurl = "{$CFG->wwwroot}/mod/workshop/editgradingform.php?cmid={$cm->id}";
+$selfurl = "{$CFG->wwwroot}/mod/workshop/editform.php?cmid={$cm->id}";
// load the grading strategy logic
$strategylib = dirname(__FILE__) . '/grading/' . $workshop->strategy . '/strategy.php';
// load the assessment form definition from the database
// this must be called before get_edit_strategy_form() where we have to know
// the number of repeating fieldsets
-$formdata = $strategy->load_grading_form();
+$formdata = $strategy->load_form();
// load the form to edit the grading strategy dimensions
$mform = $strategy->get_edit_strategy_form($selfurl);
if ($mform->is_cancelled()) {
redirect($returnurl);
} elseif ($data = $mform->get_data()) {
- $strategy->save_grading_form($data);
+ $strategy->save_form($data);
if (isset($data->saveandclose)) {
redirect($returnurl);
} else {
*/
class workshop_accumulative_strategy extends workshop_base_strategy {
- public function load_grading_form() {
+ public function load_form() {
global $DB;
$dims = $DB->get_records('workshop_forms_' . $this->name, array('workshopid' => $this->workshop->id), 'sort');
/**
* Transpones the dimension data from DB so the assessment form editor can be populated by set_data
*
- * Called internally from load_grading_form(). Could be private but keeping protected
+ * Called internally from load_form(). Could be private but keeping protected
* for unit testing purposes.
*
* @param array $raw Array of raw dimension records as fetched by get_record()
* @access public
* @return void
*/
- public function save_grading_form(stdClass $data) {
+ public function save_form(stdClass $data) {
global $DB;
if (!isset($data->strategyname) || ($data->strategyname != $this->name)) {
*
* It automatically adds some columns into every record. The sorting is
* done by the order of the returned array and starts with 1.
- * Called internally from save_grading_form() only. Could be private but
+ * Called internally from save_form() only. Could be private but
* keeping protected for unit testing purposes.
*
* @param object $raw Raw data returned by mform
*/
class workshop_noerrors_strategy extends workshop_base_strategy {
- public function load_grading_form() {
+ public function load_form() {
global $DB;
$dims = $DB->get_records('workshop_forms_' . $this->name, array('workshopid' => $this->workshop->id), 'sort');
/**
* Transpones the dimension data from DB so the assessment form editor can be populated by set_data
*
- * Called internally from load_grading_form(). Could be private but keeping protected
+ * Called internally from load_form(). Could be private but keeping protected
* for unit testing purposes.
*
* @param array $dims Array of raw dimension records as fetched by get_record()
* @param object $data Raw data returned by the dimension editor form
* @return void
*/
- public function save_grading_form(stdClass $data) {
+ public function save_form(stdClass $data) {
global $DB;
if (!isset($data->strategyname) || ($data->strategyname != $this->name)) {
*
* It automatically adds some columns into every record. The sorting is
* done by the order of the returned array and starts with 1.
- * Called internally from save_grading_form() only. Could be private but
+ * Called internally from save_form() only. Could be private but
* keeping protected for unit testing purposes.
*
* @param object $raw Raw data returned by mform
* @access public
* @return object Object representing the form fields values
*/
- public function load_grading_form();
+ public function load_form();
/**
* @param object $data Raw data as returned by the form editor
* @return void
*/
- public function save_grading_form(stdClass $data);
+ public function save_form(stdClass $data);
/**
/**
- * By default, the number of loaded dimensions is set by load_grading_form()
+ * By default, the number of loaded dimensions is set by load_form()
*
* @access public
* @return Array of records
/// Print the main part of the page
-echo "<a href=\"editgradingform.php?cmid={$cm->id}\">Edit grading form (".get_string('strategy' . $workshop->strategy, 'workshop').")</a>";
-echo " | ";
-echo "<a href=\"submission.php?cmid={$cm->id}\">My submission</a>";
+echo "<a href=\"editform.php?cmid={$cm->id}\">Edit grading form (".get_string('strategy' . $workshop->strategy, 'workshop').")</a>";
+echo " | <a href=\"submission.php?cmid={$cm->id}\">My submission</a>";
+echo " | <a href=\"assessment.php?asid=1\">Assessment ID 1</a>";
/// Finish the page
print_footer($course);