forked from TEAMMATES/teammates
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TEAMMATES#11450] 'Session opening soon' alerts to instructors: Also …
…give the join link if applicable (TEAMMATES#11453) * Add join course details during notification for course opening * Update unit tests for feedback session reminder email * Add documentation for helper functions * Update template for join course before edit details * Undo unnecessary lints * Make html indentation 2 space and edit comments * Update functions from merge * Use instructor.getRegistrationUrl() Co-authored-by: Ahmed Bahajjaj <[email protected]>
- Loading branch information
1 parent
edc10ac
commit a69b068
Showing
8 changed files
with
178 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<p> | ||
<ul> | ||
<li> | ||
<strong>To edit details of this session,</strong> please visit <a href="${sessionEditUrl}">${sessionEditUrl}</a> | ||
</li> | ||
<li> | ||
No other action is needed if you deem the session details to be correct. | ||
</li> | ||
</ul> | ||
</p> |
19 changes: 19 additions & 0 deletions
19
src/main/resources/ownerEmailFragment-joinCourseBeforeEditDetails.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<p> | ||
<strong>To "join" the course, please go to this Web address: </strong> | ||
<a href="${joinUrl}">${joinUrl}</a> | ||
</p> | ||
<p> | ||
After joining the course, you can edit details of the above session at <a href="${sessionEditUrl}">${sessionEditUrl}</a>. | ||
<ul> | ||
<li> | ||
If prompted to log in when joining the course, use your Google account to log in. | ||
If you do not have a Google account, please create one from the <a href="https://accounts.google.com/NewAccount">Google Accounts page</a>. | ||
</li> | ||
<li> | ||
The above link to join the course is unique to you. Please do not share it with others. | ||
</li> | ||
<li> | ||
No other action is needed if you deem the session details to be correct. | ||
</li> | ||
</ul> | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -216,14 +216,23 @@ public void testGenerateFeedbackSessionEmails() throws Exception { | |
subject = String.format(EmailType.FEEDBACK_OPENING_SOON.getSubject(), course.getName(), | ||
session.getFeedbackSessionName()); | ||
|
||
// this instructor email has been given co-owner privileges in the test file | ||
InstructorAttributes coOwner1 = | ||
// this instructor email has been given co-owner privileges in the test file but has not joined | ||
InstructorAttributes coOwnerNotJoined = | ||
instructorsLogic.getInstructorForEmail(course.getId(), "[email protected]"); | ||
|
||
assertTrue(coOwner1.hasCoownerPrivileges()); | ||
assertTrue(coOwnerNotJoined.hasCoownerPrivileges()); | ||
|
||
verifyEmailReceivedCorrectly(emails, coOwner1.getEmail(), subject, | ||
"/sessionOpeningSoonEmailForCoOwner.html"); | ||
verifyEmailReceivedCorrectly(emails, coOwnerNotJoined.getEmail(), subject, | ||
"/sessionOpeningSoonEmailForCoOwnerNotJoined.html"); | ||
|
||
// this instructor email has been given co-owner privileges in the test file and has joined | ||
InstructorAttributes coOwnerJoined = | ||
instructorsLogic.getInstructorForEmail(course.getId(), "[email protected]"); | ||
|
||
assertTrue(coOwnerJoined.hasCoownerPrivileges()); | ||
|
||
verifyEmailReceivedCorrectly(emails, coOwnerJoined.getEmail(), subject, | ||
"/sessionOpeningSoonEmailForCoOwnerJoined.html"); | ||
|
||
______TS("feedback session published alerts"); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
89 changes: 89 additions & 0 deletions
89
src/test/resources/emails/sessionOpeningSoonEmailForCoOwnerNotJoined.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
<p>Hello Instructor Not Yet Joined Course 1,</p> | ||
|
||
|
||
|
||
<p> | ||
Heads up! The following feedback session is due to open soon. | ||
<div> | ||
<table style="max-width:600px;border:1px solid black;"> | ||
<tr> | ||
<td style="padding:5px;"> | ||
<strong> | ||
Course: | ||
</strong> | ||
</td> | ||
<td style="padding:5px;"> | ||
[idOfTypicalCourse1] Typical Course 1 with 2 Evals | ||
</td> | ||
</tr> | ||
|
||
<tr> | ||
<td style="padding:5px;"> | ||
<strong> | ||
Feedback Session Name: | ||
</strong> | ||
</td> | ||
<td style="padding:5px;"> | ||
First feedback session | ||
</td> | ||
</tr> | ||
|
||
<tr> | ||
<td style="padding:5px;"> | ||
<strong> | ||
Session Start Time: | ||
</strong> | ||
</td> | ||
<td style="padding:5px;"> | ||
Sun, 01 Apr 2012, 11:59 PM SAST | ||
</td> | ||
</tr> | ||
|
||
<tr> | ||
<td style="padding:5px;"> | ||
<strong> | ||
Deadline: | ||
</strong> | ||
</td> | ||
<td style="padding:5px;"> | ||
Fri, 30 Apr 2027, 11:59 PM SAST | ||
</td> | ||
</tr> | ||
|
||
<tr> | ||
<td style="padding:5px;vertical-align:top"> | ||
<strong> | ||
Session Instructions: | ||
</strong> | ||
</td> | ||
<td style="padding:5px;"> | ||
Please please fill in the following questions. | ||
</td> | ||
</tr> | ||
</table> | ||
</div> | ||
|
||
<p> | ||
<strong>To "join" the course, please go to this Web address: </strong> | ||
<a href="http://localhost:4200/web/join?key=${regkey.enc}&entitytype=instructor">http://localhost:4200/web/join?key=${regkey.enc}&entitytype=instructor</a> | ||
</p> | ||
<p> | ||
After joining the course, you can edit details of the above session at <a href="http://localhost:4200/web/instructor/sessions/edit?courseid=idOfTypicalCourse1&fsname=First%20feedback%20session">http://localhost:4200/web/instructor/sessions/edit?courseid=idOfTypicalCourse1&fsname=First%20feedback%20session</a>. | ||
<ul> | ||
<li> | ||
If prompted to log in when joining the course, use your Google account to log in. | ||
If you do not have a Google account, please create one from the <a href="https://accounts.google.com/NewAccount">Google Accounts page</a>. | ||
</li> | ||
<li> | ||
The above link to join the course is unique to you. Please do not share it with others. | ||
</li> | ||
<li> | ||
No other action is needed if you deem the session details to be correct. | ||
</li> | ||
</ul> | ||
</p> | ||
|
||
<p> | ||
Regards, | ||
<br>TEAMMATES Team. | ||
</p> |