diff --git a/classes/framework/table_base.php b/classes/framework/table_base.php index 06b93d57..a6bd857e 100644 --- a/classes/framework/table_base.php +++ b/classes/framework/table_base.php @@ -298,7 +298,13 @@ public static final function get_table_name() { $class_name = get_called_class(); // 'mod_coursework\models\deadline_extension' $pieces = explode('\\', $class_name); // 'mod_coursework', 'models', 'deadline_extension' $table_name = end($pieces); // 'deadline_extension' - $table_name .= 's'; // 'deadline_extensions' + //todo this may need further attention but fixing the one issue identified so far. + if ($table_name == 'personal_deadline') { + // Table personal_deadline does not exist but coursework_person_deadline does. + $table_name = 'coursework_person_deadline'; + } else { + $table_name .= 's'; // 'deadline_extensions' + } } else { $table_name = static::$table_name; } diff --git a/classes/stages/base.php b/classes/stages/base.php index 05e96ea7..fccf854b 100644 --- a/classes/stages/base.php +++ b/classes/stages/base.php @@ -83,7 +83,7 @@ public function __construct($coursework, $stageidentifier) { */ private function get_allocation_strategy() { $strategyname = $this->strategy_name(); - $classname = "\\modcoursework\\allocation\\strategy\\{$strategyname}"; + $classname = "\\mod_coursework\\allocation\\strategy\\{$strategyname}"; return new $classname($this->get_coursework(), $this); }