diff --git a/asystgrade/classes/db/QuizQuery.php b/asystgrade/classes/db/quizquery.php similarity index 97% rename from asystgrade/classes/db/QuizQuery.php rename to asystgrade/classes/db/quizquery.php index 92417b3920303add343645768049a642bc61f9a5..4023024f77356cebf2cf9fe35c581c644e4fdc21 100755 --- a/asystgrade/classes/db/QuizQuery.php +++ b/asystgrade/classes/db/quizquery.php @@ -1,7 +1,7 @@ url->compare(new moodle_url('/mod/quiz/report.php'), URL_MATCH_BASE) && $slot) { - $quizQuery = new QuizQuery(); + $quizQuery = new quizquery(); if ($quizQuery->gradesExist($qid, $slot)) { error_log('Grades already exist in the database.'); @@ -113,12 +113,12 @@ function pasteGradedMarks(array $grades, array $inputNames, float $maxmark): voi /** * Processes question attempts and answers to prepare for API a data to estimate answers * - * @param QuizQuery $database + * @param quizquery $database * @param $question_attempts * @param $referenceAnswer * @return array */ -function prepare_api_data(QuizQuery $database, $question_attempts, $referenceAnswer): array +function prepare_api_data(quizquery $database, $question_attempts, $referenceAnswer): array { $studentData = []; @@ -189,16 +189,16 @@ function generate_script(array $grades, array $inputNames, float $maxmark) { /** * Autoloader registration */ -spl_autoload_register(function ($classname) { - // Check if the class name starts with our plugin's namespace - if (strpos($classname, 'local_asystgrade\\') === 0) { - // Transforming the Namespace into the Path - $classname = str_replace('local_asystgrade\\', '', $classname); - $classname = str_replace('\\', DIRECTORY_SEPARATOR, $classname); - $filepath = __DIR__ . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR . $classname . '.php'; - - if (file_exists($filepath)) { - require_once($filepath); - } - } -}); +//spl_autoload_register(function ($classname) { +// // Check if the class name starts with our plugin's namespace +// if (strpos($classname, 'local_asystgrade\\') === 0) { +// // Transforming the Namespace into the Path +// $classname = str_replace('local_asystgrade\\', '', $classname); +// $classname = str_replace('\\', DIRECTORY_SEPARATOR, $classname); +// $filepath = __DIR__ . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR . $classname . '.php'; +// +// if (file_exists($filepath)) { +// require_once($filepath); +// } +// } +//}); diff --git a/asystgrade/tests/quiz_api_test.php b/asystgrade/tests/quiz_api_test.php index 2c6988b38e22c325b115eaa529fc4103074ae5e5..035b9d502cb149e4b55825e7ff248dd9b558b243 100755 --- a/asystgrade/tests/quiz_api_test.php +++ b/asystgrade/tests/quiz_api_test.php @@ -227,7 +227,6 @@ class quiz_api_test extends advanced_testcase 'referenceAnswer' => $referenceAnswer, 'studentAnswers' => $studentAnswers ]; -// var_dump($data); error_log("Data to send to API: " . print_r($data, true)); $response = $apiClient->send_data($data);