{{!
    This file is part of Moodle - http://moodle.org/

    Moodle is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Moodle is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
}}
{{!
    @template mod_studentquiz/digest_email_notification

    Template for rendering digest_email_notification.

    Classes required for JS:
    * none

    Data attributes required for JS:
    * none

    Context variables required for this template:
    * recipientname
    * digesttype
    * modulename
    * activityurl
    * notifications - array of notifications
        * seq
        * timestamp
        * questionname
        * actiontype
        * actorname

    Example context (json):
    {
        "recipientname": "John Doe",
        "digesttype": "Weekly",
        "modulename": "StudentQuiz",
        "activityurl": "/to/some/where",
        "notifications": [
            {
                "seq": 1,
                "timestamp": "14 May 2021, 4:17 PM",
                "questionname": "How many decimals has Pi?",
                "actiontype": "approved",
                "actorname": "Nicole Brown",
                "isstudent": false
            }
        ]
    }
}}
<div>
    <p>{{# str }} emailautomationnote, studentquiz {{/ str }}</p><br>
    <p>{{# str }} emailsalutation, studentquiz, {{ recipientname }} {{/ str }}</p>
    <p>
        {{# str }} emaildigestbody, studentquiz, { "digesttype": {{# quote }} {{ digesttype }} {{/ quote }}, "modulename": {{# quote }} {{ modulename }}  {{/ quote }}} {{/ str }} <a href="{{ activityurl }}">{{ activityurl }}</a>
    </p>
    <div>=====================================================================</div>

    {{#notifications}}
        <div>
            <div>---------------------------------------------------------------------</div>
            <div>{{# str }} emaildigestbody_section_title, studentquiz, { "seq": {{# quote }} {{ seq }} {{/ quote }}, "timestamp": {{# quote }} {{ timestamp }}  {{/ quote }}} {{/ str }}</div>
            <div>---------------------------------------------------------------------</div>
            <div>
            {{#isstudent}}
                {{# str }} emaildigestbody_section_content, studentquiz, {
                "questionname": {{# quote }} {{ questionname }} {{/ quote }},
                "actiontype": {{# quote }} {{ actiontype }} {{/ quote }},
                "actorname": {{# quote }} {{ actorname }} {{/ quote }}
                } {{/ str }}

            {{/isstudent}}
            {{^isstudent}}
                {{# str }} emailnoityfyreviewablequestion_section_content, studentquiz, {
                    "questionname": {{# quote }} {{ questionname }} {{/ quote }},
                    "actorname": {{# quote }} {{ actorname }} {{/ quote }}
                } 
                {{/ str }}
            {{/isstudent}}
            </div>
        </div>
        <br>
    {{/notifications}}
</div>
