Add refresh buttons and optimize case series update

- Implemented refresh buttons for each exam/packet section and a global refresh button.
- Enhanced resource management in the atlas by allowing inline creation and attachment of resources.
- Redirected users back to the case within a case collection upon saving or cancelling edits.
- Optimized the case series update view to prevent hanging issues on production.
- Fixed an issue with the local-up script not shutting down running containers properly.

Add marker feedback field to useranswer model

- Created migrations to add a 'marker_feedback' field to the 'useranswer' model in both 'longs' and 'shorts' apps.
- The new field is a TextField that allows optional feedback for the marker, which will not be shown to the candidate.
This commit is contained in:
Ross
2026-07-04 23:11:19 +01:00
parent 277322059c
commit 55fcf71431
5 changed files with 1789 additions and 749 deletions
+2
View File
@@ -1495,9 +1495,11 @@ class CaseSeriesForm(forms.ModelForm):
def __init__(self, *args, queryset, user=None, is_atlas_editor=False, **kwargs):
super().__init__(*args, **kwargs)
self.fields["series"].queryset = queryset
self.fields["series"].label_from_instance = lambda obj: str(obj.pk)
class Meta:
model = SeriesDetail # through model for Case.series
fields = ["series", "sort_order", "feedback"]
+1730 -748
View File
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,18 @@
# Generated by Django 6.0.1 on 2026-07-04 22:09
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('longs', '0038_useranswer_time_answered'),
]
operations = [
migrations.AddField(
model_name='useranswer',
name='marker_feedback',
field=models.TextField(blank=True, help_text='Feedback for the marker, this is optional and will NOT be shown to the candidate.', null=True),
),
]
@@ -0,0 +1,18 @@
# Generated by Django 6.0.1 on 2026-07-04 22:09
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('shorts', '0014_useranswer_time_answered'),
]
operations = [
migrations.AddField(
model_name='useranswer',
name='marker_feedback',
field=models.TextField(blank=True, help_text='Feedback for the marker, this is optional and will NOT be shown to the candidate.', null=True),
),
]
+21 -1
View File
@@ -1 +1,21 @@
RTS: we should show a refresh button for each of the exam/packet sections (as well as a global refresh that refreshes all)
RTS: we should show a refresh button for each of the exam/packet sections (as well as a global refresh that refreshes all)
When editing / viewing a case in the atlas it is currently possible to associate resources that have already been created. it should also be possible to create and attach the resource inline.
When editing a case as part of a casecollection we should redirect back to the case as part of the casecollection when it is saved / cancelled.
We need to optimise the case series update view. This currently hangs on the production site (likely due to the large number of series).
Running the docker local-up script does not always shut down the currently running containsers:
(rad) ⋊> ~/p/rad on master ./scripts/local-up.sh -n 23:07:18
Starting compose with COMPOSE_ENV=dev (using .env.dev)
Ensuring loki and logs folders exist under /home/ross/penracourses/rad/docker and /home/ross/penracourses/rad/logs
Attempting to chown loki folders to UID 10001 (may prompt for sudo password)
[sudo] password for ross:
[+] Running 5/5
✔ Container docker-nginx-1 Stopped 0.2s
✔ Container docker-worker-1 Stopped 0.5s
✔ Container docker-web-1 Stopped 10.3s
✔ Container docker-redis-1 Stopped 0.2s
✔ Network docker_default Removed 0.0s
Error response from daemon: error while removing network: network docker_default has active endpoints (name:"docker-cache-1" id:"4650361118ce", name:"docker-db-1" id:"2a82b22517d0")