diff --git a/BackEndFlask/controller/Routes/Assessment_task_routes.py b/BackEndFlask/controller/Routes/Assessment_task_routes.py index a8701b233..2b1104f05 100644 --- a/BackEndFlask/controller/Routes/Assessment_task_routes.py +++ b/BackEndFlask/controller/Routes/Assessment_task_routes.py @@ -307,7 +307,7 @@ class Meta: "create_team_password", "comment", "number_of_teams", - "max_team_size" + "max_team_size", "notification_sent" ) diff --git a/BackEndFlask/models/assessment_task.py b/BackEndFlask/models/assessment_task.py index b0b09911c..436e5b233 100644 --- a/BackEndFlask/models/assessment_task.py +++ b/BackEndFlask/models/assessment_task.py @@ -428,6 +428,9 @@ def replace_assessment_task(assessment_task, assessment_task_id): one_assessment_task.unit_of_assessment = assessment_task["unit_of_assessment"] one_assessment_task.create_team_password = assessment_task["create_team_password"] one_assessment_task.comment = assessment_task["comment"] + one_assessment_task.number_of_teams = assessment_task["number_of_teams"] + one_assessment_task.max_team_size = assessment_task["max_team_size"] + db.session.commit() diff --git a/BackEndFlask/models/user.py b/BackEndFlask/models/user.py index 0eb4aa8c4..b9ac1e235 100644 --- a/BackEndFlask/models/user.py +++ b/BackEndFlask/models/user.py @@ -1,15 +1,10 @@ from core import db - from werkzeug.security import generate_password_hash, check_password_hash - from models.schemas import User, UserCourse - from sqlalchemy import ( and_ ) - from models.utility import generate_random_password, send_new_user_email - from dotenv import load_dotenv load_dotenv() @@ -186,7 +181,7 @@ def create_user(user_data): user_data = User( first_name=user_data["first_name"], last_name=user_data["last_name"], - email=user_data["email"], + email=user_data["email"].lower().strip(), password=password_hash, lms_id=user_data["lms_id"], consent=user_data["consent"], diff --git a/FrontEndReact/src/View/Admin/View/CompleteAssessmentTask/CompleteAssessmentTask.js b/FrontEndReact/src/View/Admin/View/CompleteAssessmentTask/CompleteAssessmentTask.js index f01fe01b2..f0d81c54d 100644 --- a/FrontEndReact/src/View/Admin/View/CompleteAssessmentTask/CompleteAssessmentTask.js +++ b/FrontEndReact/src/View/Admin/View/CompleteAssessmentTask/CompleteAssessmentTask.js @@ -190,6 +190,8 @@ class CompleteAssessmentTask extends Component { var navbar = this.props.navbar; + const fixedTeams = navbar.state.chosenCourse["use_fixed_teams"]; + var chosenAssessmentTask = navbar.state.chosenAssessmentTask; if (errorMessage) { @@ -205,14 +207,14 @@ class CompleteAssessmentTask extends Component { ); - } else if (chosenAssessmentTask["unit_of_assessment"] && teams.length === 0) { + } else if (chosenAssessmentTask["unit_of_assessment"] && (fixedTeams && teams.length === 0)) { return ( -

Please create a team to complete this assessment for.

+

Please create a team to complete this assessment.

) } else if (!chosenAssessmentTask["unit_of_assessment"] && users.length === 0) { return ( -

Please add students to the roster to complete this assessment for.

+

Please add students to the roster to complete this assessment.

) } diff --git a/FrontEndReact/src/View/Admin/View/ViewAssessmentTask/ViewAssessmentTasks.js b/FrontEndReact/src/View/Admin/View/ViewAssessmentTask/ViewAssessmentTasks.js index 93b6f2849..787ef80ec 100644 --- a/FrontEndReact/src/View/Admin/View/ViewAssessmentTask/ViewAssessmentTasks.js +++ b/FrontEndReact/src/View/Admin/View/ViewAssessmentTask/ViewAssessmentTasks.js @@ -72,7 +72,7 @@ class ViewAssessmentTasks extends Component { componentDidMount() { const courseId = this.props.navbar.state.chosenCourse.course_id; - + genericResourceGET( `/assessment_task?course_id=${courseId}`, "assessmentTasks", @@ -91,7 +91,8 @@ class ViewAssessmentTasks extends Component { if (this.state.assessmentTasks === null || this.state.completedAssessments === null) { return ; } - + const fixedTeams = this.props.navbar.state.chosenCourse["use_fixed_teams"]; + var navbar = this.props.navbar; var adminViewAssessmentTask = navbar.adminViewAssessmentTask; @@ -324,7 +325,7 @@ class ViewAssessmentTasks extends Component { const isTeamAssessment = assessmentTask && assessmentTask.unit_of_assessment; const teamsExist = this.props.teams && this.props.teams.length > 0; - if (isTeamAssessment && !teamsExist) { + if (isTeamAssessment && (fixedTeams && !teamsExist)) { return ( diff --git a/FrontEndReact/src/View/Login/Login.js b/FrontEndReact/src/View/Login/Login.js index a7fcd8d3d..8256e7eaa 100644 --- a/FrontEndReact/src/View/Login/Login.js +++ b/FrontEndReact/src/View/Login/Login.js @@ -55,11 +55,12 @@ class Login extends Component { }; this.login = () => { - const { + var { email, password, } = this.state; + email = email.toLowerCase(); if (email.trim() === '' || password.trim() === '') { this.setState({ errors: {