Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-27876

Improve the compatibility of templates loading in ETS

    XMLWordPrintable

    Details

    • Type: Feature Request
    • Status: Awaiting Review
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.2
    • Fix Version/s: None
    • Component/s: Email Template Service

      Description

      Currently, there are 4 tools use ETS to load templates. They are reset-pass, site-management, profile2 and polls.

      But, only polls and profile2 use the function processEmailTemplates defined in ETS.

      After a detailed investigation, polls and profile2 define single template per file, while site-management and reset-pass define multiple templates per file. And the function processEmailTemplates cannot handle multiple templates in one file.

      This patch give the function ability to handle multiple files in one file. It will first try to guess it's a multiple-template file, and then try the single one.

      Changes:
      1. To multiple-template, the root element is <emailTemplates> and for each template, <emailTemplate> is used. To single-template, the root element is <emailTemplate>

      2. To multiple-template, <key> can be defined under <emailTemplates> and if another <key> is defined in <emailTemplate> the template-specified key will override the root one.

      3. A new model EmailTemplates is added to handle the multiple-template file.

      4. If 'owner' is not defined in template, 'admin' is used by default.

      5. Some modification made in EmailTemplate model to handle both cases.

      I'll add the code to make reset-pas and site-management to use ETS method in some other tickets.

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  Unassigned Unassigned
                  Reporter:
                  gaojun Gao Jun
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                    Dates

                    Created:
                    Updated:

                      Git Integration