Repository: apluslms/a-plus

Issue:
Accessing the inspect submission view should be easier from the teacher's participant page
Teacher's participant page for a single student is accessed from the Participants list (course menu).

Clicking a submission in the submission dropdowns opens a modal dialog that contains the feedback. It is the same modal that is used in the chapter pages or the Exercise results / Your points section (in the course menu).

Should the link open the inspect page directly without any modal dialog? Or should we add more information to the modal?

Maybe it would be best if there was an inspect button already inside the module box so that you do not need to open any modal dialog or even open the dropdown menu.

From @jsorva:

We actually who views for inspecting student submissions: the view that 
is known as the Inspect view (discussed above) and the popup that shows 
up when you select a submission from a participant’s points page by 
selecting a submission there. I end up in the popup a *lot*, because 
it’s quite typical to be on a student’s page and then wish to check a 
particular score that they received. However, the the recent 
improvements to the Inspect view don’t carry over to the popup view.

TBH, I’m not even sure what the idea behind having these two separate 
views is. I do like the “lightness” of the popup (i.e., I can see 
something about the submission without having to leave the page I’m on), 
but couldn’t the popup simply show the Inspect view’s contents (or most 
of it?). When it’s enough to browse the student’s code, I often end up 
doing it in the popup (using the not-improved links there) so as to 
avoid having to load the Inspect view. And when the info I need is not 
in the popup, I still end up going to the actual Inspect view via the 
popup, which is a useless extra step.


Internal ticket: https://rt.cs.aalto.fi/Ticket/Display.html?id=20169



Discussion:
This could be one of Joni's first issues.

Resolving patch:
diff --git a/exercise/cache/content.py b/exercise/cache/content.py
--- a/exercise/cache/content.py
+++ b/exercise/cache/content.py
@@ -72,6 +72,7 @@ def recursion(
                     'late_time': module['late_time'],
                     'late_percent': module['late_percent'],
                     'is_empty': o.is_empty(),
+                    'get_path': o.get_path(),
                     'points_to_pass': 0,
                     'difficulty': '',
                     'max_submissions': 0,
@@ -113,6 +114,7 @@ def recursion(
                 'id': module.id,
                 'order': module.order,
                 'status': module.status,
+                'url': module.url,
                 'name': str(module),
                 'number': str(module.order),
                 'introduction': module.introduction,
diff --git a/exercise/templatetags/exercise.py b/exercise/templatetags/exercise.py
--- a/exercise/templatetags/exercise.py
+++ b/exercise/templatetags/exercise.py
@@ -72,8 +72,6 @@ def _is_accessible(context, entry, t):
 def user_results(context: Context, student: Optional[User] = None) -> Dict[str, Any]:
     values = _get_toc(context, student)
     values['total_json'] = json.dumps(values['total'])
-    if student:
-        values['is_course_staff'] = False
     if values['is_course_staff']:
         instance = context['instance']
         values['student_count'] = instance.students.count()


Test patch: