Commit 93c3621b by Eric Fischer

review feedback

parent c70f6a9d
...@@ -204,6 +204,9 @@ def update_from_assessments(submission_uuid, assessment_requirements, override_s ...@@ -204,6 +204,9 @@ def update_from_assessments(submission_uuid, assessment_requirements, override_s
`must_be_graded_by` to ensure that everyone will get scored. `must_be_graded_by` to ensure that everyone will get scored.
The intention is to eventually pass in more assessment sequence The intention is to eventually pass in more assessment sequence
specific requirements in this dict. specific requirements in this dict.
override_submitter_requirements (bool): If True, the presence of a new
staff score will cause all of the submitter's requirements to be
fulfilled, moving the workflow to DONE and exposing their grade.
Returns: Returns:
dict: Assessment workflow information with the following dict: Assessment workflow information with the following
......
...@@ -297,6 +297,9 @@ class AssessmentWorkflow(TimeStampedModel, StatusModel): ...@@ -297,6 +297,9 @@ class AssessmentWorkflow(TimeStampedModel, StatusModel):
can refer to this to decide whether the requirements have been can refer to this to decide whether the requirements have been
met. Note that the requirements could change if the author met. Note that the requirements could change if the author
updates the problem definition. updates the problem definition.
override_submitter_requirements (bool): If True, the presence of a new
staff score will cause all of the submitter's requirements to be
fulfilled, moving the workflow to DONE and exposing their grade.
""" """
if self.status == self.STATUS.cancelled: if self.status == self.STATUS.cancelled:
...@@ -326,9 +329,10 @@ class AssessmentWorkflow(TimeStampedModel, StatusModel): ...@@ -326,9 +329,10 @@ class AssessmentWorkflow(TimeStampedModel, StatusModel):
# Update the assessment_completed_at field for all steps # Update the assessment_completed_at field for all steps
# All steps are considered "assessment complete", as the staff score will override all # All steps are considered "assessment complete", as the staff score will override all
for step in steps: for step in steps:
step.assessment_completed_at = now() common_now = now()
step.assessment_completed_at = common_now
if override_submitter_requirements: if override_submitter_requirements:
step.submitter_completed_at = now() step.submitter_completed_at = common_now
step.save() step.save()
if self.status == self.STATUS.done: if self.status == self.STATUS.done:
......
""" """
UI-level acceptance tests for OpenAssessment. UI-level acceptance tests for OpenAssessment.
""" """
from __future__ import absolute_import
import ddt import ddt
import os import os
import unittest import unittest
...@@ -342,6 +344,8 @@ class StaffAssessmentTest(OpenAssessmentTest): ...@@ -342,6 +344,8 @@ class StaffAssessmentTest(OpenAssessmentTest):
# Verify staff grade section appears as expected # Verify staff grade section appears as expected
self._verify_staff_grade_section("NOT AVAILABLE") self._verify_staff_grade_section("NOT AVAILABLE")
message_title = self.staff_asmnt_page.open_step().message_title
self.assertEqual("Waiting for a Staff Grade", message_title)
# Perform staff assessment # Perform staff assessment
self.staff_area_page = StaffAreaPage(self.browser, self.problem_loc) self.staff_area_page = StaffAreaPage(self.browser, self.problem_loc)
...@@ -532,14 +536,8 @@ class StaffAreaTest(OpenAssessmentTest): ...@@ -532,14 +536,8 @@ class StaffAreaTest(OpenAssessmentTest):
self.assertEqual(self.staff_area_page.visible_staff_panels, []) self.assertEqual(self.staff_area_page.visible_staff_panels, [])
for panel_name, button_label in [ for panel_name, button_label in [
( ("staff-tools", "MANAGE INDIVIDUAL LEARNERS"),
"staff-tools", ("staff-info", "VIEW ASSIGNMENT STATISTICS"),
"MANAGE INDIVIDUAL LEARNERS"
),
(
"staff-info",
"VIEW ASSIGNMENT STATISTICS"
),
]: ]:
# Click on the button and verify that the panel has opened # Click on the button and verify that the panel has opened
self.staff_area_page.click_staff_toolbar_button(panel_name) self.staff_area_page.click_staff_toolbar_button(panel_name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment