-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[#11362] [#11617] Use course institute fully for displays + to determine whether account can create course #11654
[#11362] [#11617] Use course institute fully for displays + to determine whether account can create course #11654
Conversation
2769d77
to
b43d156
Compare
bf4b61c
to
3c6d349
Compare
8de5483
to
fb54cb6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't find much else other than the issue on the course page. Some comments below!
src/main/java/teammates/common/datatransfer/attributes/AccountAttributes.java
Outdated
Show resolved
Hide resolved
src/web/app/pages-session/session-submission-page/session-submission-page.component.ts
Outdated
Show resolved
Hide resolved
ada7965
to
b2948b5
Compare
e10189a
to
70a679b
Compare
@wkurniawan07, I seem to be facing the same issue. Steps to replicate:
|
@samuelfangjw really sorry to say this, but I'm almost certain something is amiss with your setup. One of the E2E tests would have guaranteed that this should not happen. |
Did a little digging, I realized there are two ways to ways to add courses that behave differently for me.
Can I check if 1 works as expected for you? |
70a679b
to
77f873d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
77f873d
to
4a8df41
Compare
…splays + to determine whether account can create course (TEAMMATES#11654) * Use course as the source of institute instead of account * Remove institute information from footer * Remove account institute information in admin account page * Display course institute information in admin account page * Display course institute in instructor/student course details page * Extend GetCourseAction to be accessible by unregistered users * Display course institute in session submission/results page * Remove institute from account entity * Check for institute validity when creating course * Remove account isInstructor information in admin account page * Remove function to downgrade instructor in admin accounts page * Remove isInstructor from account entity * Remove unused createAtTimestamp for account output
Fixes #11362
Fixes #11617
Description
institute
field fromAccount
toCourse
.institute
in account is the source of truth when determining the institute of a new course, removing the said field necessitates a new strategy to get theinstitute
field. However, by a stroke of luck, the identified new strategy happens to be the one that solves another issue.isInstructor
.Outline of Solution
GET /course
API needs to be opened to unregistered users (with key access), which is not an issue as there is no sensitive information that necessitates logging in.account.isInstructor
field is only used in the previous operation and for checking whether a user should be allowed access to instructor pages (in the front-end).account.isInstructor
has no more use and the field is removed. As a result, there is no more distinction between "instructor account" and "student account", and "downgrading an account" stops making sense.Screenshots