feat(course): auto-enrol button for paid course join requests (#769)
* feat(course): add auto-enrol flow for paid course join requests - Extend teacher buy-request email with manual access steps and an Auto Enrol this Student button - Link teachers to the course People page with grantAccess query param - Add grant-access modal that sends the same org audience invite used by the Invite new students flow Co-authored-by: Rotimi Best <[email protected]> * fix(i18n): translate grant access modal strings Replace English placeholders copied into non-en locale files with proper translations for each supported language. Co-authored-by: Rotimi Best <[email protected]> * fix(email): shorten auto-enrol button label per review Co-authored-by: Rotimi Best <[email protected]> * fix(email): use American spelling Enroll in auto-enroll CTA Co-authored-by: Rotimi Best <[email protected]> * fix(i18n): localize Danish grant-access send invite label Co-authored-by: Rotimi Best <[email protected]> --------- Co-authored-by: Rotimi Best <[email protected]>
This commit is contained in:
co-authored by
Rotimi Best
parent
634ffeab0f
commit
6c3a982daf
@@ -11,6 +11,8 @@ export const teacherStudentBuyRequestEmail = defineEmail({
|
||||
courseName: z.string().min(1),
|
||||
studentEmail: z.string().email(),
|
||||
studentFullname: z.string().min(1),
|
||||
courseUrl: z.url(),
|
||||
autoEnrollUrl: z.url(),
|
||||
branding: ZEmailBranding
|
||||
}),
|
||||
render: (fields) => {
|
||||
@@ -22,6 +24,19 @@ export const teacherStudentBuyRequestEmail = defineEmail({
|
||||
Name: ${fields.studentFullname}<br />
|
||||
Email: ${fields.studentEmail}
|
||||
</p>
|
||||
<p style="font-weight: bold; margin-top: 24px;">How to give this student access</p>
|
||||
<ol style="padding-left: 20px; line-height: 1.6;">
|
||||
<li>Open the course: <a href="${fields.courseUrl}">${fields.courseUrl}</a></li>
|
||||
<li>Click <strong>People</strong> on the sidebar</li>
|
||||
<li>Click <strong>Add</strong></li>
|
||||
<li>Under <strong>Invite new students</strong>, enter <strong>${fields.studentEmail}</strong></li>
|
||||
<li>Click <strong>Invite Students</strong></li>
|
||||
</ol>
|
||||
<p style="font-weight: bold; margin-top: 24px;">Or automatically enroll them</p>
|
||||
<p>Use the button below to open the course and send this student an invite in one step.</p>
|
||||
<div>
|
||||
<a class="button" href="${fields.autoEnrollUrl}">Auto Enroll Student</a>
|
||||
</div>
|
||||
`;
|
||||
|
||||
return getDefaultTemplate(content, fields.branding);
|
||||
|
||||
Reference in New Issue
Block a user