diff --git a/BackEndFlask/controller/Routes/Completed_assessment_routes.py b/BackEndFlask/controller/Routes/Completed_assessment_routes.py index eadf8c013..ced1c1ef3 100644 --- a/BackEndFlask/controller/Routes/Completed_assessment_routes.py +++ b/BackEndFlask/controller/Routes/Completed_assessment_routes.py @@ -159,17 +159,20 @@ def get_completed_assessment_by_team_or_user_id(): def add_completed_assessment(): try: assessment_data = request.json - team_id = int(assessment_data["team_id"]) + if (team_id == -1): + assessment_data["team_id"] = None assessment_task_id = int(request.args.get("assessment_task_id")) user_id = int(assessment_data["user_id"]) + if (user_id == -1): + assessment_data["user_id"] = None completed = completed_assessment_exists(team_id, assessment_task_id, user_id) if completed: - completed = replace_completed_assessment(request.json, completed.completed_assessment_id) + completed = replace_completed_assessment(assessment_data, completed.completed_assessment_id) else: - completed = create_completed_assessment(request.json) + completed = create_completed_assessment(assessment_data) return create_good_response(completed_assessment_schema.dump(completed), 201, "completed_assessments") diff --git a/FrontEndReact/src/View/Admin/Add/AddTask/AdminAddAssessmentTask.js b/FrontEndReact/src/View/Admin/Add/AddTask/AdminAddAssessmentTask.js index 0e99d2c47..5228d0cec 100644 --- a/FrontEndReact/src/View/Admin/Add/AddTask/AdminAddAssessmentTask.js +++ b/FrontEndReact/src/View/Admin/Add/AddTask/AdminAddAssessmentTask.js @@ -386,7 +386,7 @@ class AdminAddAssessmentTask extends Component { id="numberOfTeams" name="newPassword" variant='outlined' - label="Number of teams" + label="Maximum number of teams you will use during class for this assessment" value={this.state.numberOfTeams} error={!!errors.numberOfTeams} helperText={errors.numberOfTeams} @@ -406,7 +406,7 @@ class AdminAddAssessmentTask extends Component { id="maxTeamSize" name="setTeamSize" variant='outlined' - label="Max team size" + label="Max team size allowed for each team in class" value={this.state.maxTeamSize} error={!!errors.maxTeamSize} helperText={errors.maxTeamSize} @@ -534,7 +534,7 @@ class AdminAddAssessmentTask extends Component { id="password" name="newPassword" variant='outlined' - label="Password to switch teams" + label="Password to switch teams (Prevents students from switching teams without instructor approval.)" value={password} error={!!errors.password} helperText={errors.password} @@ -549,7 +549,7 @@ class AdminAddAssessmentTask extends Component { id="notes" name="notes" variant='outlined' - label="Instructions to Students/TA's" + label="Instructions for Students/TA's about the Assessment or particular focus areas" value={notes} error={!!errors.notes} helperText={errors.notes}