Add instructor as an enrolled user to a course. Also change frontend to use instructor role instead of teacher

This commit is contained in:
2023-04-13 14:51:40 -04:00
parent 797b7235e9
commit 0db9844e77
2 changed files with 2 additions and 1 deletions

View File

@@ -109,6 +109,7 @@ def create_course():
c = Course() c = Course()
c.from_dict(data) c.from_dict(data)
u.enroll(c)
db.session.add(c) db.session.add(c)
db.session.commit() db.session.commit()

View File

@@ -62,7 +62,7 @@ const RegisterPage = () => {
}} }}
> >
<option value="student">Student</option> <option value="student">Student</option>
<option value="teacher">Teacher</option> <option value="instructor">Instructor</option>
</Form.Select> </Form.Select>
</Col> </Col>
</Form.Group> </Form.Group>