undefined - Follow Up Deployment
Browse files- index.html +9 -1
index.html
CHANGED
|
@@ -416,7 +416,15 @@ async function submitAssignment(){
|
|
| 416 |
|
| 417 |
/* ---------- VERIFY / DECRYPT (Teacher) ---------- */
|
| 418 |
async function verifyAssignment(){
|
| 419 |
-
const file=assignmentFile.files[0];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 420 |
const reader=new FileReader();
|
| 421 |
reader.onload=async e=>{
|
| 422 |
try{
|
|
|
|
| 416 |
|
| 417 |
/* ---------- VERIFY / DECRYPT (Teacher) ---------- */
|
| 418 |
async function verifyAssignment(){
|
| 419 |
+
const file=assignmentFile.files[0];
|
| 420 |
+
if(!file){alert('Please select a file');return;}
|
| 421 |
+
|
| 422 |
+
// locks obvious mistakes to enforce the extension
|
| 423 |
+
if (!file.name.toLowerCase().endsWith('.task')) {
|
| 424 |
+
showVerificationResult(false,
|
| 425 |
+
'Wrong file type – please upload a ".task" assignment file.');
|
| 426 |
+
return;
|
| 427 |
+
}
|
| 428 |
const reader=new FileReader();
|
| 429 |
reader.onload=async e=>{
|
| 430 |
try{
|