diff --git a/crowdsourcer/views/marking.py b/crowdsourcer/views/marking.py index 1abeb29a..78e1c515 100644 --- a/crowdsourcer/views/marking.py +++ b/crowdsourcer/views/marking.py @@ -76,7 +76,8 @@ def get_context_data(self, **kwargs): context["show_login"] = True return context - context["show_users"] = self.request.user.is_superuser + user = self.request.user + context["show_users"] = user.is_superuser assignments = ( context["assignments"] @@ -130,9 +131,14 @@ def get_context_data(self, **kwargs): context["progress"] = progress - if self.current_stage.type == "First Mark": + user_stage = self.current_stage.type + if hasattr(user, "marker"): + if user.marker.response_type: + user_stage = user.marker.response_type.type + + if user_stage == "First Mark": section_link = "section_authorities" - elif self.current_stage.type == "Audit": + elif user_stage == "Audit": section_link = "audit_section_authorities" context["page_title"] = "Assignments"