Skip to content
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

Change subject of student_starts_course email to be correct regardless of the student's access date #7661

Merged
merged 3 commits into from
Aug 7, 2024

Conversation

Imran92
Copy link
Contributor

@Imran92 Imran92 commented Aug 6, 2024

Proposed Changes

  • When a student enrolls in a Course, we send an email to the teacher. The subject of that email was "X started Y". It bears the correct meaning when the student's access starts immediately. But the student's access is supposed to begin at a future date (Either by using Course Access date or by Group Cohort functionality), sending an Email to the teacher by saying "started" is not correct, because even though the student was "enrolled" in that course, they'll only be able to "start" the course later. So to make the title accurate in both present and future, we're changing it to "X enrolled in Y" here.

Testing Instructions

  1. Go to Sensei LMS -> Tools -> Click on "Run Action" of the "Recreate Emails" tool
  2. Go to Sensei LMS -> Settings -> Emails (tab) -> Teacher Emails (tab)
  3. Make sure the Course Started email has the subject [student:displayname] enrolled in [course:name]
  4. Now take a course as a student
  5. As a teacher, make sure you received the enrol email with the updated subject

Pre-Merge Checklist

  • PR title and description contain sufficient detail and accurately describe the changes
  • Acceptance criteria is met
  • Decisions are publicly documented
  • Adheres to coding standards (PHP, JavaScript, CSS, HTML)
  • All strings are translatable (without concatenation, handles plurals)
  • Follows our naming conventions (P6rkRX-4oA-p2)
  • Hooks (p6rkRX-1uS-p2) and functions are documented
  • New UIs are responsive and use a mobile-first approach
  • New UIs match the designs
  • Different user privileges (admin, teacher, subscriber) are tested as appropriate
  • Legacy courses (course without blocks) are tested
  • Code is tested on the minimum supported PHP and WordPress versions
  • User interface changes have been tested on the latest versions of Chrome, Firefox and Safari
  • "Needs Documentation" label is added if this change requires updates to documentation
  • Known issues are created as new GitHub issues

@Imran92 Imran92 added this to the 4.24.2 milestone Aug 6, 2024
@Imran92 Imran92 requested a review from a team August 6, 2024 20:41
@Imran92 Imran92 self-assigned this Aug 6, 2024
Copy link

github-actions bot commented Aug 6, 2024

Test the previous changes of this PR with WordPress Playground.

Copy link
Member

@merkushin merkushin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as described.

Left a question regarding the description for this email.

@@ -69,7 +69,7 @@ public function get_email_data(): array {
],
'student_starts_course' => [
'types' => [ 'teacher' ],
'subject' => __( '[student:displayname] started [course:name]', 'sensei-lms' ),
'subject' => __( '[student:displayname] enrolled in [course:name]', 'sensei-lms' ),
'description' => __( 'Course Started', 'sensei-lms' ),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about updating the description for this email?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Updated here 9336e3c

Copy link

github-actions bot commented Aug 7, 2024

Test the previous changes of this PR with WordPress Playground.

Copy link
Member

@m1r0 m1r0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Imran92 Imran92 merged commit a350062 into trunk Aug 7, 2024
23 checks passed
@Imran92 Imran92 deleted the fix/student-started-course-email-subject branch August 7, 2024 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants