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,46 @@
{{!
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 tool_moodlenet/chooser_footer
Chooser favourite template partial.
Example context (json):
{
}
}}
{{#enabled}}
<div class="w-100 d-flex px-2">
<a aria-label="{{#str}}aria:footermessage, tool_moodlenet{{/str}}"
class="d-inline my-auto mr-1"
{{#advanced}}
href="{{advanced}}"
target="_self"
{{/advanced}}
{{^advanced}}
href="#"
data-action="show-moodlenet"
data-courseid="{{courseID}}"
data-sectionID="{{sectionID}}"
{{/advanced}}
>
{{#str}} footermessage , tool_moodlenet{{/str}}
<span class="moodlenet-logo" aria-hidden="true">{{#pix}} MoodleNet, tool_moodlenet {{/pix}}</span>
</a>
</div>
{{/enabled}}
@@ -0,0 +1,28 @@
{{!
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 tool_moodlenet/chooser_footer_close_mnet
Chooser favourite template partial.
Example context (json):
{
}
}}
<button data-action="close-chooser-option-summary" class="closeoptionsummary btn btn-secondary mr-auto" tabindex="0">
{{#str}} back {{/str}}
</button>
@@ -0,0 +1,67 @@
{{!
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 tool_moodlenet/chooser_moodlenet
Chooser favourite template partial.
Example context (json):
{
}
}}
<div class="optionsummary" tabindex="-1" data-region="chooser-option-summary-container">
<div class="content text-left mb-5 px-5 py-4" data-region="chooser-option-summary-content-container">
<div data-region="moodle-net">
<div class="overlay-icon-container z-index-1 d-none" data-region="spinner"></div>
<img class="w-25 mb-4" aria-hidden="true" src="{{{img}}}">
<p>{{#str}} instancedescription, tool_moodlenet {{/str}}</p>
<p class="w-75 mx-auto mb-1 mt-5">{{#str}} connectandbrowse, tool_moodlenet {{/str}}</p>
<a class="btn btn-secondary d-block w-75 mx-auto mb-4"
data-action="browse"
href="{{{generic}}}"
>
{{{buttonName}}}
</a>
<div id="mnet-instance-form-{{uniqid}}" data-region="mnet-form">
<input type="hidden" name="sesskey" value="{{sesskey}}">
<div class="w-75 mx-auto my-3">
<p class="text-left">{{#str}}inputhelp, tool_moodlenet{{/str}}</p>
<div class="input-group">
<input type="text"
class="form-control"
data-var="mnet-link"
data-courseid="{{courseID}}"
data-sectionid="{{sectionID}}"
placeholder="{{#str}} instanceplaceholder, tool_moodlenet {{/str}}"
aria-label="{{#str}} aria:enterprofile, tool_moodlenet {{/str}}"
autocomplete="off"
>
<div class="input-group-append z-index-0">
<button class="btn btn-secondary"
data-action="submit" id="button-addon2"
>
{{#str}} saveandgo, tool_moodlenet {{/str}}
</button>
</div>
</div>
<p class="text-left" aria-live="assertive" data-region="validation-area"></p>
<p class="text-left">{{#str}} forminfo, tool_moodlenet {{/str}}</p>
</div>
</div>
</div>
</div>
</div>
@@ -0,0 +1,76 @@
{{!
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 tool_moodlenet/import_confirmation
MoodleNet import confirmation template.
The purpose of this template is to present the user with a confirm/cancel dialog-like page.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* resourceurl The URL to the remote resource on MoodleNet.
* resourcename The name of the remote resource on MoodleNet.
* sesskey The CSRF token, as per sesskey()
Example context (json):
{
"course": 33,
"coursename": "Introduction to quantum physics",
"section": 0,
"resourceurl": "http://example.com/test.png",
"resourcename": "test.png",
"sesskey": "abc123"
}
}}
<div class="generalbox modal modal-dialog modal-in-page show">
<div class="box py-3 modal-content">
<form action="#" method="post">
{{#course}}
<input type="hidden" name="course" value="{{course}}">
{{/course}}
<input type="hidden" name="section" value="{{section}}">
<input type="hidden" name="resourceurl" value="{{resourceurl}}">
<input type="hidden" name="sesskey" value="{{sesskey}}">
<div class="box py-3 modal-header px-3">
<h4>{{#str}}confirm, core{{/str}}</h4>
</div>
<div class="box py-3 modal-body">
{{#course}}
{{#str}}importconfirm, tool_moodlenet, {"resourcename": {{#quote}}{{resourcename}}{{/quote}}, "resourcetype": {{#quote}}{{resourcetype}}{{/quote}}, "coursename": {{#quote}}{{coursename}}{{/quote}} }{{/str}}
{{/course}}
{{^course}}
{{#str}}importconfirmnocourse, tool_moodlenet, {"resourcename": {{#quote}}{{resourcename}}{{/quote}}, "resourcetype": {{#quote}}{{resourcetype}}{{/quote}} }{{/str}}
{{/course}}
</div>
<div class="box py-3 modal-footer">
<div class="buttons">
<input class="btn btn-secondary" type="submit" name="cancel" value="{{#str}}cancel, core{{/str}}">
<input class="btn btn-primary" type="submit" name="continue" value="{{#str}}confirm, core{{/str}}">
</div>
</div>
</form>
</div>
</div>
@@ -0,0 +1,80 @@
{{!
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 tool_moodlenet/import_options_select
MoodleNet import options template.
The purpose of this template is to render an list of import options as radio-button-like controls.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* course The course id.
* section The sectio id.
* resourceurl The URL to the remote resource on MoodleNet.
* resourcename The name of the remote resource on MoodleNet.
* sesskey The CSRF token, as per sesskey()
* handlers The array of handler options to present the user with
Example context (json):
{
"course": 33,
"coursename": "Introduction to quantum physics",
"section": 0,
"resourceurl": "http://example.com/test.png",
"resourcename": "A test image",
"sesskey": "abc123",
"handlers": [
{
"module": "label",
"message": "Add media to the course page"
}
]
}
}}
<div class="generalbox modal modal-dialog modal-in-page show">
<div class="box py-3 modal-content">
<form action="#" method="post">
<input type="hidden" name="course" value="{{course}}">
<input type="hidden" name="section" value="{{section}}">
<input type="hidden" name="resourceurl" value="{{resourceurl}}">
<input type="hidden" name="sesskey" value="{{sesskey}}">
<div class="box py-3 modal-header px-3">
<h4>{{#str}}importformatselectheader, tool_moodlenet{{/str}}</h4>
</div>
<div class="box py-3 modal-body">
{{#str}}importformatselectguidingtext, tool_moodlenet, {"name": {{#quote}}{{resourcename}}{{/quote}}, "type": {{#quote}}{{resourcetype}}{{/quote}} }{{/str}}
<br><br>
{{#handlers}}
<input id="{{module}}_option" name="module" type="radio" value="{{module}}" {{#oneoption}}checked="checked"{{/oneoption}}>&nbsp;<label for="{{module}}_option">{{message}}</label>
<br>
{{/handlers}}
</div>
<div class="box py-3 modal-footer">
<div class="buttons">
<input class="btn btn-secondary" type="submit" name="cancel" value="{{#str}}cancel, core{{/str}}">
<input class="btn btn-primary" type="submit" name="import" value="{{#str}}continue, core{{/str}}">
</div>
</div>
</form>
</div>
</div>
@@ -0,0 +1,58 @@
{{!
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 tool_moodlenet/select_page
This template renders the course selection page for the MoodleNet tool.
Example context (json):
{
"name": "A cat picture",
"cancellink": "https://moodlesite/my"
}
}}
<div data-region="moodle-net-select">
<div class="alert alert-primary" role="alert">
{{#str}} notification, tool_moodlenet, {"name": {{#quote}}{{name}}{{/quote}}, "cancellink": {{#quote}}{{cancellink}}{{/quote}}, "type": {{#quote}}{{type}}{{/quote}} } {{/str}}
</div>
<h3>{{#str}} selectacourse {{/str}}</h3>
<div class="searchbar input-group w-50" role="search">
<label for="searchinput">
<span class="sr-only">{{#str}} searchcourses, tool_moodlenet {{/str}}</span>
</label>
<input type="text"
data-region="search-input"
id="searchinput"
class="form-control form-control-lg searchinput border-right-0 px-3 py-2"
placeholder="{{#str}} search, core {{/str}}"
name="search"
autocomplete="off"
>
<div class="searchbar-append d-flex border border-secondary border-left-0 px-3 py-2">
<div data-region="search-icon">
{{#pix}} a/search, core {{/pix}}
</div>
<div class="clear d-none">
<button class="btn p-0" data-region="clear-icon">
<span class="d-flex" aria-hidden="true">{{#pix}} e/cancel, core {{/pix}}</span>
<span class="sr-only">{{#str}} clearsearch, tool_moodlenet {{/str}}</span>
</button>
</div>
</div>
</div>
<div class="my-4" data-region="mnet-courses" aria-live="polite"></div>
</div>
@@ -0,0 +1,54 @@
{{!
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 tool_moodlenet/view-cards
This template renders the cards view for the MoodleNet tool.
Example context (json):
{
"courses": [
{
"name": "Assignment due 1",
"viewurl": "https://moodlesite/course/view.php?id=2",
"courseimage": "https://moodlesite/pluginfile/123/course/overviewfiles/123.jpg",
"fullname": "course 3",
"coursecategory": "Category 1",
"visible": true
}
]
}
}}
{{< core_course/coursecards }}
{{$coursename}}
<span class="multiline">
{{#shortentext}}50, {{{fullname}}} {{/shortentext}}
</span>
{{/coursename}}
{{$coursecategory}}
<span class="sr-only">
{{#str}}aria:coursecategory, core_course{{/str}}
</span>
<span class="categoryname text-truncate">
{{{coursecategory}}}
</span>
{{/coursecategory}}
{{$divider}}
<div class="pl-1 pr-1">|</div>
{{/divider}}
{{/ core_course/coursecards }}