Fix Moodle plugin CI errors
This commit is contained in:
Родитель
960b183fd7
Коммит
13b15e0641
|
@ -0,0 +1,87 @@
|
|||
services:
|
||||
- name: selenium/standalone-chrome:3
|
||||
alias: behat
|
||||
- name: mysql:8.0
|
||||
alias: db
|
||||
command:
|
||||
- '--character-set-server=utf8mb4'
|
||||
- '--collation-server=utf8mb4_unicode_ci'
|
||||
- '--innodb_file_per_table=On'
|
||||
- '--wait-timeout=28800'
|
||||
- '--skip-log-bin'
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- .cache
|
||||
|
||||
variables:
|
||||
DEBIAN_FRONTEND: 'noninteractive'
|
||||
COMPOSER_ALLOW_SUPERUSER: 1
|
||||
COMPOSER_CACHE_DIR: "$CI_PROJECT_DIR/.cache/composer"
|
||||
NPM_CONFIG_CACHE: "$CI_PROJECT_DIR/.cache/npm"
|
||||
CI_BUILD_DIR: '/tmp/plugin'
|
||||
MOODLE_BRANCH: 'MOODLE_405_STABLE'
|
||||
MOODLE_BEHAT_WWWROOT: 'http://localhost:8000'
|
||||
MOODLE_BEHAT_WDHOST: 'http://behat:4444/wd/hub'
|
||||
MOODLE_START_BEHAT_SERVERS: 'no'
|
||||
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
|
||||
DB: 'mysqli'
|
||||
|
||||
stages:
|
||||
- moodle-plugin-ci
|
||||
|
||||
.setupandruncheck: &setupandruncheck
|
||||
stage: moodle-plugin-ci
|
||||
before_script:
|
||||
- mkdir -pv "$CI_BUILD_DIR"
|
||||
- cp -ru "$CI_PROJECT_DIR/"* "$CI_BUILD_DIR"
|
||||
- mkdir -p /usr/share/man/man1 /usr/share/man/man3 /usr/share/man/man7
|
||||
- apt-get -qq update
|
||||
- apt-get -yqq install --no-install-suggests default-jre-headless default-mysql-client
|
||||
- 'curl -sS https://raw.githubusercontent.com/creationix/nvm/v0.39.3/install.sh | bash'
|
||||
- . ~/.bashrc
|
||||
- nvm install --default --latest-npm lts/gallium
|
||||
- 'curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer'
|
||||
- composer create-project -n --no-dev --no-progress --no-ansi moodlehq/moodle-plugin-ci /opt/mci ^4
|
||||
- export PATH="/opt/mci/bin:/opt/mci/vendor/bin:$PATH"
|
||||
- moodle-plugin-ci add-plugin --clone https://github.com/microsoft/moodle-auth_oidc.git --branch $MOODLE_BRANCH
|
||||
- moodle-plugin-ci add-plugin --clone https://github.com/microsoft/moodle-local_o365.git --branch $MOODLE_BRANCH
|
||||
- moodle-plugin-ci install --db-host db --db-name moodle
|
||||
- '{ php -S 0.0.0.0:8000 -t "$CI_PROJECT_DIR/moodle" >/dev/null 2>&1 & }'
|
||||
- TXT_RED="\e[31m"
|
||||
|
||||
script:
|
||||
- errors=()
|
||||
- moodle-plugin-ci phplint || errors+=("phplint")
|
||||
- moodle-plugin-ci phpmd || errors+=("phpmd")
|
||||
- moodle-plugin-ci codechecker --max-warnings 0 || errors+=("codechecker")
|
||||
- moodle-plugin-ci phpdoc --max-warnings 0 || errors+=("phpdoc")
|
||||
- moodle-plugin-ci validate || errors+=("validate")
|
||||
- moodle-plugin-ci savepoints || errors+=("savepoints")
|
||||
- moodle-plugin-ci mustache || errors+=("mustache")
|
||||
- moodle-plugin-ci grunt --max-lint-warnings 0 || errors+=("grunt")
|
||||
- moodle-plugin-ci phpunit || errors+=("phpunit")
|
||||
- moodle-plugin-ci behat --auto-rerun 0 --profile chrome || errors+=("behat")
|
||||
- |-
|
||||
if [ ${#errors[@]} -ne 0 ]; then
|
||||
echo -e "${TXT_RED}Check errors: ${errors[@]}";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
php81:
|
||||
tags:
|
||||
- docker
|
||||
image: moodlehq/moodle-php-apache:8.1
|
||||
<<: *setupandruncheck
|
||||
|
||||
php82:
|
||||
tags:
|
||||
- docker
|
||||
image: moodlehq/moodle-php-apache:8.2
|
||||
<<: *setupandruncheck
|
||||
|
||||
php83:
|
||||
tags:
|
||||
- docker
|
||||
image: moodlehq/moodle-php-apache:8.3
|
||||
<<: *setupandruncheck
|
|
@ -1 +1,3 @@
|
|||
define(["jquery"],function(t){return{init:function(){window.location!=window.parent.location||/Android|iPhone|iPad|iPod/i.test(navigator.userAgent)?(t("body.drawer-open-left").css("margin-left","0"),t("div#page").css("margin-top","0"),t("section#region-main.has-blocks").css("width","100%"),t("div#page-wrapper").css("margin-bottom","0"),t("div.context-header-settings-menu").remove(),t("div.region-main-settings-menu").remove(),t("div.region_main_settings_menu_proxy").remove(),t("div.action-menu-trigger").remove(),t("div.ml-auto").remove(),t("a.printicon").remove(),t("header#page-header").css("display","none"),t(".activityinstance a").click(function(){t(this).attr("target","_blank")}),t(".modtype_assign .activityinstance a").click(function(){t(this).attr("target","_self")}),t(".modtype_quiz .activityinstance a").click(function(){t(this).attr("target","_self")}),t("#page-mod-assign-view .submissionlinks a").click(function(){t(this).attr("target","_blank")}),t(".quizattempt .singlebutton form").click(function(){t(this).attr("target","_blank"),t(this).attr("method","get")})):(t("nav.navbar").show(),t("nav.navbar").css("display","flex"),t("div#nav-drawer").show(),t('section[data-region="blocks-column"]').show(),t("footer#page-footer").show(),t("div#course_page_title").css("display","none"),t(".popupicon").css("display","none")),t("body").fadeIn(150)}}});
|
||||
define("theme_boost_o365teams/iframeChecker",["jquery"],(function($){return{init:function(){window.location!=window.parent.location||/Android|iPhone|iPad|iPod/i.test(navigator.userAgent)?($("body.drawer-open-left").css("margin-left","0"),$("div#page").css("margin-top","0"),$("section#region-main.has-blocks").css("width","100%"),$("div#page-wrapper").css("margin-bottom","0"),$("div.context-header-settings-menu").remove(),$("div.region-main-settings-menu").remove(),$("div.region_main_settings_menu_proxy").remove(),$("div.action-menu-trigger").remove(),$("div.ml-auto").remove(),$("a.printicon").remove(),$("header#page-header").css("display","none"),$(".activityinstance a").click((function(){$(this).attr("target","_blank")})),$(".modtype_assign .activityinstance a").click((function(){$(this).attr("target","_self")})),$(".modtype_quiz .activityinstance a").click((function(){$(this).attr("target","_self")})),$("#page-mod-assign-view .submissionlinks a").click((function(){$(this).attr("target","_blank")})),$(".quizattempt .singlebutton form").click((function(){$(this).attr("target","_blank"),$(this).attr("method","get")}))):($("nav.navbar").show(),$("nav.navbar").css("display","flex"),$("div#nav-drawer").show(),$('section[data-region="blocks-column"]').show(),$("footer#page-footer").show(),$("div#course_page_title").css("display","none"),$(".popupicon").css("display","none")),$("body").fadeIn(150)}}}));
|
||||
|
||||
//# sourceMappingURL=iframeChecker.min.js.map
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"iframeChecker.min.js","sources":["../src/iframeChecker.js"],"sourcesContent":["define(['jquery'], function($) {\n return {\n init: function() {\n if (inTeams()) {\n // In Teams, hide page elements.\n $('body.drawer-open-left').css('margin-left', '0');\n $('div#page').css('margin-top', '0');\n $('section#region-main.has-blocks').css('width', '100%');\n $('div#page-wrapper').css('margin-bottom', '0');\n $('div.context-header-settings-menu').remove();\n $('div.region-main-settings-menu').remove();\n $('div.region_main_settings_menu_proxy').remove();\n $('div.action-menu-trigger').remove();\n $('div.ml-auto').remove();\n $('a.printicon').remove();\n $('header#page-header').css('display', 'none');\n $('.activityinstance a').click(function() {\n $(this).attr('target', '_blank');\n });\n $('.modtype_assign .activityinstance a').click(function() {\n $(this).attr('target', '_self');\n });\n $('.modtype_quiz .activityinstance a').click(function() {\n $(this).attr('target', '_self');\n });\n $('#page-mod-assign-view .submissionlinks a').click(function() {\n $(this).attr('target', '_blank');\n });\n $('.quizattempt .singlebutton form').click(function() {\n $(this).attr('target', '_blank');\n $(this).attr('method', 'get');\n });\n } else {\n // Not in Teams, show page elements.\n $('nav.navbar').show();\n $('nav.navbar').css('display', 'flex');\n $('div#nav-drawer').show();\n $('section[data-region=\"blocks-column\"]').show();\n $('footer#page-footer').show();\n $('div#course_page_title').css('display', 'none');\n $('.popupicon').css('display', 'none');\n }\n $(\"body\").fadeIn(150);\n }\n };\n\n /**\n * Check if the page is being displayed in Microsoft Teams.\n *\n * @return {boolean} True if the page is being displayed in Microsoft Teams, false otherwise.\n */\n function inTeams() {\n return ((window.location != window.parent.location) || (/Android|iPhone|iPad|iPod/i.test(navigator.userAgent)));\n }\n});\n"],"names":["define","$","init","window","location","parent","test","navigator","userAgent","css","remove","click","this","attr","show","fadeIn"],"mappings":"AAAAA,6CAAO,CAAC,WAAW,SAASC,SACjB,CACHC,KAAM,WAkDGC,OAAOC,UAAYD,OAAOE,OAAOD,UAAc,4BAA4BE,KAAKC,UAAUC,YA/C3FP,EAAE,yBAAyBQ,IAAI,cAAe,KAC9CR,EAAE,YAAYQ,IAAI,aAAc,KAChCR,EAAE,kCAAkCQ,IAAI,QAAS,QACjDR,EAAE,oBAAoBQ,IAAI,gBAAiB,KAC3CR,EAAE,oCAAoCS,SACtCT,EAAE,iCAAiCS,SACnCT,EAAE,uCAAuCS,SACzCT,EAAE,2BAA2BS,SAC7BT,EAAE,eAAeS,SACjBT,EAAE,eAAeS,SACjBT,EAAE,sBAAsBQ,IAAI,UAAW,QACvCR,EAAE,uBAAuBU,OAAM,WAC3BV,EAAEW,MAAMC,KAAK,SAAU,aAE3BZ,EAAE,uCAAuCU,OAAM,WAC3CV,EAAEW,MAAMC,KAAK,SAAU,YAE3BZ,EAAE,qCAAqCU,OAAM,WACzCV,EAAEW,MAAMC,KAAK,SAAU,YAE3BZ,EAAE,4CAA4CU,OAAM,WAChDV,EAAEW,MAAMC,KAAK,SAAU,aAE3BZ,EAAE,mCAAmCU,OAAM,WACvCV,EAAEW,MAAMC,KAAK,SAAU,UACvBZ,EAAEW,MAAMC,KAAK,SAAU,YAI3BZ,EAAE,cAAca,OAChBb,EAAE,cAAcQ,IAAI,UAAW,QAC/BR,EAAE,kBAAkBa,OACpBb,EAAE,wCAAwCa,OAC1Cb,EAAE,sBAAsBa,OACxBb,EAAE,yBAAyBQ,IAAI,UAAW,QAC1CR,EAAE,cAAcQ,IAAI,UAAW,SAEnCR,EAAE,QAAQc,OAAO"}
|
|
@ -1 +1,3 @@
|
|||
define(["jquery"],function(e){return{init:function(){microsoftTeams.initialize(),microsoftTeams.getContext(function(t){theme=t.theme,e("body").addClass("theme_"+theme)}),microsoftTeams.registerOnThemeChangeHandler(function(t){e("body").removeClass("theme_default"),e("body").removeClass("theme_dark"),e("body").removeClass("theme_contrast"),e("body").addClass("theme_"+t)})}}});
|
||||
define("theme_boost_o365teams/teamsThemeChecker",["jquery","microsoftTeams"],(function($,microsoftTeams){return{init:function(){microsoftTeams.initialize(),microsoftTeams.getContext((function(context){var theme=context.theme;$("body").addClass("theme_"+theme)})),microsoftTeams.registerOnThemeChangeHandler((function(theme){$("body").removeClass("theme_default theme_dark theme_contrast"),$("body").addClass("theme_"+theme)}))}}}));
|
||||
|
||||
//# sourceMappingURL=teamsThemeChecker.min.js.map
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"teamsThemeChecker.min.js","sources":["../src/teamsThemeChecker.js"],"sourcesContent":["define(['jquery', 'microsoftTeams'], function($, microsoftTeams) {\n return {\n init: function() {\n microsoftTeams.initialize();\n\n microsoftTeams.getContext(function(context) {\n var theme = context.theme;\n $(\"body\").addClass(\"theme_\" + theme);\n });\n\n microsoftTeams.registerOnThemeChangeHandler(function(theme) {\n $(\"body\").removeClass(\"theme_default theme_dark theme_contrast\");\n $(\"body\").addClass(\"theme_\" + theme);\n });\n }\n };\n});\n"],"names":["define","$","microsoftTeams","init","initialize","getContext","context","theme","addClass","registerOnThemeChangeHandler","removeClass"],"mappings":"AAAAA,iDAAO,CAAC,SAAU,mBAAmB,SAASC,EAAGC,sBACtC,CACHC,KAAM,WACFD,eAAeE,aAEfF,eAAeG,YAAW,SAASC,aAC3BC,MAAQD,QAAQC,MACpBN,EAAE,QAAQO,SAAS,SAAWD,UAGlCL,eAAeO,8BAA6B,SAASF,OACjDN,EAAE,QAAQS,YAAY,2CACtBT,EAAE,QAAQO,SAAS,SAAWD"}
|
|
@ -1,7 +1,7 @@
|
|||
define(['jquery'], function ($) {
|
||||
define(['jquery'], function($) {
|
||||
return {
|
||||
init: function() {
|
||||
if (in_teams()) {
|
||||
if (inTeams()) {
|
||||
// In Teams, hide page elements.
|
||||
$('body.drawer-open-left').css('margin-left', '0');
|
||||
$('div#page').css('margin-top', '0');
|
||||
|
@ -44,7 +44,12 @@ define(['jquery'], function ($) {
|
|||
}
|
||||
};
|
||||
|
||||
function in_teams() {
|
||||
/**
|
||||
* Check if the page is being displayed in Microsoft Teams.
|
||||
*
|
||||
* @return {boolean} True if the page is being displayed in Microsoft Teams, false otherwise.
|
||||
*/
|
||||
function inTeams() {
|
||||
return ((window.location != window.parent.location) || (/Android|iPhone|iPad|iPod/i.test(navigator.userAgent)));
|
||||
};
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
define(['jquery'], function($) {
|
||||
define(['jquery', 'microsoftTeams'], function($, microsoftTeams) {
|
||||
return {
|
||||
init: function() {
|
||||
microsoftTeams.initialize();
|
||||
|
||||
microsoftTeams.getContext(function(context) {
|
||||
theme = context.theme;
|
||||
var theme = context.theme;
|
||||
$("body").addClass("theme_" + theme);
|
||||
});
|
||||
|
||||
microsoftTeams.registerOnThemeChangeHandler(function(theme) {
|
||||
$("body").removeClass("theme_default");
|
||||
$("body").removeClass("theme_dark");
|
||||
$("body").removeClass("theme_contrast");
|
||||
$("body").removeClass("theme_default theme_dark theme_contrast");
|
||||
$("body").addClass("theme_" + theme);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -19,8 +19,6 @@ namespace theme_boost_o365teams\output;
|
|||
use html_writer;
|
||||
use moodle_url;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
/**
|
||||
* Core Render.
|
||||
*
|
||||
|
@ -29,6 +27,7 @@ defined('MOODLE_INTERNAL') || die;
|
|||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class core_renderer extends \theme_boost\output\core_renderer {
|
||||
|
||||
/**
|
||||
* Return header html.
|
||||
* The header section includes custom content security policy setting, as well as reference to the Microsoft Teams JS lib.
|
||||
|
@ -52,12 +51,11 @@ class core_renderer extends \theme_boost\output\core_renderer {
|
|||
* @return string
|
||||
*/
|
||||
public function user_link() {
|
||||
global $USER, $OUTPUT;
|
||||
global $USER;
|
||||
|
||||
if (!empty($USER->id)) {
|
||||
|
||||
$profilepagelink = new moodle_url('/user/profile.php', ['id' => $USER->id]);
|
||||
$profilepic = $OUTPUT->user_picture($USER, ['size' => 26, 'link' => false]);
|
||||
$profilepic = $this->user_picture($USER, ['size' => 26, 'link' => false]);
|
||||
$userfullname = fullname($USER);
|
||||
$piclink = html_writer::link($profilepagelink, $profilepic, ['target' => '_blank', 'class' => 'user_details']);
|
||||
$userprofile = html_writer::link($profilepagelink, $userfullname, ['target' => '_blank']);
|
||||
|
@ -109,10 +107,10 @@ class core_renderer extends \theme_boost\output\core_renderer {
|
|||
* @return string
|
||||
*/
|
||||
public function get_footer_stamp() {
|
||||
global $CFG, $OUTPUT, $PAGE;
|
||||
global $CFG;
|
||||
|
||||
if (!empty($PAGE->theme->setting_file_url('footer_stamp', 'footer_stamp'))) {
|
||||
$fileurl = $PAGE->theme->setting_file_url('footer_stamp', 'footer_stamp');
|
||||
if (!empty($this->page->theme->setting_file_url('footer_stamp', 'footer_stamp'))) {
|
||||
$fileurl = $this->page->theme->setting_file_url('footer_stamp', 'footer_stamp');
|
||||
// Get a URL suitable for moodle_url.
|
||||
$relativebaseurl = preg_replace('|^https?://|i', '//', $CFG->wwwroot);
|
||||
$relativefileurl = str_replace($relativebaseurl, '', $fileurl);
|
||||
|
@ -122,7 +120,7 @@ class core_renderer extends \theme_boost\output\core_renderer {
|
|||
$coursepageurl = $this->page->url;
|
||||
$stamp = html_writer::link($coursepageurl, $img, ['target' => '_blank', 'class' => 'stamp']);
|
||||
} else {
|
||||
$img = html_writer::empty_tag('img', ["src" => $OUTPUT->image_url('moodlelogo', 'theme')]);
|
||||
$img = html_writer::empty_tag('img', ["src" => $this->image_url('moodlelogo', 'theme')]);
|
||||
|
||||
$coursepageurl = $this->page->url;
|
||||
$stamp = html_writer::link($coursepageurl, $img, ['target' => '_blank', 'class' => 'stamp']);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
namespace theme_boost_o365teams\privacy;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
use core_privacy\local\metadata\null_provider;
|
||||
|
||||
/**
|
||||
* Privacy Subsystem for theme_boost_o365teams implementing null_provider.
|
||||
|
@ -32,7 +32,7 @@ defined('MOODLE_INTERNAL') || die();
|
|||
* @copyright 2020 Catalyst IT
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class provider implements \core_privacy\local\metadata\null_provider {
|
||||
class provider implements null_provider {
|
||||
|
||||
/**
|
||||
* Get the language string identifier with the component's language
|
||||
|
@ -40,7 +40,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function get_reason() : string {
|
||||
public static function get_reason(): string {
|
||||
return 'privacy:metadata';
|
||||
}
|
||||
}
|
||||
|
|
126
config.php
126
config.php
|
@ -31,7 +31,7 @@ $THEME->sheets = ['custom'];
|
|||
$THEME->editor_sheets = [];
|
||||
$THEME->parents = ['boost'];
|
||||
$THEME->enable_dock = false;
|
||||
$THEME->yuicssmodules = array();
|
||||
$THEME->yuicssmodules = [];
|
||||
$THEME->rendererfactory = 'theme_overridden_renderer_factory';
|
||||
$THEME->requiredblocks = '';
|
||||
$THEME->addblockposition = BLOCK_ADDBLOCK_POSITION_FLATNAV;
|
||||
|
@ -39,111 +39,111 @@ $THEME->haseditswitch = true;
|
|||
|
||||
$THEME->layouts = [
|
||||
// Most backwards compatible layout without the blocks - this is the layout used by default.
|
||||
'base' => array(
|
||||
'base' => [
|
||||
'file' => 'columns1.php',
|
||||
'regions' => array(),
|
||||
),
|
||||
'regions' => [],
|
||||
],
|
||||
// Standard layout with blocks, this is recommended for most pages with general information.
|
||||
'standard' => array(
|
||||
'standard' => [
|
||||
'file' => 'columns2.php',
|
||||
'regions' => array('side-pre'),
|
||||
'regions' => ['side-pre'],
|
||||
'defaultregion' => 'side-pre',
|
||||
),
|
||||
],
|
||||
// Main course page.
|
||||
'course' => array(
|
||||
'course' => [
|
||||
'file' => 'columns2.php',
|
||||
'regions' => array('side-pre'),
|
||||
'regions' => ['side-pre'],
|
||||
'defaultregion' => 'side-pre',
|
||||
'options' => array('langmenu' => true),
|
||||
),
|
||||
'coursecategory' => array(
|
||||
'options' => ['langmenu' => true],
|
||||
],
|
||||
'coursecategory' => [
|
||||
'file' => 'columns2.php',
|
||||
'regions' => array('side-pre'),
|
||||
'regions' => ['side-pre'],
|
||||
'defaultregion' => 'side-pre',
|
||||
),
|
||||
],
|
||||
// Part of course, typical for modules - default page layout if $cm specified in require_login().
|
||||
'incourse' => array(
|
||||
'incourse' => [
|
||||
'file' => 'columns2.php',
|
||||
'regions' => array('side-pre'),
|
||||
'regions' => ['side-pre'],
|
||||
'defaultregion' => 'side-pre',
|
||||
),
|
||||
],
|
||||
// The site home page.
|
||||
'frontpage' => array(
|
||||
'frontpage' => [
|
||||
'file' => 'columns2.php',
|
||||
'regions' => array('side-pre'),
|
||||
'regions' => ['side-pre'],
|
||||
'defaultregion' => 'side-pre',
|
||||
'options' => array('nonavbar' => true),
|
||||
),
|
||||
'options' => ['nonavbar' => true],
|
||||
],
|
||||
// Server administration scripts.
|
||||
'admin' => array(
|
||||
'admin' => [
|
||||
'file' => 'columns2.php',
|
||||
'regions' => array('side-pre'),
|
||||
'regions' => ['side-pre'],
|
||||
'defaultregion' => 'side-pre',
|
||||
),
|
||||
],
|
||||
// My dashboard page.
|
||||
'mydashboard' => array(
|
||||
'mydashboard' => [
|
||||
'file' => 'columns2.php',
|
||||
'regions' => array('side-pre'),
|
||||
'regions' => ['side-pre'],
|
||||
'defaultregion' => 'side-pre',
|
||||
'options' => array('nonavbar' => true, 'langmenu' => true),
|
||||
),
|
||||
'options' => ['nonavbar' => true, 'langmenu' => true],
|
||||
],
|
||||
// My public page.
|
||||
'mypublic' => array(
|
||||
'mypublic' => [
|
||||
'file' => 'columns2.php',
|
||||
'regions' => array('side-pre'),
|
||||
'regions' => ['side-pre'],
|
||||
'defaultregion' => 'side-pre',
|
||||
),
|
||||
'login' => array(
|
||||
],
|
||||
'login' => [
|
||||
'file' => 'login.php',
|
||||
'regions' => array(),
|
||||
'options' => array('langmenu' => true),
|
||||
),
|
||||
'regions' => [],
|
||||
'options' => ['langmenu' => true],
|
||||
],
|
||||
|
||||
// Pages that appear in pop-up windows - no navigation, no blocks, no header.
|
||||
'popup' => array(
|
||||
'popup' => [
|
||||
'file' => 'columns1.php',
|
||||
'regions' => array(),
|
||||
'options' => array('nofooter' => true, 'nonavbar' => true),
|
||||
),
|
||||
'regions' => [],
|
||||
'options' => ['nofooter' => true, 'nonavbar' => true],
|
||||
],
|
||||
// No blocks and minimal footer - used for legacy frame layouts only!
|
||||
'frametop' => array(
|
||||
'frametop' => [
|
||||
'file' => 'columns1.php',
|
||||
'regions' => array(),
|
||||
'options' => array('nofooter' => true, 'nocoursefooter' => true),
|
||||
),
|
||||
'regions' => [],
|
||||
'options' => ['nofooter' => true, 'nocoursefooter' => true],
|
||||
],
|
||||
// Embeded pages, like iframe/object embeded in moodleform - it needs as much space as possible.
|
||||
'embedded' => array(
|
||||
'embedded' => [
|
||||
'file' => 'embedded.php',
|
||||
'regions' => array()
|
||||
),
|
||||
'regions' => [],
|
||||
],
|
||||
// Used during upgrade and install, and for the 'This site is undergoing maintenance' message.
|
||||
// This must not have any blocks, links, or API calls that would lead to database or cache interaction.
|
||||
// Please be extremely careful if you are modifying this layout.
|
||||
'maintenance' => array(
|
||||
'maintenance' => [
|
||||
'file' => 'maintenance.php',
|
||||
'regions' => array(),
|
||||
),
|
||||
'regions' => [],
|
||||
],
|
||||
// Should display the content and basic headers only.
|
||||
'print' => array(
|
||||
'print' => [
|
||||
'file' => 'columns1.php',
|
||||
'regions' => array(),
|
||||
'options' => array('nofooter' => true, 'nonavbar' => false),
|
||||
),
|
||||
'regions' => [],
|
||||
'options' => ['nofooter' => true, 'nonavbar' => false],
|
||||
],
|
||||
// The pagelayout used when a redirection is occuring.
|
||||
'redirect' => array(
|
||||
'redirect' => [
|
||||
'file' => 'embedded.php',
|
||||
'regions' => array(),
|
||||
),
|
||||
'regions' => [],
|
||||
],
|
||||
// The pagelayout used for reports.
|
||||
'report' => array(
|
||||
'report' => [
|
||||
'file' => 'columns2.php',
|
||||
'regions' => array('side-pre'),
|
||||
'regions' => ['side-pre'],
|
||||
'defaultregion' => 'side-pre',
|
||||
),
|
||||
],
|
||||
// The pagelayout used for safebrowser and securewindow.
|
||||
'secure' => array(
|
||||
'secure' => [
|
||||
'file' => 'secure.php',
|
||||
'regions' => array('side-pre'),
|
||||
'defaultregion' => 'side-pre'
|
||||
)
|
||||
'regions' => ['side-pre'],
|
||||
'defaultregion' => 'side-pre',
|
||||
],
|
||||
];
|
||||
|
|
|
@ -24,25 +24,21 @@
|
|||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$string['advancedsettings'] = 'Advanced settings';
|
||||
$string['choosereadme'] = 'Boost o365teams is a modern highly-customisable theme. This theme is intended to be used directly, or as a parent theme when creating new themes utilising Bootstrap 4.';
|
||||
$string['configtitle'] = 'Boost Office365 Teams';
|
||||
$string['edit_course'] = 'Edit course in browser window';
|
||||
$string['editcourse'] = 'Edit course';
|
||||
$string['feedback'] = 'Feedback';
|
||||
$string['footer_stamp_desc'] = 'Displays Image or logo at bottom right of tabs.<br/>(Max-Height: 60px)';
|
||||
$string['footer_stamp_title'] = 'Tabs Footer Stamp';
|
||||
$string['generalsettings'] = 'General settings';
|
||||
$string['navigatereturn'] = 'Return to quiz menu';
|
||||
$string['open_course'] = 'Open course in browser window';
|
||||
$string['placementfrontpage'] = 'Front page';
|
||||
$string['pluginname'] = 'Boost Office365 Teams';
|
||||
$string['privacy:metadata'] = 'The Boost Office365 Teams plugin does not store any personal data.';
|
||||
$string['region-side-pre'] = 'Right';
|
||||
|
||||
$string['placementfrontpage'] = 'Front page';
|
||||
$string['editcourse'] = 'Edit course';
|
||||
|
||||
$string['share_feedback'] = 'Share feedback';
|
||||
$string['feedback'] = 'Feedback';
|
||||
$string['edit_course'] = 'Edit course in browser window';
|
||||
$string['open_course'] = 'Open course in browser window';
|
||||
|
||||
$string['navigatereturn'] = 'Return to quiz menu';
|
||||
|
||||
$string['configtitle'] = 'Boost Office365 Teams';
|
||||
$string['generalsettings'] = 'General settings';
|
||||
$string['showteamfeedbacklink'] = 'Show feedback link';
|
||||
$string['showteamfeedbacklink_desc'] = 'If enabled, a link to leave feedback to Moodle Microsoft 365 integration will be shown when a Moodle tab is opened in Teams.';
|
||||
$string['advancedsettings'] = 'Advanced settings';
|
||||
$string['footer_stamp_title'] = "Tabs Footer Stamp";
|
||||
$string['footer_stamp_desc'] = "Displays Image or logo at bottom right of tabs.<br/>(Max-Height: 60px)";
|
||||
|
|
|
@ -29,7 +29,7 @@ $bodyattributes = $OUTPUT->body_attributes();
|
|||
$templatecontext = [
|
||||
'sitename' => format_string($SITE->shortname, true, ['context' => context_course::instance(SITEID), "escape" => false]),
|
||||
'output' => $OUTPUT,
|
||||
'bodyattributes' => $bodyattributes
|
||||
'bodyattributes' => $bodyattributes,
|
||||
];
|
||||
|
||||
echo $OUTPUT->render_from_template('theme_boost_o365teams/login', $templatecontext);
|
||||
|
|
4
lib.php
4
lib.php
|
@ -22,8 +22,6 @@
|
|||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
use theme_boost_o365teams\css_processor;
|
||||
|
||||
/**
|
||||
|
@ -38,7 +36,7 @@ use theme_boost_o365teams\css_processor;
|
|||
* @param array $options
|
||||
* @return bool
|
||||
*/
|
||||
function theme_boost_o365teams_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload, array $options = array()) {
|
||||
function theme_boost_o365teams_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload, array $options = []) {
|
||||
|
||||
static $theme;
|
||||
if (empty($theme)) {
|
||||
|
|
|
@ -48,7 +48,7 @@ class theme_boost_o365teams_mod_assign_renderer extends mod_assign\output\render
|
|||
$this->page->navbar->add($header->subpage, $header->subpageurl);
|
||||
}
|
||||
|
||||
$heading = format_string($header->assign->name, false, array('context' => $header->context));
|
||||
$heading = format_string($header->assign->name, false, ['context' => $header->context]);
|
||||
$this->page->set_title($heading);
|
||||
$this->page->set_heading($this->page->course->fullname);
|
||||
|
||||
|
@ -65,12 +65,13 @@ class theme_boost_o365teams_mod_assign_renderer extends mod_assign\output\render
|
|||
$activityheader = $this->page->activityheader;
|
||||
$activityheader->set_attrs([
|
||||
'title' => $activityheader->is_title_allowed() ? $heading : '',
|
||||
'description' => $description
|
||||
'description' => $description,
|
||||
]);
|
||||
|
||||
return $this->output->header();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* course
|
||||
*
|
||||
|
@ -89,7 +90,7 @@ class theme_boost_o365teams_core_course_renderer extends core_course_renderer {
|
|||
* @param array $displayoptions
|
||||
* @return string
|
||||
*/
|
||||
public function course_section_cm($course, &$completioninfo, cm_info $mod, $sectionreturn, $displayoptions = array()) {
|
||||
public function course_section_cm($course, &$completioninfo, cm_info $mod, $sectionreturn, $displayoptions = []) {
|
||||
$output = '';
|
||||
// We return empty string (because course module will not be displayed at all) if
|
||||
// 1) The activity is not visible to users; and
|
||||
|
@ -114,7 +115,7 @@ class theme_boost_o365teams_core_course_renderer extends core_course_renderer {
|
|||
$output .= course_get_cm_move($mod, $sectionreturn);
|
||||
}
|
||||
|
||||
$output .= html_writer::start_tag('div', array('class' => 'mod-indent-outer'));
|
||||
$output .= html_writer::start_tag('div', ['class' => 'mod-indent-outer']);
|
||||
|
||||
// This div is used to indent the content.
|
||||
$output .= html_writer::div('', $indentclasses);
|
||||
|
@ -149,7 +150,7 @@ class theme_boost_o365teams_core_course_renderer extends core_course_renderer {
|
|||
|
||||
if (!empty($cmname)) {
|
||||
// Start the div for the activity title, excluding the edit icons.
|
||||
$output .= html_writer::start_tag('div', array('class' => 'activityinstance'));
|
||||
$output .= html_writer::start_tag('div', ['class' => 'activityinstance']);
|
||||
$output .= $cmname;
|
||||
|
||||
// Module can put text after the link (e.g. forum unread).
|
||||
|
@ -176,8 +177,10 @@ class theme_boost_o365teams_core_course_renderer extends core_course_renderer {
|
|||
$output .= html_writer::end_tag('div');
|
||||
|
||||
$output .= html_writer::end_tag('div');
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Section Name
|
||||
*
|
||||
|
@ -185,7 +188,7 @@ class theme_boost_o365teams_core_course_renderer extends core_course_renderer {
|
|||
* @param array $displayoptions
|
||||
* @return string
|
||||
*/
|
||||
public function course_section_cm_name_title(cm_info $mod, $displayoptions = array()) {
|
||||
public function course_section_cm_name_title(cm_info $mod, $displayoptions = []) {
|
||||
$output = '';
|
||||
$url = $mod->url;
|
||||
if (!$mod->is_visible_on_course_page() || !$url) {
|
||||
|
@ -200,7 +203,7 @@ class theme_boost_o365teams_core_course_renderer extends core_course_renderer {
|
|||
// includes the word forum (or Forum, etc) then it is unhelpful
|
||||
// to include that in the accessible description that is added.
|
||||
if (false !== strpos(core_text::strtolower($instancename),
|
||||
core_text::strtolower($altname))) {
|
||||
core_text::strtolower($altname))) {
|
||||
$altname = '';
|
||||
}
|
||||
// File type after name, for alphabetic lists (screen reader).
|
||||
|
@ -208,27 +211,29 @@ class theme_boost_o365teams_core_course_renderer extends core_course_renderer {
|
|||
$altname = get_accesshide(' ' . $altname);
|
||||
}
|
||||
|
||||
list($linkclasses, $textclasses) = $this->course_section_cm_classes($mod);
|
||||
[$linkclasses, $textclasses] = $this->course_section_cm_classes($mod);
|
||||
|
||||
// Get on-click attribute value if specified and decode the onclick - it
|
||||
// has already been encoded for display (puke).
|
||||
$onclick = htmlspecialchars_decode($mod->onclick, ENT_QUOTES);
|
||||
|
||||
// Display link itself.
|
||||
$activitylink = html_writer::empty_tag('img', array('src' => $mod->get_icon_url(),
|
||||
'class' => 'iconlarge activityicon', 'alt' => ' ', 'role' => 'presentation')) .
|
||||
html_writer::tag('span', $instancename . $altname, array('class' => 'instancename')) .
|
||||
html_writer::tag('span', '', array('class' => 'fa fa-external-link popupicon'));
|
||||
$activitylink = html_writer::empty_tag('img', ['src' => $mod->get_icon_url(),
|
||||
'class' => 'iconlarge activityicon', 'alt' => ' ', 'role' => 'presentation']) .
|
||||
html_writer::tag('span', $instancename . $altname, ['class' => 'instancename']) .
|
||||
html_writer::tag('span', '', ['class' => 'fa fa-external-link popupicon']);
|
||||
if ($mod->uservisible) {
|
||||
$output .= html_writer::link($url, $activitylink, array('class' => $linkclasses, 'onclick' => $onclick));
|
||||
$output .= html_writer::link($url, $activitylink, ['class' => $linkclasses, 'onclick' => $onclick]);
|
||||
} else {
|
||||
// We may be displaying this just in order to show information
|
||||
// about visibility, without the actual link ($mod->is_visible_on_course_page()).
|
||||
$output .= html_writer::tag('div', $activitylink, array('class' => $textclasses));
|
||||
$output .= html_writer::tag('div', $activitylink, ['class' => $textclasses]);
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* mod_quiz
|
||||
*
|
||||
|
@ -251,41 +256,41 @@ class theme_boost_o365teams_mod_quiz_renderer extends \mod_quiz\output\renderer
|
|||
|
||||
// Start the form.
|
||||
$output .= html_writer::start_tag('form',
|
||||
array('action' => new moodle_url($attemptobj->processattempt_url(),
|
||||
array('cmid' => $attemptobj->get_cmid())), 'method' => 'post',
|
||||
'enctype' => 'multipart/form-data', 'accept-charset' => 'utf-8',
|
||||
'id' => 'responseform'));
|
||||
['action' => new moodle_url($attemptobj->processattempt_url(),
|
||||
['cmid' => $attemptobj->get_cmid()]), 'method' => 'post',
|
||||
'enctype' => 'multipart/form-data', 'accept-charset' => 'utf-8',
|
||||
'id' => 'responseform']);
|
||||
$output .= html_writer::start_tag('div');
|
||||
|
||||
// Print all the questions.
|
||||
foreach ($slots as $slot) {
|
||||
$output .= $attemptobj->render_question($slot, false, $this,
|
||||
$attemptobj->attempt_url($slot, $page), $this);
|
||||
$attemptobj->attempt_url($slot, $page), $this);
|
||||
}
|
||||
|
||||
$navmethod = $attemptobj->get_quiz()->navmethod;
|
||||
$output .= $this->attempt_navigation_buttons_with_link($page, $attemptobj->is_last_page($page), $navmethod,
|
||||
$attemptobj->view_url());
|
||||
$attemptobj->view_url());
|
||||
|
||||
// Some hidden fields to trach what is going on.
|
||||
$output .= html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'attempt',
|
||||
'value' => $attemptobj->get_attemptid()));
|
||||
$output .= html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'thispage',
|
||||
'value' => $page, 'id' => 'followingpage'));
|
||||
$output .= html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'nextpage',
|
||||
'value' => $nextpage));
|
||||
$output .= html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'timeup',
|
||||
'value' => '0', 'id' => 'timeup'));
|
||||
$output .= html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'sesskey',
|
||||
'value' => sesskey()));
|
||||
$output .= html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'scrollpos',
|
||||
'value' => '', 'id' => 'scrollpos'));
|
||||
$output .= html_writer::empty_tag('input', ['type' => 'hidden', 'name' => 'attempt',
|
||||
'value' => $attemptobj->get_attemptid()]);
|
||||
$output .= html_writer::empty_tag('input', ['type' => 'hidden', 'name' => 'thispage',
|
||||
'value' => $page, 'id' => 'followingpage']);
|
||||
$output .= html_writer::empty_tag('input', ['type' => 'hidden', 'name' => 'nextpage',
|
||||
'value' => $nextpage]);
|
||||
$output .= html_writer::empty_tag('input', ['type' => 'hidden', 'name' => 'timeup',
|
||||
'value' => '0', 'id' => 'timeup']);
|
||||
$output .= html_writer::empty_tag('input', ['type' => 'hidden', 'name' => 'sesskey',
|
||||
'value' => sesskey()]);
|
||||
$output .= html_writer::empty_tag('input', ['type' => 'hidden', 'name' => 'scrollpos',
|
||||
'value' => '', 'id' => 'scrollpos']);
|
||||
|
||||
// Add a hidden field with questionids. Do this at the end of the form, so
|
||||
// if you navigate before the form has finished loading, it does not wipe all
|
||||
// the student's answers.
|
||||
$output .= html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'slots',
|
||||
'value' => implode(',', $attemptobj->get_active_slots($page))));
|
||||
$output .= html_writer::empty_tag('input', ['type' => 'hidden', 'name' => 'slots',
|
||||
'value' => implode(',', $attemptobj->get_active_slots($page))]);
|
||||
|
||||
// Finish the form.
|
||||
$output .= html_writer::end_tag('div');
|
||||
|
@ -311,27 +316,28 @@ class theme_boost_o365teams_mod_quiz_renderer extends \mod_quiz\output\renderer
|
|||
protected function attempt_navigation_buttons_with_link($page, $lastpage, $navmethod = 'free', $viewurl = null) {
|
||||
$output = '';
|
||||
|
||||
$output .= html_writer::start_tag('div', array('class' => 'submitbtns submitbtns_with_return'));
|
||||
$output .= html_writer::start_tag('div', ['class' => 'submitbtns submitbtns_with_return']);
|
||||
if ($page > 0 && $navmethod == 'free') {
|
||||
$output .= html_writer::empty_tag('input', array('type' => 'submit', 'name' => 'previous',
|
||||
'value' => get_string('navigateprevious', 'quiz'), 'class' => 'mod_quiz-prev-nav btn btn-secondary'));
|
||||
$output .= html_writer::empty_tag('input', ['type' => 'submit', 'name' => 'previous',
|
||||
'value' => get_string('navigateprevious', 'quiz'), 'class' => 'mod_quiz-prev-nav btn btn-secondary']);
|
||||
}
|
||||
if ($lastpage) {
|
||||
$nextlabel = get_string('endtest', 'quiz');
|
||||
} else {
|
||||
$nextlabel = get_string('navigatenext', 'quiz');
|
||||
}
|
||||
$output .= html_writer::empty_tag('input', array('type' => 'submit', 'name' => 'next',
|
||||
'value' => $nextlabel, 'class' => 'mod_quiz-next-nav btn btn-primary'));
|
||||
$output .= html_writer::empty_tag('input', ['type' => 'submit', 'name' => 'next',
|
||||
'value' => $nextlabel, 'class' => 'mod_quiz-next-nav btn btn-primary']);
|
||||
if ($viewurl) {
|
||||
// Return button.
|
||||
$output .= html_writer::link($viewurl, get_string('navigatereturn', 'theme_boost_o365teams'),
|
||||
array('class' => 'btn btn-secondary mod_quiz-return-nav'));
|
||||
['class' => 'btn btn-secondary mod_quiz-return-nav']);
|
||||
}
|
||||
$output .= html_writer::end_tag('div');
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* No Question message
|
||||
*
|
||||
|
@ -343,7 +349,7 @@ class theme_boost_o365teams_mod_quiz_renderer extends \mod_quiz\output\renderer
|
|||
$output = '';
|
||||
$output .= $this->notification(get_string('noquestions', 'quiz'));
|
||||
if ($canedit) {
|
||||
$output .= $this->single_button($editurl, get_string('editquiz', 'quiz'), 'get', array("primary" => true));
|
||||
$output .= $this->single_button($editurl, get_string('editquiz', 'quiz'), 'get', ["primary" => true]);
|
||||
}
|
||||
|
||||
return $output;
|
||||
|
|
139
style/custom.css
139
style/custom.css
|
@ -32,15 +32,19 @@
|
|||
font-weight: 600;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "Segoe UI","Helvetica Neue","Apple Color Emoji","Segoe UI Emoji",Helvetica,Arial,sans-serif;
|
||||
font-family: "Segoe UI", "Helvetica Neue", "Apple Color Emoji", "Segoe UI Emoji", Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
div.felement select option {
|
||||
font-family: "Segoe UI","Helvetica Neue","Apple Color Emoji","Segoe UI Emoji",Helvetica,Arial,sans-serif;
|
||||
font-family: "Segoe UI", "Helvetica Neue", "Apple Color Emoji", "Segoe UI Emoji", Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
form .felement input {
|
||||
font-family: "Segoe UI","Helvetica Neue","Apple Color Emoji","Segoe UI Emoji",Helvetica,Arial,sans-serif;
|
||||
font-family: "Segoe UI", "Helvetica Neue", "Apple Color Emoji", "Segoe UI Emoji", Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
/* topics format START */
|
||||
.format-topics.path-course-view .completionprogress {
|
||||
float: left;
|
||||
|
@ -69,7 +73,8 @@ form .felement input {
|
|||
.format-topics .availabilityinfo.ishidden {
|
||||
display: none;
|
||||
}
|
||||
/*topics format END */
|
||||
/* topics format END */
|
||||
|
||||
/* weeks format START */
|
||||
.format-weeks.path-course-view .completionprogress {
|
||||
float: left;
|
||||
|
@ -90,7 +95,7 @@ form .felement input {
|
|||
font-size: 1em;
|
||||
}
|
||||
.format-weeks .course-content .current::before {
|
||||
border: 0px;
|
||||
border: 0;
|
||||
}
|
||||
.format-weeks .section_availability .ishidden {
|
||||
padding-left: 32px;
|
||||
|
@ -99,12 +104,13 @@ form .felement input {
|
|||
display: none;
|
||||
}
|
||||
/* weeks format END */
|
||||
|
||||
/* collapsable topics format START */
|
||||
.format-collapsibletopics.path-course-view .completionprogress {
|
||||
float: left;
|
||||
}
|
||||
.course-content ul.collapsibletopics li.section ul.section {
|
||||
padding-left: 0px;
|
||||
padding-left: 0;
|
||||
}
|
||||
.format-collapsibletopics .section .activity {
|
||||
background-color: #fff;
|
||||
|
@ -140,26 +146,17 @@ form .felement input {
|
|||
.format-collapsibletopics .course-content ul.collapsibletopics .sectiontoggle.collapsed ~ .section-summary-activities {
|
||||
padding-left: 20px;
|
||||
}
|
||||
/*.format-collapsibletopics .course-content ul.collapsibletopics .sectiontoggle ~ .section-summary-activities,*/
|
||||
/*.format-collapsibletopics .course-content ul.collapsibletopics .sectiontoggle.collapsed ~ .section-summary-activities{*/
|
||||
/*display: none;*/
|
||||
/*}*/
|
||||
.format-collapsibletopics .availabilityinfo.ishidden {
|
||||
display: none;
|
||||
}
|
||||
/*.format-collapsibletopics .expandall {*/
|
||||
/*display: none;*/
|
||||
/*}*/
|
||||
/*.format-collapsibletopics #completionprogressid {*/
|
||||
/*display: none;*/
|
||||
/*}*/
|
||||
/* collapsable topics format END */
|
||||
|
||||
/* collapsable weeks format START */
|
||||
.format-collapsibleweeks.path-course-view .completionprogress {
|
||||
float: left;
|
||||
}
|
||||
.course-content ul.collapsibleweeks li.section ul.section {
|
||||
padding-left: 0px;
|
||||
padding-left: 0;
|
||||
}
|
||||
.format-collapsibleweeks .section .activity {
|
||||
background-color: #fff;
|
||||
|
@ -199,20 +196,11 @@ form .felement input {
|
|||
.format-collapsibleweeks .course-content ul.collapsibleweeks .sectiontoggle.collapsed ~ .section-summary-activities {
|
||||
padding-left: 20px;
|
||||
}
|
||||
/*.format-collapsibleweeks .course-content ul.collapsibleweeks .sectiontoggle ~ .section-summary-activities,*/
|
||||
/*.format-collapsibleweeks .course-content ul.collapsibleweeks .sectiontoggle.collapsed ~ .section-summary-activities{*/
|
||||
/*display: none;*/
|
||||
/*}*/
|
||||
/*.format-collapsibleweeks .expandall {*/
|
||||
/*display: none;*/
|
||||
/*}*/
|
||||
/*.format-collapsibleweeks #completionprogressid {*/
|
||||
/*display: none;*/
|
||||
/*}*/
|
||||
.format-collapsibleweeks .availabilityinfo.ishidden {
|
||||
display: none;
|
||||
}
|
||||
/* collapsable weeks format END */
|
||||
|
||||
/* multi-page topics format START */
|
||||
/* main page */
|
||||
.format-topics .course-content .section-summary {
|
||||
|
@ -221,9 +209,6 @@ form .felement input {
|
|||
.format-topics .course-content .topics .section-summary .section-title {
|
||||
margin: 0;
|
||||
}
|
||||
/*.format-topics .course-content ul.topics .section-summary-activities {*/
|
||||
/*display: none;*/
|
||||
/*}*/
|
||||
/* section page */
|
||||
.format-topics .single-section h3.sectionname {
|
||||
text-align: unset;
|
||||
|
@ -244,10 +229,6 @@ form .felement input {
|
|||
.format-weeks .course-content .weeks .section-summary .section-title {
|
||||
margin: 0;
|
||||
}
|
||||
/*.format-weeks .course-content ul.weeks .section-summary-activities {*/
|
||||
/*display: none;*/
|
||||
/*}*/
|
||||
/* section page */
|
||||
.format-weeks .single-section h3.sectionname {
|
||||
text-align: unset;
|
||||
font-size: 1em;
|
||||
|
@ -262,13 +243,6 @@ form .felement input {
|
|||
#page-course-view-weeks .navigationtitle .mdl-right {
|
||||
display: none;
|
||||
}
|
||||
/*.format-weeks .course-content .single-section .section-navigation .mdl-right,*/
|
||||
/*.format-weeks .course-content .single-section .section-navigation .mdl-left {*/
|
||||
/*display:none;*/
|
||||
/*}*/
|
||||
/*.format-weeks #sectionmenu {*/
|
||||
/*display: none;*/
|
||||
/*}*/
|
||||
.format-weeks .availabilityinfo.ishidden {
|
||||
display: none;
|
||||
}
|
||||
|
@ -310,26 +284,25 @@ body .back_course_main {
|
|||
text-decoration: none;
|
||||
}
|
||||
|
||||
@media (max-width:800px) {
|
||||
@media (max-width: 800px) {
|
||||
body #course_page_title {
|
||||
font-size: 21px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:640px) {
|
||||
@media (max-width: 640px) {
|
||||
body #course_page_title {
|
||||
font-size: 17px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:550px) {
|
||||
@media (max-width: 550px) {
|
||||
body #course_page_title {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
/* header END */
|
||||
|
||||
|
||||
/* Section page START */
|
||||
.section-summary-activities {
|
||||
text-align: left;
|
||||
|
@ -337,7 +310,6 @@ body .back_course_main {
|
|||
}
|
||||
/* Section page END */
|
||||
|
||||
|
||||
/*!* all course formats START *!*/
|
||||
.card-body {
|
||||
background-color: #f3f2f1;
|
||||
|
@ -400,7 +372,7 @@ body.theme_contrast {
|
|||
padding-right: 15px;
|
||||
}
|
||||
.form-group div[data-fieldtype="filemanager"] {
|
||||
padding-right: 0px;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.course-content ul li.section.main {
|
||||
|
@ -411,8 +383,8 @@ body.theme_contrast {
|
|||
}
|
||||
|
||||
.row {
|
||||
margin-right: 0px;
|
||||
margin-left: 0px;
|
||||
margin-right: 0;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
a,
|
||||
|
@ -423,7 +395,7 @@ a,
|
|||
color: #6264a7;
|
||||
}
|
||||
.theme_contrast a {
|
||||
color: #ffff00;
|
||||
color: #ff0;
|
||||
}
|
||||
/* course body END */
|
||||
|
||||
|
@ -471,7 +443,7 @@ a,
|
|||
color: gold;
|
||||
height: 60px;
|
||||
position: fixed;
|
||||
bottom: 0px;
|
||||
bottom: 0;
|
||||
background-color: #f3f2f1;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
|
@ -510,19 +482,19 @@ a.feedbacklink {
|
|||
color: #c8c6c4;
|
||||
}
|
||||
.theme_contrast a.feedbacklink {
|
||||
color: #ffff00;
|
||||
color: #ff0;
|
||||
}
|
||||
.fa-lightbulb-o {
|
||||
font-family: "FontAwesome" !important;
|
||||
font-size: 15px !important;
|
||||
border-radius: 5px !important;
|
||||
font-family: "FontAwesome";
|
||||
font-size: 15px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.fa-lightbulb-o:before {
|
||||
padding: 5px;
|
||||
}
|
||||
/* footer END */
|
||||
/* popup icon START */
|
||||
|
||||
/* popup icon START */
|
||||
.modtype_assign .popupicon,
|
||||
.modtype_quiz .popupicon {
|
||||
display: none;
|
||||
|
@ -540,11 +512,11 @@ button {
|
|||
letter-spacing: normal;
|
||||
word-spacing: normal;
|
||||
text-transform: none;
|
||||
text-indent: 0px;
|
||||
text-indent: 0;
|
||||
text-shadow: none;
|
||||
display: inline-block;
|
||||
text-align: start;
|
||||
margin: 0em;
|
||||
margin: 0;
|
||||
font: 400 13.3333px Arial;
|
||||
}
|
||||
|
||||
|
@ -563,8 +535,8 @@ button {
|
|||
min-width: 6rem;
|
||||
padding: 0.25rem;
|
||||
white-space: nowrap;
|
||||
-webkit-box-shadow: unset !important;
|
||||
box-shadow: unset !important;
|
||||
-webkit-box-shadow: unset;
|
||||
box-shadow: unset;
|
||||
}
|
||||
/* secondary button :active*/
|
||||
.btn-secondary:not(:disabled):not(.disabled):active {
|
||||
|
@ -575,7 +547,7 @@ button {
|
|||
/* secondary button :hover*/
|
||||
.btn-secondary:hover,
|
||||
.btn-secondary:focus:enabled {
|
||||
background: rgb(200,200,200);
|
||||
background: rgb(200, 200, 200);
|
||||
border-color: transparent;
|
||||
color: #000;
|
||||
}
|
||||
|
@ -619,8 +591,8 @@ div.disabled .btn-secondary {
|
|||
min-width: 6rem;
|
||||
padding: 0.25rem;
|
||||
white-space: nowrap;
|
||||
-webkit-box-shadow: unset !important;
|
||||
box-shadow: unset !important;
|
||||
-webkit-box-shadow: unset;
|
||||
box-shadow: unset;
|
||||
color: #fff;
|
||||
}
|
||||
/* primary button :active*/
|
||||
|
@ -631,17 +603,15 @@ div.disabled .btn-secondary {
|
|||
color: #201f1f;
|
||||
}
|
||||
/* primary button :hover*/
|
||||
.btn-primary:hover, .btn-primary:focus:enabled,
|
||||
.btn-default:hover, .btn-default:focus:enabled {
|
||||
.btn-primary:hover,
|
||||
.btn-primary:focus:enabled,
|
||||
.btn-default:hover,
|
||||
.btn-default:focus:enabled {
|
||||
background: #464775;
|
||||
border-color: transparent;
|
||||
color: #fff;
|
||||
}
|
||||
/* primary button :focus*/
|
||||
.btn-primary:focus, .btn-primary:focus:enabled,
|
||||
.btn-default:focus, .btn-default:focus:enabled {
|
||||
}
|
||||
|
||||
body {
|
||||
display: none;
|
||||
}
|
||||
|
@ -689,7 +659,7 @@ ul {
|
|||
content: none;
|
||||
}
|
||||
#page-wrapper {
|
||||
margin-bottom: 50px !important;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
/*!* modules START *!*/
|
||||
|
@ -701,9 +671,6 @@ ul {
|
|||
#prev-activity-link {
|
||||
margin-left: 33px;
|
||||
}
|
||||
/*.editsubmissionform .col-md-3 {*/
|
||||
/*display: none;*/
|
||||
/*}*/
|
||||
.editsubmissionform .form-group {
|
||||
margin-left: -15px;
|
||||
}
|
||||
|
@ -752,7 +719,6 @@ table#permissions tbody tr:hover {
|
|||
}
|
||||
/* Assignment Module END */
|
||||
|
||||
|
||||
/* Quiz Module START */
|
||||
#page-mod-quiz-attempt .card div[role="main"],
|
||||
#page-mod-quiz-view .card div[role="main"] {
|
||||
|
@ -762,20 +728,9 @@ table#permissions tbody tr:hover {
|
|||
display: inline-block;
|
||||
margin-left: 3px;
|
||||
}
|
||||
/* Quiz Module END */
|
||||
/*!* modules END *!*/
|
||||
|
||||
|
||||
.m-t-2, .m-b-1 {
|
||||
padding-top: 25px;
|
||||
}
|
||||
|
||||
.section .activity .availabilityinfo, .section .activity .contentafterlink {
|
||||
padding-right: 30px;
|
||||
}
|
||||
|
||||
.submitbtns_with_return {
|
||||
text-align: center !important;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mod_quiz-prev-nav {
|
||||
|
@ -785,3 +740,15 @@ table#permissions tbody tr:hover {
|
|||
.mod_quiz-return-nav {
|
||||
margin: 0 auto;
|
||||
}
|
||||
/* Quiz Module END */
|
||||
/*!* modules END *!*/
|
||||
|
||||
.m-t-2,
|
||||
.m-b-1 {
|
||||
padding-top: 25px;
|
||||
}
|
||||
|
||||
.section .activity .availabilityinfo,
|
||||
.section .activity .contentafterlink {
|
||||
padding-right: 30px;
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
"hasregionmainsettingsmenu": false
|
||||
}
|
||||
}}
|
||||
{{> theme_boost/head }}
|
||||
{{> theme_boost_o365teams/head }}
|
||||
|
||||
<body {{{ bodyattributes }}}>
|
||||
|
||||
|
@ -65,9 +65,9 @@
|
|||
<div id="page-content" class="row">
|
||||
<div id="region-main-box" class="col-12">
|
||||
{{#hasregionmainsettingsmenu}}
|
||||
<div id="region-main-settings-menu" class="d-print-none {{#hasblocks}}has-blocks{{/hasblocks}}">
|
||||
<div> {{{ output.region_main_settings_menu }}} </div>
|
||||
</div>
|
||||
<div id="region-main-settings-menu" class="d-print-none {{#hasblocks}}has-blocks{{/hasblocks}}">
|
||||
<div> {{{ output.region_main_settings_menu }}} </div>
|
||||
</div>
|
||||
{{/hasregionmainsettingsmenu}}
|
||||
<section id="region-main" {{#hasblocks}}class="has-blocks mb-3"{{/hasblocks}}>
|
||||
<div class="card">
|
||||
|
@ -76,21 +76,21 @@
|
|||
<div class="region_main_settings_menu_proxy"></div>
|
||||
{{/hasregionmainsettingsmenu}}
|
||||
{{#is_course_overview}}
|
||||
{{{ output.course_content_header }}}
|
||||
<span class="back">
|
||||
<div id="course_page_title">
|
||||
<div class="back_course_main"><a href="{{{course_page}}}">< Course Overview</a></div>
|
||||
<div class="page_title"><a href="{{{ course_page }}}">{{{ output.page_title }}}</a></div>
|
||||
</div>
|
||||
</span>
|
||||
{{{ output.course_content_header }}}
|
||||
<div class="back">
|
||||
<div id="course_page_title">
|
||||
<div class="back_course_main"><a href="{{{course_page}}}">< Course Overview</a></div>
|
||||
<div class="page_title"><a href="{{{ course_page }}}">{{{ output.page_title }}}</a></div>
|
||||
</div>
|
||||
</div>
|
||||
{{/is_course_overview}}
|
||||
{{^is_course_overview}}
|
||||
{{{ output.course_content_header }}}
|
||||
<span class="no_back">
|
||||
<div id="course_page_title">
|
||||
<div class="page_title"><a href="{{{ course_page }}}">{{{ output.page_title }}}</a></div>
|
||||
</div>
|
||||
</span>
|
||||
{{{ output.course_content_header }}}
|
||||
<div class="no_back">
|
||||
<div id="course_page_title">
|
||||
<div class="page_title"><a href="{{{ course_page }}}">{{{ output.page_title }}}</a></div>
|
||||
</div>
|
||||
</div>
|
||||
{{/is_course_overview}}
|
||||
{{{ output.main_content }}}
|
||||
{{{ output.activity_navigation }}}
|
||||
|
@ -99,9 +99,9 @@
|
|||
</div>
|
||||
</section>
|
||||
{{#hasblocks}}
|
||||
<section data-region="blocks-column" class="d-print-none">
|
||||
{{{ sidepreblocks }}}
|
||||
</section>
|
||||
<section data-region="blocks-column" class="d-print-none">
|
||||
{{{ sidepreblocks }}}
|
||||
</section>
|
||||
{{/hasblocks}}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -124,14 +124,14 @@
|
|||
</body>
|
||||
</html>
|
||||
{{#js}}
|
||||
require(['theme_boost/loader']);
|
||||
require(['theme_boost/drawer'], function(mod) {
|
||||
require(['theme_boost/loader']);
|
||||
require(['theme_boost/drawer'], function(mod) {
|
||||
mod.init();
|
||||
});
|
||||
require(['theme_boost_o365teams/iframeChecker'], function(iframeChecker) {
|
||||
});
|
||||
require(['theme_boost_o365teams/iframeChecker'], function(iframeChecker) {
|
||||
iframeChecker.init();
|
||||
});
|
||||
require(['theme_boost_o365teams/teamsThemeChecker'], function(teamsThemeChecker) {
|
||||
});
|
||||
require(['theme_boost_o365teams/teamsThemeChecker'], function(teamsThemeChecker) {
|
||||
teamsThemeChecker.init();
|
||||
});
|
||||
});
|
||||
{{/js}}
|
||||
|
|
|
@ -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 theme_boost_o365teams/head
|
||||
|
||||
Page header.
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"output": {
|
||||
"doctype": "<!DOCTYPE html>",
|
||||
"page_title": "Test page",
|
||||
"favicon": "favicon.ico",
|
||||
"standard_head_html": "<link rel=\"stylesheet\" type=\"text/css\" href=\"styles.css\" />"
|
||||
}
|
||||
}
|
||||
}}
|
||||
{{{ output.doctype }}}
|
||||
<html {{{ output.htmlattributes }}}>
|
||||
<head>
|
||||
<title>{{{ output.page_title }}}</title>
|
||||
<link rel="shortcut icon" href="{{{ output.favicon }}}" />
|
||||
{{{ output.standard_head_html }}}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<script src="https://statics.teams.microsoft.com/sdk/v1.0/js/MicrosoftTeams.min.js" crossorigin="anonymous"></script>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
microsoftTeams.initialize();
|
||||
//]]>
|
||||
</script>
|
||||
</head>
|
|
@ -29,14 +29,7 @@
|
|||
}
|
||||
}
|
||||
}}
|
||||
{{> theme_boost/head }}
|
||||
|
||||
<script src="https://statics.teams.microsoft.com/sdk/v1.0/js/MicrosoftTeams.min.js" crossorigin="anonymous"></script>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
microsoftTeams.initialize();
|
||||
//]]>
|
||||
</script>
|
||||
{{> theme_boost_o365teams/head }}
|
||||
|
||||
<body {{{ bodyattributes }}}>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче