From fcdeb97e6532afdaa3c462442b2e7aa8458b83bb Mon Sep 17 00:00:00 2001 From: David Watson <14983002+watson8@users.noreply.github.com> Date: Tue, 10 Sep 2024 11:23:35 +0100 Subject: [PATCH 1/2] CTP-3560 missing _ in classname --- classes/stages/base.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } From 393f364fe894e509a77f64d346afe7bfb7da0eae Mon Sep 17 00:00:00 2001 From: David Watson <14983002+watson8@users.noreply.github.com> Date: Tue, 10 Sep 2024 11:34:03 +0100 Subject: [PATCH 2/2] CTP-3560 personal deadline table name --- classes/framework/table_base.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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; }