diff --git a/generic/tables.py b/generic/tables.py
index e36a3288..d1f29a64 100644
--- a/generic/tables.py
+++ b/generic/tables.py
@@ -74,8 +74,8 @@ class SelectionTable(tables.Table):
"
"
diff --git a/rapids/views.py b/rapids/views.py
index 553cc936..062b18e1 100755
--- a/rapids/views.py
+++ b/rapids/views.py
@@ -859,24 +859,30 @@ def exam_migrate_rapids_to_shorts(request, pk):
raise PermissionDenied()
from shorts.models import Question as ShortQuestion
+ created = []
+ skipped = []
+ failed = []
for rapid in exam.exam_questions.all():
try:
q = ShortQuestion.from_rapid(rapid)
if q is None:
- # skipped normal
- continue
- except Exception:
- # continue on error
+ skipped.append(str(rapid.id))
+ else:
+ created.append(str(q.id))
+ except Exception as e:
+ failed.append(str(rapid.id))
continue
- messages.success(request, "Exam migration attempted. Normal questions were skipped.")
+ if created:
+ messages.success(request, f"Created shorts questions: {', '.join(created)}")
+ if skipped:
+ messages.info(request, f"Skipped normal rapids (not migrated): {', '.join(skipped)}")
+ if failed:
+ messages.error(request, f"Failed to migrate rapids: {', '.join(failed)}")
- # Redirect to the exam overview for shorts if available, otherwise back to rapids exam
- try:
- return redirect("shorts:exam_overview", pk=exam.pk)
- except Exception:
- return redirect("rapids:exam_overview", pk=exam.pk)
+ # Redirect back to the Rapids exam overview (shorts exam may not exist)
+ return redirect("rapids:exam_overview", pk=exam.pk)
class ExamClone(ExamCloneMixin, ExamCreate):
diff --git a/templates/base.html b/templates/base.html
index 08cd19fd..a60421b3 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -369,8 +369,8 @@
+ '
'
+ '
'
+ '
'
- + ' '
- + ' '
+ + ' '
+ + ' '
+ '
'
+ '
'
+ '
'