Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SKIL-566 #793

Merged
merged 2 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions BackEndFlask/controller/Routes/Completed_assessment_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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}
Expand Down Expand Up @@ -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}
Expand All @@ -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}
Expand Down
Loading