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
[#9255] Migrate part of instructor feedback sessions page to Angular #9345
[#9255] Migrate part of instructor feedback sessions page to Angular #9345
Conversation
@xpdavid need to resolve the conflicts. |
delete copy action as it can be achieved by session/question GET/POST APIs
e04d6d4
to
03c0b88
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.
Mostly there. Also, it looks like the sort table function is buggy? When I tried, only one column (i.e. where I pressed the icon) gets sorted.
@@ -380,10 +432,32 @@ public void validate() { | |||
} | |||
|
|||
/** | |||
* The basic request body format for saving of feedback session. | |||
* The request body format for saving of feedback session. | |||
*/ | |||
public static class FeedbackSessionSaveRequest extends FeedbackSessionBasicRequest { |
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.
If by now this has not been implemented, what is the usage of this?
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.
It is used in SaveFeedbackSessionAction
. I just fix the typo I introduced in the previous PR :P
<div class="form-group"> | ||
<label><b>Name for copied session</b></label> | ||
<input type="text" class="form-control" [(ngModel)]="newFeedbackSessionName" maxlength="38"> | ||
<span>{{ 38 - newFeedbackSessionName.length }} characters left</span> |
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.
Magic number 38
?
case FeedbackSessionSubmissionStatus.OPEN: | ||
case FeedbackSessionSubmissionStatus.GRACE_PERIOD: | ||
case FeedbackSessionSubmissionStatus.CLOSED: | ||
msg += 'The feedback session has been created, is visible'; |
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.
Will this not cause duplicate The feedback session has been created
?
this.httpRequestService.post('/session/remind/submission', paramMap).subscribe(() => { | ||
this.statusMessageService.showSuccessMessage( | ||
'Reminder e-mails have been sent out to those students and instructors. ' | ||
+ 'Please allow up to 1 hour for all the notification emails to be sent out..'); |
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.
Duplicate .
at the end.
/** | ||
* Template sessions. | ||
*/ | ||
export const templateSessions: TemplateSession[] = [ |
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.
This should be a JSON file instead? This is a form of data, not application code.
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 need interface TemplateSession {}
defined somewhere. So I thought put them together would be more organised.
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.
More organized is one thing. The issue here is you're mixing up application code and application data (independent of logic).
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.
Ok. One problem of serialised it to JSON file is that we will loss reference to enum type (e.g. FeedbackVisibilityType.RECIPIENT
will become "RECIPIENT"
) Not sure whether it is a bit problem or not for project evolution.
Only one sorting criteria is applied each time (i.e. cannot sort by Course ID first and then Session Name). That is also the functionality in V6. |
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 for now. Another job well done! 💯
Part of #9255
Some components added are also shared by instructor home page also. I added them to the instructor home page.
@jacoblipech Less work for you.