first commit

This commit is contained in:
CHIEFSOFT\ameye
2024-09-30 18:11:26 -04:00
commit e592ca6823
27270 changed files with 5002257 additions and 0 deletions
+55
View File
@@ -0,0 +1,55 @@
{{!
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 core_user/add_bulk_note
Template for the add bulk note modal.
Context variables required for this template:
* stateNames array - List of value / label pairs of valid publish states for notes.
* stateHelpIcon string - Rendered help icon for the publish state.
Example context (json):
{
"stateNames": [ { "value": 0, "label": "State 1"}, { "value": 1, "label": "State 2"} ],
"stateHelpIcon": "(help me)"
}
}}
<form>
<p>
<label for="bulk-state" class="mr-2">
{{#str}}publishstate, core_notes{{/str}}
</label>
<select name="state" id="bulk-state" class="custom-select">
{{#stateNames}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{label}}</option>
{{/stateNames}}
</select>
{{{stateHelpIcon}}}
</p>
<p>
<label for="bulk-note">
<span class="sr-only">{{#str}}note, core_notes{{/str}}</span>
</label>
<textarea id="bulk-note" rows="3" data-max-rows="10" data-auto-rows="true" cols="30" class="form-control"></textarea>
</p>
</form>
{{#js}}
require(['core/auto_rows'], function(AutoRows) {
AutoRows.init(document.getElementById('bulk-note'));
});
{{/js}}
@@ -0,0 +1,57 @@
{{!
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 core_user/comboboxsearch/resultitem
Template for the individual result item.
Context variables required for this template:
* id - User system ID.
* fullname - Users' full name.
* profileimageurl - Link for the users' large profile image.
* matchingField - The field in the user object that matched the search criteria.
* matchingFieldName - The name of the field that was matched upon for A11y purposes.
Example context (json):
{
"id": 2,
"fullname": "Foo bar",
"profileimageurl": "http://foo.bar/pluginfile.php/79/user/icon/boost/f1?rev=7630",
"matchingField": "<span class=\"font-weight-bold\">Foo</span> bar",
"matchingFieldName": "Fullname"
}
}}
{{<core/local/comboboxsearch/resultitem }}
{{$arialabel}}{{fullname}}{{/arialabel}}
{{$shorttext}}{{fullname}}{{/shorttext}}
{{$content}}
<span class="d-block px-2 w-25">
{{#profileimageurl}}
<img class="userpicture w-100 mx-auto d-block" src="{{profileimageurl}}" alt=""/>
{{/profileimageurl}}
{{^profileimageurl}}
<span class="userinitials"></span>
{{/profileimageurl}}
</span>
<span class="d-block pr-3 w-75">
<span class="d-block w-100 p-0 text-truncate font-weight-bold">
{{fullname}}
</span>
<span class="d-block w-100 pull-left text-truncate small" aria-hidden="true">
{{{matchingField}}}
</span>
<span class="sr-only" aria-label="{{#str}}usermatchedon, core{{/str}}">{{matchingFieldName}}</span>
</span>
{{/content}}
{{/core/local/comboboxsearch/resultitem}}
@@ -0,0 +1,75 @@
{{!
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 core_user/comboboxsearch/resultset
Wrapping template for returned result items.
Context variables required for this template:
* instance - The instance ID of the combo box.
* users - Our returned users to render.
* found - Count of the found users.
* total - Total count of users within this report.
* selectall - Whether to show the select all option.
* searchterm - The entered text to find these results.
* hasusers - Allow the handling where no users exist for the returned search term.
Example context (json):
{
"instance": 25,
"users": [
{
"id": 2,
"fullname": "Foo bar",
"profileimageurl": "http://foo.bar/pluginfile.php/79/user/icon/boost/f1?rev=7630",
"matchingField": "<span class=\"font-weight-bold\">Foo</span> bar",
"matchingFieldName": "Fullname"
},
{
"id": 3,
"fullname": "Bar Foo",
"profileimageurl": "http://foo.bar/pluginfile.php/80/user/icon/boost/f1?rev=7631",
"matchingField": "Bar <span class=\"font-weight-bold\">Foo</span>",
"matchingFieldName": "Fullname"
}
],
"matches": 20,
"selectall": true,
"searchterm": "Foo",
"hasresults": true
}
}}
{{<core/local/comboboxsearch/resultset}}
{{$listid}}user{{/listid}}
{{$results}}
{{#users}}
{{>core_user/comboboxsearch/resultitem}}
{{/users}}
{{/results}}
{{$selectall}}
{{#selectall}}
<li
id="result-row-{{instance}}-0"
class="w-100 p-1 border-top bottom-0 position-sticky dropdown-item d-flex small p-3"
role="option"
{{! The data-short-text attribute is provided so that aria.js would use it rather than the whole content. }}
data-short-text="{{searchterm}}"
data-value="0"
>
{{#str}}viewallresults, core, {{matches}}{{/str}}
</li>
{{/selectall}}
{{/selectall}}
{{$listclasses}}mh-100{{/listclasses}}
{{/core/local/comboboxsearch/resultset}}
@@ -0,0 +1,61 @@
{{!
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 core_user/comboboxsearch/user_selector
The user selector trigger element.
Context variables required for this template:
* name - The name of the input element representing the user search combobox.
* value - The value of the input element representing the user search combobox.
* currentvalue - If the user has already searched, set the value to that.
* courseid - The course ID.
* group - The group ID.
* resetlink - The link to reset the page.
Example context (json):
{
"name": "input-1",
"value": "0",
"currentvalue": "bar",
"courseid": 2,
"group": 25,
"resetlink": "grade/report/grader/index.php?id=2"
}
}}
<span class="d-none" data-region="courseid" data-courseid="{{courseid}}"></span>
<span class="d-none" data-region="groupid" data-groupid="{{group}}"></span>
<span class="d-none" data-region="instance" data-instance="{{instance}}"></span>
{{< core/search_input_auto }}
{{$label}}{{#str}}searchusers, core{{/str}}{{/label}}
{{$placeholder}}{{#str}}searchusers, core{{/str}}{{/placeholder}}
{{$value}}{{currentvalue}}{{/value}}
{{$additionalattributes}}
role="combobox"
aria-expanded="false"
aria-controls="user-{{instance}}-result-listbox"
aria-autocomplete="list"
aria-haspopup="listbox"
data-input-element="user-input-{{uniqid}}-{{instance}}"
{{/additionalattributes}}
{{/ core/search_input_auto }}
{{#currentvalue}}
<a class="ml-2 btn btn-link border-0 align-self-center" href="{{resetlink}}" data-action="resetpage" role="link" aria-label="{{#str}}clearsearch, core{{/str}}">
{{#str}}clear{{/str}}
</a>
{{/currentvalue}}
<input type="hidden" name="{{name}}" value="{{value}}" id="user-input-{{uniqid}}-{{instance}}"/>
@@ -0,0 +1,102 @@
{{!
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 core_user/contact_site_support_email_body
Support email email body.
Example context (json):
{
"subject": "email subject",
"notloggedinuser": true,
"name": "Sender name",
"email": "sender@mail.com",
"description": "Support request message"
}
}}
<head>
<style>
.table {
font-size: 18px;
margin-bottom: 20px;
width: 40%;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
.alert {
position: relative;
padding: 0.75rem 1.25rem;
margin-bottom: 1rem;
border: 0 solid transparent;
border-radius: 0.5rem;
}
.alert-warning {
color: #7d5a29;
background-color: #fcefdc;
border-color: #fbe8cd;
}
.subject {
background-color: #f8f9fa;
}
</style>
</head>
<body>
<table class="table">
<tr>
<td class="subject"><br /><b>{{#str}}subject{{/str}}:</b> {{subject}}<br /><br /></td>
</tr>
<tr>
<td>
<table style="width: 100%;">
<thead>
<tr>
{{#notloggedinuser}}
<td class="alert alert-warning" colspan="2">
{{#str}}supportmessagesentforloggedoutuser, user{{/str}}
</td>
{{/notloggedinuser}}
</tr>
</thead>
<tbody>
<tr>
<td colspan="2"><br /></td>
</tr>
<tr>
<td>&nbsp;<b>{{#str}}name{{/str}}</b></td>
<td>{{name}}</td>
</tr>
<tr>
<td colspan="2"><hr></td>
</tr>
<tr style="border-top: 10px" >
<td >&nbsp;<b>{{#str}}email{{/str}}</b></td>
<td>{{email}}</td>
</tr>
<tr>
<td colspan="2"><hr></td>
</tr>
<tr>
<td>&nbsp;<b>{{#str}}description{{/str}}</b></td>
<td>{{message}}</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
</body>
@@ -0,0 +1,45 @@
{{!
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 core_user/contact_site_support_not_available
Content displayed on the contact site support page if attempting to submit the support form fails.
Example context (json):
{
"supportemail": "<a href=\"mailto:support@mail.com\">support@mail.com</a>",
"supportform": "<input type='text' value='test'>"
}
}}
<div class="card">
<div class="card-body bg-light d-flex flex-row">
<div class="p-3 mr-3 align-self-center supporticon">{{#pix}}t/life-ring, core{{/pix}}</div>
<div class = "p-1 align-self-center text-muted">
<div class="h4 font-weight-normal mb-0">{{#str}}supportmessagenotsent, user{{/str}}</div>
{{#supportemail}}
<div class="py-3 mt-2">
<span class="h5 font-weight-normal w-75 rounded border p-3">
{{#str}}supportmessagealternative, user, {{{supportemail}}}{{/str}}
</span>
</div>
{{/supportemail}}
</div>
</div>
</div>
<div class="py-1 pt-3">
{{{supportform}}}
</div>
+141
View File
@@ -0,0 +1,141 @@
{{!
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 core_user/edit_profile_fields
UI for editing profile fields
Example context (json):
{
"baseurl": "index.php",
"sesskey": "12345",
"categories": [
{
"id": 1,
"name": "Cat1",
"fields": [
{"id": 1, "name": "Field1", "isfirst": true, "islast": false},
{"id": 2, "name": "Field2", "isfirst": false, "islast": false},
{"id": 3, "name": "Field3", "isfirst": false, "islast": true}
],
"hasfields": true,
"isfirst": true,
"candelete": true
},
{
"id": 2,
"name": "Cat2",
"candelete": true
},
{
"id": 3,
"name": "Cat3",
"islast": true,
"candelete": true
}
]
}
}}
<div class="row profileeditor">
<div class="col align-self-end">
<a tabindex="0" role="button" class="btn btn-secondary float-right" data-action="editcategory">{{#str}}profilecreatecategory, admin{{/str}}</a>
</div>
</div>
<div class="categorieslist">
{{#categories}}
<div data-category-id="{{id}}" id="category-{{id}}" class="mt-2">
<div class="row justify-content-between align-items-end">
<div class="col-6 categoryinstance">
<h3>
{{{name}}}
<a href="#" data-action="editcategory" data-id="{{id}}" data-name="{{name}}">
{{#pix}}t/edit, core, {{#str}}edit{{/str}}{{/pix}}</a>
{{#candelete}}
<a href="{{baseurl}}?action=deletecategory&id={{id}}&sesskey={{sesskey}}">
{{#pix}}t/delete, core, {{#str}}delete{{/str}}{{/pix}}</a>
{{/candelete}}
{{^isfirst}}
<a href="{{baseurl}}?id={{id}}&action=movecategory&dir=up&amp;sesskey={{sesskey}}">
{{#pix}}t/up, core, {{#str}}moveup{{/str}}{{/pix}}</a>
{{/isfirst}}
{{#isfirst}}{{#pix}}spacer, moodle{{/pix}}{{/isfirst}}
{{^islast}}
<a href="{{baseurl}}?id={{id}}&action=movecategory&dir=down&amp;sesskey={{sesskey}}">
{{#pix}}t/down, core, {{#str}}movedown{{/str}}{{/pix}}</a>
{{/islast}}
</h3>
</div>
<div class="col-auto text-right">
{{#addfieldmenu}}{{> core/action_menu}}{{/addfieldmenu}}
</div>
</div>
<table class="generaltable fullwidth profilefield">
{{#hasfields}}
<thead>
<tr>
<th scope="col" class="col-8">{{#str}}profilefield, admin{{/str}}</th>
<th scope="col" class="col-3 text-right">{{#str}}edit{{/str}}</th>
</tr>
</thead>
<tbody>
{{#fields}}
<tr>
<td class="col-8">
{{{name}}}
</td>
<td class="col-3 text-right">
<a href="#" data-action="editfield" data-id="{{id}}" data-name="{{name}}">
{{#pix}}t/edit, core, {{#str}}edit{{/str}}{{/pix}}</a>
<a href="{{baseurl}}?action=deletefield&id={{id}}&sesskey={{sesskey}}">
{{#pix}}t/delete, core, {{#str}}delete{{/str}}{{/pix}}</a>
{{^isfirst}}
<a href="{{baseurl}}?id={{id}}&action=movefield&dir=up&amp;sesskey={{sesskey}}">
{{#pix}}t/up, core, {{#str}}moveup{{/str}}{{/pix}}</a>
{{/isfirst}}
{{#isfirst}}{{#pix}}spacer, moodle{{/pix}}{{/isfirst}}
{{^islast}}
<a href="{{baseurl}}?id={{id}}&action=movefield&dir=down&amp;sesskey={{sesskey}}">
{{#pix}}t/down, core, {{#str}}movedown{{/str}}{{/pix}}</a>
{{/islast}}
{{#islast}}{{#pix}}spacer, moodle{{/pix}}{{/islast}}
</td>
</tr>
{{/fields}}
</tbody>
{{/hasfields}}
{{^hasfields}}
<thead>
<tr class="nofields alert alert-danger alert-block fade in">
<td>
{{#str}}profilenofieldsdefined, admin{{/str}}
</td>
</tr>
</thead>
{{/hasfields}}
</table>
</div>
{{/categories}}
</div>
{{#js}}
require(['core_user/edit_profile_fields'], function(s) {
s.init();
});
{{/js}}
@@ -0,0 +1,47 @@
{{!
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 core_user/form_user_selector_searchtype
Template for the form_user_selector search type.
Context variables required for this template:
* defaultvalue int - The user's full name.
* fields list - the input element attributes and label
Example context (json):
{
"fields": [
{
"id": "id",
"name": "userselector_searchexactmatchesonly",
"class": "class",
"label": "Search anywhere",
"checked": true
}
]
}
}}
<div class="form-check justify-content-start ml-1">
<span class="mr-1">{{#str}}userselectorsearchmatching, core{{/str}}</span>
{{#fields}}
<label for="{{id}}">
<input id="{{id}}" type="radio" value="{{value}}" name="{{name}}" class="{{class}}" {{#checked}}checked{{/checked}}>
{{label}}
</label>
{{/fields}}
</div>
@@ -0,0 +1,54 @@
{{!
This file is part of Moodle - https://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 core_user/form_user_selector_suggestion
Moodle template for the list of valid options in an user selector autocomplate form element.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* fullname - string Users full name
* extrafields - list
Example context (json):
{
"fullname": "Admin User",
"extrafields": [
{
"name": "email",
"value": "admin@example.com"
},
{
"name": "phone1",
"value": "0123456789"
}
]
}
}}
<span>
<span data-field="fullname">{{fullname}}</span>
<small>
{{#extrafields}}
<span data-field="{{name}}">{{{value}}}</span>
{{/extrafields}}
</small>
</span>
@@ -0,0 +1,48 @@
{{!
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 core_user/participantsfilter
Template for the form containing one or more filter rows.
Example context (json):
{
"filtertypes": [
{
"name": "status",
"title": "Status",
"values": [
{
"value": 1,
"title": "Active"
},
{
"value": 0,
"title": "Suspended"
}
]
}
]
}
}}
{{> core/datafilter/filter }}
{{#js}}
require(['core_user/participants_filter'], function(ParticipantsFilter) {
ParticipantsFilter.init('core-filter-{{uniqid}}');
});
{{/js}}
+44
View File
@@ -0,0 +1,44 @@
{{!
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 core_user/send_bulk_message
Template for the send bulk message modal.
Context variables required for this template:
None
Example context (json):
{
}
}}
<form>
<p>
<label for="bulk-message">
<span class="sr-only">{{#str}}message, core_message{{/str}}</span>
</label>
<textarea id="bulk-message" rows="3" data-max-rows="10" data-auto-rows="true" cols="30" class="form-control"></textarea>
</p>
<div class="text-danger" data-role="messagetextrequired" hidden>
{{#str}} messagetextrequired, core_message {{/str}}
</div>
</form>
{{#js}}
require(['core/auto_rows'], function(AutoRows) {
AutoRows.init(document.getElementById('bulk-message'));
});
{{/js}}
+109
View File
@@ -0,0 +1,109 @@
{{!
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 core_user/status_details
Template for the user enrolment status details.
Context variables required for this template:
* fullname string - The user's full name.
* coursename string - The course name.
* enrolinstancename string - The enrolment instance name.
* status string - The enrolment status.
* statusclass string - The CSS class for the enrolment status.
* timestart string - Optional. The enrolment time start.
* timeend string - Optional. The enrolment time end.
* timeenrolled string - Optional. The time when the user was enrolled.
Example context (json):
{
"fullname": "Student John",
"coursename": "TC 1",
"enrolinstancename": "Manual enrolment",
"status": "Active",
"statusclass": "badge bg-success text-white",
"timestart": "1 January 2017",
"timeend": "31 January 2018",
"timeenrolled": "31 December 2016"
}
}}
<table class="table user-enrol-details">
<tr>
<th>
{{#str}}fullname{{/str}}
</th>
<td class="user-fullname">
{{fullname}}
</td>
</tr>
<tr>
<th>
{{#str}}course{{/str}}
</th>
<td class="user-course">
{{coursename}}
</td>
</tr>
<tr>
<th>
{{#str}}enrolmentmethod, enrol{{/str}}
</th>
<td class="user-enrol-instance">
{{enrolinstancename}} {{{editenrollink}}}
</td>
</tr>
<tr>
<th>
{{#str}}participationstatus, enrol{{/str}}
</th>
<td class="user-enrol-status">
<span class="{{statusclass}}">
{{status}}
</span>
</td>
</tr>
{{#timestart}}
<tr>
<th>
{{#str}}enroltimestart, enrol{{/str}}
</th>
<td class="user-enrol-timestart">
{{timestart}}
</td>
</tr>
{{/timestart}}
{{#timeend}}
<tr>
<th>
{{#str}}enroltimeend, enrol{{/str}}
</th>
<td class="user-enrol-timeend">
{{timeend}}
</td>
</tr>
{{/timeend}}
{{#timeenrolled}}
<tr>
<th>
{{#str}}enroltimecreated, enrol{{/str}}
</th>
<td class="user-enrol-timeenrolled">
{{timeenrolled}}
</td>
</tr>
{{/timeenrolled}}
</table>
+73
View File
@@ -0,0 +1,73 @@
{{!
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 core_user/status_field
Template for the enrolment status field.
Context variables required for this template:
* fullname string - The user's full name.
* coursename string - The course name.
* enrolinstancename string - The enrolment instance name.
* status string - The enrolment status.
* active boolean - Flag to indicate whether the user has an active enrolment.
* suspended boolean - Flag to indicate whether the user is suspended.
* notcurrent boolean - Flag to indicate whether the user's enrolment is active, but not current.
* timestart string - Optional. The enrolment time start.
* timeend string - Optional. The enrolment time end.
* timeenrolled string - Optional. The time when the user was enrolled.
* enrolactions array - Optional. Array of enrol actions consisting of:
* url string - The URL of the enrol action link.
* attributes array - The array of attributes for the enrol action link.
* icon string - The HTML output for the enrol action icon.
Example context (json):
{
"fullname": "Student John",
"coursename": "TC 1",
"enrolinstancename": "Manual enrolment",
"status": "Active",
"active": true,
"timestart": "1 January 2017",
"timeend": "31 January 2018",
"timeenrolled": "31 December 2016",
"enrolactions": [
{
"url": "#",
"attributes": [
{
"name": "class",
"value": "action-class"
}
],
"icon": "<i class=\"icon fa fa-cog fa-fw\" aria-hidden=\"true\" title=\"Edit enrolment\" aria-label=\"\"></i>"
}
]
}
}}
<div data-fullname="{{fullname}}" data-coursename="{{coursename}}" data-enrolinstancename="{{enrolinstancename}}"
data-status="{{status}}" data-timestart="{{timestart}}" data-timeend="{{timeend}}" data-timeenrolled="{{timeenrolled}}">
<span class="badge {{#active}}bg-success text-white{{/active}}{{#suspended}}bg-warning text-dark{{/suspended}}{{#notcurrent}}bg-secondary text-dark{{/notcurrent}}">{{status}}</span>
<a data-action="showdetails" href="#" role="button" tabindex="0">{{!
}}{{#pix}}docs, core, {{enrolinstancename}}{{/pix}}{{!
}}</a>
{{#enrolactions}}
<a href="{{url}}" role="button" {{#attributes}}{{name}}="{{value}}" {{/attributes}}>{{!
}}{{{icon}}}{{!
}}</a>
{{/enrolactions}}
</div>
@@ -0,0 +1,97 @@
{{!
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 core_user/upcoming_activities_due_insight_body
Template for the upcoming activity due insight
Context variables required for this template:
* activitiesdue array - Data for each activity due.
* userfirstname string - The user firstname.
Example context (json):
{
"userfirstname": "John",
"activitiesdue": [
{
"name": "Introduction to ASP is due",
"formattedtime": "31 January 2018",
"coursename": "Programming I",
"url": "https://www.google.com"
}
]
}
}}
{{! The styles defined here will be included in the Moodle web UI and in emails. Emails do not include Moodle
stylesheets so we want these styles to be applied to emails. However, they will also be included in the Moodle web UI.
The styles defined in the class .table have precedence over general styles at tag level, so these styles are only
applied to emails.}}
<head><style>
table {
text-align: justify;
margin-bottom: 1rem;
margin-top: 1rem;
}
table tr.when {
background-color: #e9ecef;
}
table th {
padding: 1rem .75rem 1rem .75rem;
font-weight: 400;
font-size: larger;
border-top: 1px solid #dee2e6;
}
table td {
padding: .75rem;
}
table td.link {
border-top: 1px solid #dee2e6;
border-bottom: 1px solid #dee2e6;
}
</style></head>
<div>
{{#str}} youhaveupcomingactivitiesdueinfo, moodle, {{userfirstname}} {{/str}}
<br/><br/>
{{#activitiesdue}}
<table class="table upcoming-activity-due">
<thead>
<tr>
<th scope="col" class="h5">
{{#icon}}
{{#pix}} {{key}}, {{component}}, {{title}} {{alttext}} {{/pix}}
{{/icon}}
{{name}}
</th>
</tr>
</thead>
<tbody>
<tr class="when">
<td><strong>{{#str}} whendate, calendar, {{formattedtime}} {{/str}}</strong></td>
</tr>
<tr>
<td>{{#str}} coursetitle, moodle, {"course": "{{coursename}}" } {{/str}}</td>
</tr>
<tr>
<td class="link"><a href="{{url}}">{{#str}} gotoactivity, calendar{{/str}}</a></td>
</tr>
</tbody>
</table>
{{/activitiesdue}}
</div>