As part of the cohort manager, each user should have their personal profile page that displays their details. As a user, I would like to view other users' profile pages regardless of which cohort they are in or whether they are teachers or not.
A user with id=12 should have their profile page at the path /profile/:id
Profile pages should only be visible by logged in users. When not logged in, redirect to the login page.
In the profile page view, the users' details should not be editable and just presented as text. This page should have a button with the text "Edit" that will take the user to the edit profile page.
This button should only be visible when the user visiting this profile page is:
a teacher
the user that page belongs to
Editing profiles
As a user I should be able to edit the the details on my own profile page. If I am a student, I should not be able to edit my role or the cohort I am in, only teachers are allowed to do this. The password should only be editable if I am the owner of that profile page.
As a teacher, I need to be able to change a student into a teacher and vice-versa, or change the cohort they are in. Teachers should be able to do so by visiting the student's profile page.
A user with id=12 should have their edit profile page at the path profile/:id/edit
If a student visits another student's or a teachers edit page, they should be redirected to the normal profile page for that user.
Teachers are allowed to visit any other user's profile/:id/edit page and submit updated data.
Student profile page example
On a student's profile page, the following fields should be visible:
email
first and last names
role
cohort
biography
github url
profile image
The wireframe below gives you an idea of how it might look like (in profile edit mode). The UI should look similar to this in normal (not edit) mode, with the difference that you'll not use input fields to present the contact's details.
Note: the wireframe presents more fields; please ignore them and focus on those mentioned above only as the API only supports the fields above.
In edit mode, the role and cohort are not editable by students, but are editable by a teacher.
In edit mode, I should be able to change my password if I am editing my own profile. Teachers should not be able to edit the passwords of students or other teachers.
Teacher profile page example
On a teacher's profile page, the following fields should be visible:
email
first and last names
role
biography
github url
profile image
The wireframe below gives you an idea of how it might look like (in profile edit mode). The UI should look similar to this in normal (not edit) mode, with the difference that you'll not use input fields to present the contact's details.
Note: the wireframe presents more fields; please ignore them and focus on those mentioned above only as the API only supports the fields above.
In edit mode, I should be able to change my password if I am editing my own profile.
Profile Page Overview
As part of the cohort manager, each user should have their personal profile page that displays their details. As a user, I would like to view other users' profile pages regardless of which cohort they are in or whether they are teachers or not.
A user with
id=12
should have their profile page at the path/profile/:id
Profile pages should only be visible by logged in users. When not logged in, redirect to the login page.
In the profile page view, the users' details should not be editable and just presented as text. This page should have a button with the text "Edit" that will take the user to the edit profile page.
This button should only be visible when the user visiting this profile page is:
Editing profiles
As a user I should be able to edit the the details on my own profile page. If I am a student, I should not be able to edit my
role
or the cohort I am in, only teachers are allowed to do this. The password should only be editable if I am the owner of that profile page.As a teacher, I need to be able to change a student into a teacher and vice-versa, or change the cohort they are in. Teachers should be able to do so by visiting the student's profile page.
A user with
id=12
should have their edit profile page at the pathprofile/:id/edit
If a student visits another student's or a teachers edit page, they should be redirected to the normal profile page for that user.
Teachers are allowed to visit any other user's
profile/:id/edit
page and submit updated data.Student profile page example
On a student's profile page, the following fields should be visible:
The wireframe below gives you an idea of how it might look like (in profile edit mode). The UI should look similar to this in normal (not edit) mode, with the difference that you'll not use input fields to present the contact's details.
Note: the wireframe presents more fields; please ignore them and focus on those mentioned above only as the API only supports the fields above.
In edit mode, the role and cohort are not editable by students, but are editable by a teacher.
In edit mode, I should be able to change my password if I am editing my own profile. Teachers should not be able to edit the passwords of students or other teachers.
Teacher profile page example
On a teacher's profile page, the following fields should be visible:
The wireframe below gives you an idea of how it might look like (in profile edit mode). The UI should look similar to this in normal (not edit) mode, with the difference that you'll not use input fields to present the contact's details.
Note: the wireframe presents more fields; please ignore them and focus on those mentioned above only as the API only supports the fields above.
In edit mode, I should be able to change my password if I am editing my own profile.