Skip to content

Add a new UI for all emails#28

Open
TamaroWalter wants to merge 2 commits into
mainfrom
redesign/emails
Open

Add a new UI for all emails#28
TamaroWalter wants to merge 2 commits into
mainfrom
redesign/emails

Conversation

@TamaroWalter
Copy link
Copy Markdown
Member

@TamaroWalter TamaroWalter commented May 28, 2026

🔀 Purpose of this PR:

  • Fixes a bug
  • Updates for a new Moodle version
  • Adds a new feature of functionality
  • Improves or enhances existing features
  • Refactoring: restructures code for better performance or maintainability
  • Testing: add missing or improve existing tests
  • Miscellaneous: code cleaning (without functional changes), documentation, configuration, ...

📝 Description:

The emails were a mess, they were ugly and the creation used a lot of unreadable parameters ($params->a, $params->e). I redesigned the ui and process of sending a mail:

  • Add html and text/plain emails for all 4 emails (course request, request accepted, request denied, category relocation wish)
  • Use maizzle to create the html emails with a beautiful styling (screenshot can be seen at the end). The style for the html is based on the Learnweb colors to give a emails a more professional touch
  • Make the email creation more readable: first set up a minimal amount of parameters (only the user id for example) for the ad-hoc task (email get send by an ad-hoc task), and then the task gathers all important data like user or course name.
  • Delete the current unit tests. They only tested if the emails were send but that is logic that is not covered in the lsf_unification domain but in the moodle core. Our tests should cover our functions.

📋 Checklist

Please confirm the following (check all that apply):

  • Code passes the code checker without errors and warnings.
  • Code passes the moodle-ci/cd pipeline on all supported Moodle versions or the ones the plugin supports.
  • Code does not have var_dump() or var_export or any other debugging statements (or commented out code) that
    should not appear on the productive branch.
  • Code only uses language strings instead of hard-coded strings.

🧾📸🌐 Additional Information (like screenshots, documentation, links, etc.)

How the email looked before:
accepted_mail_before_html

How the mails look now:

Html text/plain
image image

The tests only tested if mails were send correctly. As this is rather a moodle core functionality and not a lsf_unification one,
this kind of tests gives no insight if the plugin is bug-free. New tests should be written in the future
@TamaroWalter TamaroWalter requested a review from dlmsr May 28, 2026 08:24
@TamaroWalter TamaroWalter self-assigned this May 28, 2026
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.

1 participant