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
@@ -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_group/comboboxsearch/group_selector
The group selector trigger element.
Context variables required for this template:
* label - The label text fot the group selector element.
* group - The value of the group selector element (id of the preselected group)
* selectedgroup - The text of the selected group option.
Example context (json):
{
"label": "Select separate groups",
"group": "21",
"selectedgroup": "Group 1"
}
}}
<span class="d-none" data-region="groupid" data-groupid="{{group}}"></span>
<div class="align-items-center d-flex">
<div class="d-block pr-3 text-truncate">
<span class="d-block small" aria-hidden="true">
{{label}}
</span>
<span class="p-0 font-weight-bold">
{{selectedgroup}}
</span>
</div>
</div>
@@ -0,0 +1,42 @@
{{!
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_group/comboboxsearch/resultitem
Template for the individual result item.
Context variables required for this template:
* id - Group system ID.
* name - Groups' name.
* groupimageurl - The link of the groups picture.
Example context (json):
{
"id": 2,
"name": "Foo bar",
"groupimageurl": "http://foo.bar/grade/report/grader/index.php?id=42&userid=2"
}
}}
{{<core/local/comboboxsearch/resultitem }}
{{$content}}
<div class="pr-2 pl-1 w-25">
<img class="rounded-circle mx-auto img-fluid" src="{{groupimageurl}}" alt=""/>
</div>
<div class="pr-3 w-75">
<span class="d-block w-100 p-0 text-truncate">
{{name}}
</span>
</div>
{{/content}}
{{/core/local/comboboxsearch/resultitem}}
@@ -0,0 +1,51 @@
{{!
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_group/comboboxsearch/resultset
Wrapping template for returned result items.
Context variables required for this template:
* groups - Our returned groups to render.
* instance - The instance ID of the combo box.
* searchterm - The entered text to find these results.
* hasgroups - Allow the handling where no users exist for the returned search term.
Example context (json):
{
"groups": [
{
"id": 2,
"name": "Foo bar",
"link": "http://foo.bar/grade/report/grader/index.php?id=42&userid=2"
},
{
"id": 3,
"name": "Bar Foo",
"link": "http://foo.bar/grade/report/grader/index.php?id=42&userid=3"
}
],
"instance": 25,
"searchterm": "Foo",
"hasresults": true
}
}}
{{<core/local/comboboxsearch/resultset}}
{{$listid}}groups{{/listid}}
{{$results}}
{{#groups}}
{{>core_group/comboboxsearch/resultitem}}
{{/groups}}
{{/results}}
{{/core/local/comboboxsearch/resultset}}
@@ -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_group/comboboxsearch/searchbody
Wrapping template for search input.
Context variables required for this template:
* courseid - The id of the course to search within.
* groupid - The id of the group to search within.
* currentvalue - The prefill value for the search input if provided
Example context (json):
{
"courseid": 2,
"groupid": 25,
"currentvalue": "bar"
}
}}
<div class="flex-column h-100 w-100">
<span class="d-none" data-region="courseid" data-courseid="{{courseid}}"></span>
<span class="d-none" data-region="groupid" data-groupid="{{groupid}}"></span>
<span class="d-none" data-region="instance" data-instance="{{instance}}"></span>
{{< core/search_input_auto }}
{{$label}}{{#str}}
searchgroups, core
{{/str}}{{/label}}
{{$placeholder}}{{#str}}
searchgroups, core
{{/str}}{{/placeholder}}
{{$value}}{{currentvalue}}{{/value}}
{{$additionalattributes}}
role="combobox"
aria-expanded="true"
aria-controls="groups-{{instance}}-result-listbox"
aria-autocomplete="list"
data-input-element="input-{{uniqid}}-{{instance}}"
{{/additionalattributes}}
{{/ core/search_input_auto }}
<input type="hidden" name="search" id="input-{{uniqid}}-{{instance}}"/>
<div data-region="searchplaceholder"></div>
</div>
+53
View File
@@ -0,0 +1,53 @@
{{!
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_group/group_details
Template for the Groups page.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* name string Group Name
* pictureurl string Group image url
* description string Group description
* edit string edit link to edit the group
Example context (json):
{
"name": "Group Name",
"pictureurl": "https://raw.githubusercontent.com/moodle/moodle/master/pix/g/f1.png",
"description": "This is the description for Group Name",
"editurl": "http://www.moodle.org"
}
}}
{{#name}}
<div class="groupinfobox container-fluid card p-3">
{{#pictureurl}}
<div class="group-image"><img class="grouppicture" src="{{{pictureurl}}}" alt="{{{name}}}" title="{{{name}}}"/></div>
{{/pictureurl}}
{{#editurl}}
<div class="group-edit"><a href="{{editurl}}">{{#pix}}t/edit, core, {{#str}}editgroupprofile{{/str}}{{/pix}}</a></div>
{{/editurl}}
<h3 class="">{{{name}}}</h3>
<div class="group-description">{{{description}}}</div>
</div>
{{/name}}
+160
View File
@@ -0,0 +1,160 @@
{{!
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_group/index
Template for the Groups page.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* courseid int The course ID.
* selectedgroup string The initially selected group.
* editgroupsettingsdisabled bool Whether to disable the "Edit group settings" button on load.
* deletegroupdisabled bool Whether to disable the "Delete selected group" button on load.
* addmembersdisabled bool Whether to disable the "Add/remove users" button on load.
* groups array The list of groups.
* members array The list of members, grouped based on roles.
* undeletablegroups string A JSON string containing an array of group IDs that a user cannot delete.
* messagingsettingsvisible bool Wether the messaging settings buttons should be visible.
Example context (json):
{
"courseid": "1",
"selectedgroup": "Group 1 (3)",
"editgroupsettingsdisabled": false,
"deletegroupdisabled": false,
"addmembersdisabled": false,
"messagingenabled": true,
"groups": [
{
"value": "1",
"text": "Group 1 (3)",
"selected": true
},
{
"value": "2",
"text": "Group 2 (2)"
}
],
"members": [
{
"role": "Student",
"rolemembers": [
{
"value": "1",
"text": "John Doe"
},
{
"value": "2",
"text": "Jane Doe"
},
{
"value": "3",
"text": "John Smith"
}
]
}
],
"undeletablegroups": "[1: true, 3: true]"
}
}}
<form id="groupeditform" action="index.php" method="post">
<div class="container-fluid groupmanagementtable">
<div class="row rtl-compatible">
<div class="col-md-6 mb-1">
<input type="hidden" name="id" value="{{courseid}}">
<div class="mb-3">
<label for="groups">
<span id="groupslabel">{{#str}}groups{{/str}}</span>
<span id="thegrouping">&nbsp;</span>
</label>
<select name="groups[]" multiple="multiple" id="groups" size="15" class="form-control input-block-level">
{{#groups}}
<option value="{{value}}" {{#selected}}selected="selected"{{/selected}} title="{{{text}}}">{{{text}}}</option>
{{/groups}}
</select>
</div>
<h3> {{#str}} withselected, group {{/str}} </h3>
<div class="mb-3">
<button type="submit" name="action" id="updatemembers" value="updatemembers" class="btn btn-secondary">{{#str}}showmembersforgroup, group{{/str}}</button>
</div>
<div class="mb-3">
<button type="submit" name="action" id="showeditgroupsettingsform" value="showgroupsettingsform" {{#editgroupsettingsdisabled}}disabled="disabled"{{/editgroupsettingsdisabled}} class="btn btn-secondary">{{#str}}editgroupsettings, group{{/str}}</button>
</div>
<div class="mb-3">
<button type="submit" name="action" id="deletegroup" value="deletegroup" {{#deletegroupdisabled}}disabled="disabled"{{/deletegroupdisabled}} class="btn btn-secondary">{{#str}}deleteselectedgroup, group{{/str}}</button>
</div>
{{#messagingsettingsvisible}}
<div class="mb-3">
<button type="submit" name="action" id="disablemessaging" value="disablemessaging" class="btn btn-secondary" disabled="disabled">{{#str}}disablemessagingaction, group{{/str}}</button>
</div>
<div class="mb-3">
<button type="submit" name="action" id="enablemessaging" value="enablemessaging" class="btn btn-secondary" disabled="disabled">{{#str}}enablemessagingaction, group{{/str}}</button>
</div>
{{/messagingsettingsvisible}}
<h3> {{#str}} manageactions, group {{/str}} </h3>
<div class="mb-3">
<button type="submit" name="action" id="showcreateorphangroupform" value="showcreateorphangroupform" class="btn btn-secondary">{{#str}}creategroup, group{{/str}}</button>
</div>
<div class="mb-3">
<button type="submit" name="action" id="showautocreategroupsform" value="showautocreategroupsform" class="btn btn-secondary">{{#str}}autocreategroups, group{{/str}}</button>
</div>
<div class="mb-3">
<button type="submit" name="action" id="showimportgroups" value="showimportgroups" class="btn btn-secondary">{{#str}}importgroups, group{{/str}}</button>
</div>
</div>
<div class="col-md-6 mb-1">
<div class="mb-3">
<label for="members">
<span id="memberslabel">{{#str}}membersofselectedgroup, group{{/str}}</span>
<span id="thegroup">{{{selectedgroup}}}</span>
</label>
<select size="15" multiple="multiple" class="form-control input-block-level" id="members" name="user">
{{#members}}
<optgroup label="{{role}}">
{{#rolemembers}}
<option value="{{value}}" title="{{text}}">{{{text}}}</option>
{{/rolemembers}}
</optgroup>
{{/members}}
</select>
</div>
<div class="mb-3">
<button type="submit" value="showaddmembersform" class="btn btn-secondary" {{#addmembersdisabled}}disabled="disabled"{{/addmembersdisabled}} name="action" id="showaddmembersform">{{#str}}adduserstogroup, group{{/str}}</button>
</div>
</div>
</div>
</div>
</form>
{{#js}}
require(['jquery', 'core/yui'], function($) {
$("#groups").change(function() {
M.core_group.membersCombo.refreshMembers();
});
M.core_group.init_index(Y, "{{wwwroot}}", {{courseid}});
var undeletableGroups = JSON.parse('{{{undeletablegroups}}}');
M.core_group.groupslist(Y, undeletableGroups);
});
{{/js}}
{{#js}}
require(['core_group/index'], (module) => module.init());
{{/js}}