@@ -54,7 +54,7 @@ public function execute() {
5454
5555 // Get the last submission id that had been checked in last run.
5656 $ lastrun = $ DB ->get_records_sql ('SELECT lastsubmissionid
57- FROM {tool_pdfdetect_runs }
57+ FROM {tool_corruptpdfdetector_runs }
5858 ORDER BY runtime
5959 DESC LIMIT :one ' , ['one ' => ONE ]);
6060
@@ -78,7 +78,7 @@ public function execute() {
7878 $ detectedsubmission = $ this ->detected_submission ($ submission );
7979 if ($ detectedsubmission != null ) {
8080 $ pdfwitherror = $ this ->check_submission_combined_pdf ($ submission );
81- $ detected = $ DB ->get_record ('tool_pdfdetect_assigns ' , ['submissionid ' => $ submission ->id ]);
81+ $ detected = $ DB ->get_record ('tool_corruptpdfdetector_assigns ' , ['submissionid ' => $ submission ->id ]);
8282 $ detected ->submitted = $ submission ->timemodified ;
8383 if ($ pdfwitherror != null ) {
8484 $ detected ->detected = $ pdfwitherror ->detected ;
@@ -89,12 +89,12 @@ public function execute() {
8989 } else {
9090 $ detected ->fixed = true ;
9191 }
92- $ DB ->update_record ('tool_pdfdetect_assigns ' , $ detected );
92+ $ DB ->update_record ('tool_corruptpdfdetector_assigns ' , $ detected );
9393 } else {
9494 $ pdfwitherror = $ this ->check_submission_combined_pdf ($ submission );
9595 if ($ pdfwitherror != null ) {
9696 $ detectednum ++;
97- $ DB ->insert_record ('tool_pdfdetect_assigns ' , $ pdfwitherror );
97+ $ DB ->insert_record ('tool_corruptpdfdetector_assigns ' , $ pdfwitherror );
9898 }
9999 }
100100 }
@@ -104,7 +104,7 @@ public function execute() {
104104 }
105105 $ run ->runtime = time ();
106106 $ run ->detectednumber = $ detectednum ;
107- $ DB ->insert_record ('tool_pdfdetect_runs ' , $ run );
107+ $ DB ->insert_record ('tool_corruptpdfdetector_runs ' , $ run );
108108 }
109109
110110 /**
@@ -136,7 +136,7 @@ private function get_pdf_file_for_assignment(assign $assignment, stdClass $submi
136136 }
137137
138138 /**
139- * Detects a previously recorded submission in the 'tool_pdfdetect_assigns ' table.
139+ * Detects a previously recorded submission in the 'tool_corruptpdfdetector_assigns ' table.
140140 *
141141 * @param stdClass $submission The submission object containing the ID to look up in the database.
142142 *
@@ -147,7 +147,7 @@ private function detected_submission(stdClass $submission): ?stdClass {
147147
148148 $ params = ['submissionid ' => $ submission ->id ];
149149 $ select = $ DB ->sql_compare_text ('submissionid ' ) . ' = ' . $ DB ->sql_compare_text (':submissionid ' );
150- $ detectedsubmission = $ DB ->get_record_select ('tool_pdfdetect_assigns ' , $ select , $ params );
150+ $ detectedsubmission = $ DB ->get_record_select ('tool_corruptpdfdetector_assigns ' , $ select , $ params );
151151
152152 if (!empty ($ detectedsubmission )) {
153153 return $ detectedsubmission ;
0 commit comments