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
+231
View File
@@ -0,0 +1,231 @@
{{!
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_contentbank/bankcontent
Example context (json):
{
"contents": [
{
"name": "Accordion.h5p",
"title": "accordion.h5p",
"timemodified": 1589792272,
"size": "699.3KB",
"bytes": 716126,
"type": "Archive (H5P)",
"author": "Admin user",
"link": "http://something/contentbank/contenttype/h5p/view.php?url=http://something/pluginfile.php/1/contentbank/public/accordion.h5p",
"icon" : "http://something/theme/image.php/boost/core/1581597850/f/h5p-64",
"visibilityunlisted": true
},
{
"name": "resume.pdf",
"title": "resume",
"timemodified": 1589792039,
"size": "699.3KB",
"uses": 3,
"bytes": 716126,
"type": "Archive (PDF)",
"author": "Admin user",
"icon": "http://something/theme/image.php/boost/core/1584597850/f/pdf-64",
"visibilityunlisted": false
}
],
"tools": [
{
"name": "Add",
"dropdown": true,
"link": "http://something/contentbank/edit.php?contextid=1",
"contenttypes": [
{
"name": "H5P Interactive Content",
"baseurl": "http://something/contentbank/edit.php?contextid=1&plugin=h5p",
"types": [
{
"typename": "H5P Interactive Content"
},
{
"typename": "Accordion",
"typeeditorparams": "library=Accordion-1.4",
"typeicon": "http://something/pluginfile.php/1/core_h5p/libraries/13/H5P.Accordion-1.4/icon.svg"
}
]
}
]
},
{
"name": "Upload",
"link": "http://something/contentbank/contenttype/h5p/view.php?url=http://something/pluginfile.php/1/contentbank/public/accordion.h5p",
"icon" : "i/upload"
},
{
"icon": "i/export"
}
],
"allowedcontexts": [
{
"name": "contextid",
"method": "get",
"action": "http://localhost/stable_master/contentbank/index.php",
"options": [
{
"value": "1",
"name": "System",
"selected": true,
"optgroup": false
},
{
"value": "32",
"name": "Category 1",
"selected": false,
"optgroup": false
}
]
}
]
}
}}
<div class="content-bank-container {{#viewlist}}view-list{{/viewlist}} {{^viewlist}}view-grid{{/viewlist}}"
data-region="contentbank">
<div class="d-flex justify-content-between">
<div class="cb-search-container mb-2 mr-2">
{{>core_contentbank/bankcontent/search}}
</div>
<div class="cb-toolbar-container mb-2 d-flex">
{{>core_contentbank/bankcontent/toolbar}}
</div>
</div>
<div class="cb-navigation-container mb-2">
{{>core_contentbank/bankcontent/navigation}}
</div>
<div class="pb-3 border">
<div class="content-bank">
<div class="cb-navbar bg-light p-2 border-bottom">
<div class="cb-navbar-breadbrumb">
{{#pix}} i/folder {{/pix}}
</div>
<div class="cb-navbar-totalsearch d-none">
</div>
</div>
{{#contents.0}}
<div role="{{#viewlist}}table{{/viewlist}}{{^viewlist}}list{{/viewlist}}" aria-label="{{#str}} contentbank, contentbank {{/str}}"
class="cb-content-wrapper d-flex px-2" data-region="filearea">
<div {{#viewlist}}role="row"{{/viewlist}} class="cb-heading bg-white">
<div {{#viewlist}}role="columnheader"{{/viewlist}} aria-sort="none" class="cb-file cb-column d-flex">
<button class="btn btn-block cb-btnsort dir-none text-left" data-string="contentname" data-action="sortname"
title="{{#str}} sortbyx, core, {{#str}} contentname, contentbank {{/str}} {{/str}}">
<span class="title">{{#str}} contentname, contentbank {{/str}}</span>
<span class="default">{{#pix}} t/sort, core {{/pix}}</span>
<span class="desc">{{#pix}} t/sort_desc, core {{/pix}}</span>
<span class="asc">{{#pix}} t/sort_asc, core {{/pix}}</span>
</button>
</div>
<div {{#viewlist}}role="columnheader"{{/viewlist}} aria-sort="none" class="cb-uses cb-column d-flex">
<button class="btn btn-block cb-btnsort dir-none text-left" data-string="uses" data-action="sortuses"
title="{{#str}} sortbyx, core, {{#str}} uses, contentbank {{/str}} {{/str}}">
<span class="title">{{#str}} uses, contentbank {{/str}}</span>
<span class="default">{{#pix}} t/sort, core {{/pix}}</span>
<span class="desc">{{#pix}} t/sort_desc, core {{/pix}}</span>
<span class="asc">{{#pix}} t/sort_asc, core {{/pix}}</span>
</button>
</div>
<div {{#viewlist}}role="columnheader"{{/viewlist}} aria-sort="none" class="cb-date cb-column d-flex">
<button class="btn btn-block cb-btnsort dir-none text-left" data-string="lastmodified" data-action="sortdate"
title="{{#str}} sortbyx, core, {{#str}} lastmodified, contentbank {{/str}} {{/str}}">
<span class="title">{{#str}} lastmodified, contentbank {{/str}}</span>
<span class="default">{{#pix}} t/sort, core {{/pix}}</span>
<span class="desc">{{#pix}} t/sort_desc, core {{/pix}}</span>
<span class="asc">{{#pix}} t/sort_asc, core {{/pix}}</span>
</button>
</div>
<div {{#viewlist}}role="columnheader"{{/viewlist}} aria-sort="none" class="cb-size cb-column d-flex">
<button class="btn btn-block cb-btnsort dir-none text-left" data-string="size" data-action="sortsize"
title="{{#str}} sortbyx, core, {{#str}} size, contentbank {{/str}} {{/str}}">
<span class="title">{{#str}} size, contentbank {{/str}}</span>
<span class="default">{{#pix}} t/sort, core {{/pix}}</span>
<span class="desc">{{#pix}} t/sort_desc, core {{/pix}}</span>
<span class="asc">{{#pix}} t/sort_asc, core {{/pix}}</span>
</button>
</div>
<div {{#viewlist}}role="columnheader"{{/viewlist}} aria-sort="none" class="cb-type cb-column d-flex">
<button class="btn btn-block cb-btnsort dir-none text-left" data-string="type" data-action="sorttype"
title="{{#str}} sortbyx, core, {{#str}} type, contentbank {{/str}} {{/str}}">
<span class="title">{{#str}} type, contentbank {{/str}}</span>
<span class="default">{{#pix}} t/sort, core {{/pix}}</span>
<span class="desc">{{#pix}} t/sort_desc, core {{/pix}}</span>
<span class="asc">{{#pix}} t/sort_asc, core {{/pix}}</span>
</button>
</div>
<div {{#viewlist}}role="columnheader"{{/viewlist}} aria-sort="none" class="cb-author cb-column d-flex last">
<button class="btn btn-block cb-btnsort dir-none text-left" data-string="author" data-action="sortauthor"
title="{{#str}} sortbyx, core, {{#str}} author, contentbank {{/str}} {{/str}}">
<span class="title">{{#str}} author, contentbank {{/str}}</span>
<span class="default">{{#pix}} t/sort, core {{/pix}}</span>
<span class="desc">{{#pix}} t/sort_desc, core {{/pix}}</span>
<span class="asc">{{#pix}} t/sort_asc, core {{/pix}}</span>
</button>
</div>
</div>
{{#contents}}
<div role="{{#viewlist}}row{{/viewlist}}{{^viewlist}}listitem{{/viewlist}}"
class="cb-listitem {{#visibilityunlisted}}cb-unlisted{{/visibilityunlisted}}"
data-file="{{ title }}"
data-name="{{ name }}"
data-bytes="{{ bytes }}"
data-uses="{{ uses }}"
data-timemodified="{{ timemodified }}"
data-type="{{ type }}"
data-author="{{ author }}">
<div {{#viewlist}}role="cell"{{/viewlist}} class="cb-file cb-column position-relative">
<div class="cb-thumbnail" style="background-image: url('{{{ icon }}}');">
</div>
<a href="{{{ link }}}" class="cb-link stretched-link">
<span class="cb-name word-break-all clamp-2" data-region="cb-content-name">
{{{ name }}}
</span>
</a>
</div>
<div {{#viewlist}}role="cell"{{/viewlist}} class="cb-uses cb-column small">
{{ uses }}
</div>
<div {{#viewlist}}role="cell"{{/viewlist}} class="cb-date cb-column small">
{{#userdate}} {{ timemodified }}, {{#str}} strftimedatetimeshort, core_langconfig {{/str}} {{/userdate}}
</div>
<div {{#viewlist}}role="cell"{{/viewlist}} class="cb-size cb-column small">
{{ size }}
</div>
<div {{#viewlist}}role="cell"{{/viewlist}} class="cb-type cb-column small">
{{{ type }}}
</div>
<div {{#viewlist}}role="cell"{{/viewlist}} class="cb-type cb-column last small">
{{{ author }}}
</div>
</div>
{{/contents}}
</div>
{{/contents.0}}
{{^contents.0}}
<div class="cb-content-wrapper d-flex flex-wrap p-2" data-region="filearea">
<div class="w-100 p-3 text-center text-muted">
{{#str}} nocontentavailable, core_contentbank {{/str}}
</div>
</div>
{{/contents.0}}
</div>
</div>
</div>
@@ -0,0 +1,27 @@
{{!
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_contentbank/bankcontent/navigation
Example context (json):
{
}
}}
{{#allowedcontexts}}
{{> core/single_select }}
{{/allowedcontexts}}
@@ -0,0 +1,31 @@
{{!
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_contentbank/bankcontent/search
Example context (json):
{
}
}}
{{< core/search_input_auto }}
{{$label}}{{#str}}
searchcontentbankbyname, contentbank
{{/str}}{{/label}}
{{$placeholder}}{{#str}} search, core {{/str}}{{/placeholder}}
{{/ core/search_input_auto }}
@@ -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 core_contentbank/bankcontent/toolbar
Example context (json):
{
"tools": [
{
"name": "Add",
"dropdown": true,
"link": "http://something/contentbank/edit.php?contextid=1",
"contenttypes": [
{
"name": "h5p",
"baseurl": "http://something/contentbank/edit.php?contextid=1&plugin=h5p",
"types": [
{
"typename": "H5P Interactive Content"
},
{
"typename": "Accordion",
"typeeditorparams": "library=Accordion-1.4",
"typeicon": "http://something/pluginfile.php/1/core_h5p/libraries/13/H5P.Accordion-1.4/icon.svg"
}
]
}
]
},
{
"name": "Upload",
"link": "http://something/contentbank/contenttype/h5p/view.php?url=http://something/pluginfile.php/1/contentbank/public/accordion.h5p",
"icon" : "i/upload"
},
{
"icon": "i/export"
}
]
}
}}
{{#tools}}
{{#dropdown}}
{{>core_contentbank/bankcontent/toolbar_dropdown}}
{{/dropdown}}
{{^dropdown}}
<a href="{{ link }}" class="icon-no-margin btn btn-secondary text-nowrap" title="{{ name }}" data-action="{{ action }}">
{{#pix}} {{{ icon }}} {{/pix}} {{{ name }}}
</a>
{{/dropdown}}
{{/tools}}
<button class="icon-no-margin btn btn-secondary {{^viewlist}}active{{/viewlist}} ml-2"
title="{{#str}} displayicons, contentbank {{/str}}"
data-action="viewgrid">
{{#pix}}a/view_icon_active, core, {{#str}} displayicons, contentbank {{/str}} {{/pix}}
</button>
<button class="icon-no-margin btn btn-secondary {{#viewlist}}active{{/viewlist}}"
title="{{#str}} displaydetails, contentbank {{/str}}"
data-action="viewlist">
{{#pix}}t/viewdetails, core, {{#str}} displaydetails, contentbank {{/str}} {{/pix}}
</button>
@@ -0,0 +1,69 @@
{{!
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_contentbank/bankcontent/toolbar_dropdown
Example context (json):
{
"name": "Add",
"dropdown": true,
"link": "http://something/contentbank/edit.php?contextid=1",
"contenttypes": [
{
"name": "h5p",
"baseurl": "http://something/contentbank/edit.php?contextid=1&plugin=h5p",
"types": [
{
"typename": "H5P Interactive Content"
},
{
"typename": "Accordion",
"typeeditorparams": "library=Accordion-1.4",
"typeicon": "http://something/pluginfile.php/1/core_h5p/libraries/13/H5P.Accordion-1.4/icon.svg"
}
]
}
]
}
}}
<div class="btn-group mr-1" role="group">
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" data-action="{{name}}-content"
aria-haspopup="true" aria-expanded="false" {{^contenttypes}}title="{{#str}}nocontenttypes, core_contentbank{{/str}}"
disabled{{/contenttypes}}>
{{#name}} {{name}} {{/name}}
</button>
<div class="dropdown-menu dropdown-scrollable dropdown-menu-right">
{{#contenttypes}}
{{#types}}
{{^typeeditorparams}}
<h6 class="dropdown-header">{{ typename }}</h6>
{{/typeeditorparams}}
{{#typeeditorparams}}
<a class="dropdown-item icon-size-4" href="{{{ baseurl }}}&{{{ typeeditorparams }}}">
{{#typeicon}}
<img alt="" class="icon" src="{{{ typeicon }}}">
{{/typeicon}}
{{^typeicon}}
{{#pix}} b/h5p_library, core {{/pix}}
{{/typeicon}} {{ typename }}
</a>
{{/typeeditorparams}}
{{/types}}
{{/contenttypes}}
</div>
</div>
@@ -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 comments.
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_contentbank/contentbankmenu
Contentbank view toolbar.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* options - JSON object - the options available in the dropdown
Example context (json):
{
"options": [
{
"url": "www.google.com",
"label": "Google",
"attributes": [
{
"name": "data-attrib",
"value": "1"
}
]
}
]
}
}}
<div class="dropdown d-flex">
<button aria-label="{{#str}}actionsmenu{{/str}}" class="btn btn-secondary dropdown-toggle" id="dropdown-actions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{#str}}more, core_contentbank{{/str}}
</button>
{{! dropdown-menu-right style to fix RTL placement }}
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdown-actions">
{{#options}}
<a class="dropdown-item {{extraclasses}}" {{#attributes}}{{name}}="{{value}}"{{/attributes}} href="{{url}}">{{label}}</a>
{{/options}}
</div>
</div>
@@ -0,0 +1,30 @@
{{!
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_contentbank/copycontent
Example context (json):
{
"contentid": 17,
"name": "Accordion"
}
}}
<div class="form-check w-100 justify-content-start">
<label for="newname">{{#str}}contentname, core_contentbank{{/str}}</label>
<input type="text" size="5" id="newname" name="newname" value="{{ name }}" class="form-control">
</div>
@@ -0,0 +1,30 @@
{{!
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_contentbank/renamecontent
Example context (json):
{
"contentid": 17,
"name": "Accordion"
}
}}
<div class="form-check w-100 justify-content-start">
<label for="newname">{{#str}}contentname, core_contentbank{{/str}}</label>
<input type="text" size="5" id="newname" name="newname" value="{{ name }}" class="form-control text-ltr">
</div>
@@ -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 comments.
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_contentbank/viewcontent
View content page.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* contenthtml - string - content html.
* usercanedit - boolean - whether the user has permission to edit the content.
* editcontenturl - string - edit page URL.
* closeurl - string - close landing page.
Example context (json):
{
"contenthtml" : "<iframe src=\"http://something/h5p/embed.php?url=h5pfileurl\"></iframe>",
"usercanedit" : true,
"editcontenturl" : "http://something/contentbank/edit.php?contextid=1&plugin=h5p&id=1",
"closeurl" : "http://moodle.test/h5pcb/moodle/contentbank/index.php"
}
}}
<div class="core_contentbank_viewcontent">
{{>core_contentbank/viewcontent/toolbarview}}
<div class="mt-1 mb-1" data-region="viewcontent-content">
{{{ contenthtml }}}
</div>
</div>
@@ -0,0 +1,81 @@
{{!
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 comments.
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_contentbank/viewcontent/toolbarview
Contentbank view toolbar.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* contenthtml - string - content html.
* usercanedit - boolean - whether the user has permission to edit the content.
* editcontenturl - string - edit page URL.
* closeurl - string - close landing page.
Example context (json):
{
"usercanedit" : true,
"heading" : "This is a heading",
"editcontenturl" : "http://something/contentbank/edit.php?contextid=1&plugin=h5p&id=1",
"closeurl" : "http://moodle.test/h5pcb/moodle/contentbank/index.php",
"actionmenu": {
"options": [
{
"url": "www.google.com",
"label": "Google",
"attributes": [
{
"name": "data-attrib",
"value": "1"
}
]
}
]
}
}
}}
{{#heading}}<h2>{{heading}}</h2>{{/heading}}
<div class="cb-toolbar-container container-fluid my-2">
<div class="row">
{{#usercanedit}}
<div class="d-flex mr-3">
<a href="{{editcontenturl}}" class="btn btn-primary" data-action="edit-content">
{{#str}}edit{{/str}}
</a>
</div>
{{/usercanedit}}
{{#actionmenu}}
<div>
{{> core_contentbank/contentbankmenu }}
</div>
{{/actionmenu}}
{{#closeurl}}
<div class="ml-auto">
<a href="{{closeurl}}" class="btn btn-secondary" data-action="close-content">
{{#str}}exit, core_contentbank{{/str}}
</a>
</div>
{{/closeurl}}
</div>
</div>