Spaces:
Running
Running
Upload 10 files
Browse files
src/views/InstructorView.js
CHANGED
|
@@ -594,6 +594,7 @@ export function setupInstructorEvents() {
|
|
| 594 |
|
| 595 |
// Global Reject Function
|
| 596 |
window.rejectCurrentSubmission = async () => {
|
|
|
|
| 597 |
const modal = document.getElementById('broadcast-modal');
|
| 598 |
if (!modal) return;
|
| 599 |
|
|
@@ -611,7 +612,7 @@ export function setupInstructorEvents() {
|
|
| 611 |
|
| 612 |
if (confirm('確定要退回此學員的進度嗎?學員將需要重新作答。')) {
|
| 613 |
try {
|
| 614 |
-
|
| 615 |
const success = await resetProgress(userId, roomCode, challengeId);
|
| 616 |
|
| 617 |
if (success) {
|
|
@@ -649,8 +650,8 @@ export function setupInstructorEvents() {
|
|
| 649 |
|
| 650 |
if (confirm('確定要退回此學員的進度嗎?學員將需要重新作答。')) {
|
| 651 |
try {
|
| 652 |
-
|
| 653 |
-
const success = resetProgress(userId, roomCode, challengeId);
|
| 654 |
|
| 655 |
if (success) {
|
| 656 |
alert('已成功退回,學員將需要重新作答。');
|
|
|
|
| 594 |
|
| 595 |
// Global Reject Function
|
| 596 |
window.rejectCurrentSubmission = async () => {
|
| 597 |
+
alert("正在執行退回動作...");
|
| 598 |
const modal = document.getElementById('broadcast-modal');
|
| 599 |
if (!modal) return;
|
| 600 |
|
|
|
|
| 612 |
|
| 613 |
if (confirm('確定要退回此學員的進度嗎?學員將需要重新作答。')) {
|
| 614 |
try {
|
| 615 |
+
// Use top-level import and await execution
|
| 616 |
const success = await resetProgress(userId, roomCode, challengeId);
|
| 617 |
|
| 618 |
if (success) {
|
|
|
|
| 650 |
|
| 651 |
if (confirm('確定要退回此學員的進度嗎?學員將需要重新作答。')) {
|
| 652 |
try {
|
| 653 |
+
// Dead code - syntax fix
|
| 654 |
+
const success = resetProgress(userId, roomCode, challengeId);
|
| 655 |
|
| 656 |
if (success) {
|
| 657 |
alert('已成功退回,學員將需要重新作答。');
|