Browse Source

Atualização a partir do boost da versão 3.11

SABERES_311_STABLE
Matheus Garcia 3 years ago
parent
commit
079d14fcbb
  1. 2
      classes/autoprefixer.php
  2. 50
      classes/output/block_settings_renderer.php
  3. 52
      classes/output/core/admin_renderer.php
  4. 81
      classes/output/core/course_renderer.php
  5. 140
      classes/output/core/files_renderer.php
  6. 58
      classes/output/core_question/bank_renderer.php
  7. 687
      classes/output/core_renderer.php
  8. 197
      classes/output/core_renderer_maintenance.php
  9. 44
      classes/output/gradereport_history_renderer.php
  10. 46
      classes/privacy/provider.php
  11. 165
      config.php
  12. BIN
      js/apple-touch-icon-114x114.png?v=OmmK4dNQkX
  13. BIN
      js/apple-touch-icon-120x120.png?v=OmmK4dNQkX
  14. BIN
      js/apple-touch-icon-144x144.png?v=OmmK4dNQkX
  15. BIN
      js/apple-touch-icon-152x152.png?v=OmmK4dNQkX
  16. BIN
      js/apple-touch-icon-180x180.png?v=OmmK4dNQkX
  17. BIN
      js/apple-touch-icon-57x57.png?v=OmmK4dNQkX
  18. BIN
      js/apple-touch-icon-60x60.png?v=OmmK4dNQkX
  19. BIN
      js/apple-touch-icon-72x72.png?v=OmmK4dNQkX
  20. BIN
      js/apple-touch-icon-76x76.png?v=OmmK4dNQkX
  21. 48
      js/audio.min.js
  22. 35
      js/audiojs-doc-ready.js
  23. 2381
      js/base-cachekey3894.css
  24. 25
      js/collapse-image.js
  25. 10253
      js/jquery.js
  26. 2
      js/jquery.lazyload.min.js
  27. 11
      js/manifest.json?v=697oma3x8q
  28. 169
      js/resourceconfigbootstrapbootstrap.min-cachekey1567.js
  29. 335
      js/resourceconfigjqueryjquery-1.11.2.min-cachekey3986.js
  30. 2208
      js/resourcesenado.jqueryjquery-cachekey5865.js
  31. 85
      js/resourcestaticjscalendario-cachekey4269.js
  32. 68
      js/resourcestaticjsphoto-gallery-cachekey3318.js
  33. 22
      js/root_index.js
  34. 17
      js/sanfona.js
  35. 13
      js/tabs.js
  36. 57
      js/youtubeEvents.js
  37. 12
      lang/en/theme_ilb.php
  38. 11
      layout/columns1.php
  39. 19
      layout/columns2.php
  40. 14
      layout/embedded.php
  41. 108
      layout/frontpage_ilb.php
  42. 11
      layout/login.php
  43. 36
      layout/login_nova_conta.php
  44. 6
      layout/maintenance.php
  45. 6
      layout/secure.php
  46. 186
      lib.php
  47. BIN
      pix/Cursos-on-line-sem-tutor.png
  48. BIN
      pix/Cursos-on-line-sem-tutor_BACKUP_25256.png
  49. 0
      pix/Cursos-on-line-sem-tutor_BASE_25256.png
  50. BIN
      pix/Cursos-on-line-sem-tutor_LOCAL_25256.png
  51. BIN
      pix/Cursos-on-line-sem-tutor_REMOTE_25256.png
  52. BIN
      pix/Cursos-on-line.png
  53. BIN
      pix/aviso_saberes_offline.png
  54. BIN
      pix/conheca-senado.png
  55. BIN
      pix/favicon.ico
  56. BIN
      pix/formacao_interna.png
  57. BIN
      pix/fundo-c.png
  58. BIN
      pix/hand.png
  59. BIN
      pix/icon_ContatoEmail-azul.png
  60. BIN
      pix/icon_ContatoFone-azul.png
  61. BIN
      pix/logo_saberes_xl.png
  62. BIN
      pix/matricula_aberta.png
  63. BIN
      pix/matricula_aberta_verde.png
  64. BIN
      pix/matricula_encerrada.png
  65. BIN
      pix/matricula_encerrada_vermelho.png
  66. BIN
      pix/oficinas-interlegis.png
  67. BIN
      pix/pos-graduacao.png
  68. BIN
      pix/projetos_especiais.png
  69. BIN
      pix/screenshot.png
  70. BIN
      pix/smarts/bg_atencao_9bl_curso.png
  71. BIN
      pix/smarts/bg_atencao_9br_curso.png
  72. BIN
      pix/smarts/bg_atencao_9l_curso.png
  73. BIN
      pix/smarts/bg_atencao_9meio_curso.png
  74. BIN
      pix/smarts/bg_atencao_9r_curso.png
  75. BIN
      pix/smarts/bg_atencao_9tl_curso.png
  76. BIN
      pix/smarts/bg_atencao_9tr_curso.png
  77. BIN
      pix/smarts/bg_atividade_9bl_curso.png
  78. BIN
      pix/smarts/bg_atividade_9br_curso.png
  79. BIN
      pix/smarts/bg_atividade_9l_curso.png
  80. BIN
      pix/smarts/bg_atividade_9meio_curso.png
  81. BIN
      pix/smarts/bg_atividade_9r_curso.png
  82. BIN
      pix/smarts/bg_atividade_9tl_curso.png
  83. BIN
      pix/smarts/bg_atividade_9tr_curso.png
  84. BIN
      pix/smarts/bg_conceito_9bl_curso.png
  85. BIN
      pix/smarts/bg_conceito_9br_curso.png
  86. BIN
      pix/smarts/bg_conceito_9l_curso.png
  87. BIN
      pix/smarts/bg_conceito_9meio_curso.png
  88. BIN
      pix/smarts/bg_conceito_9r_curso.png
  89. BIN
      pix/smarts/bg_conceito_9tl_curso.png
  90. BIN
      pix/smarts/bg_conceito_9tr_curso.png
  91. BIN
      pix/smarts/bg_curiosidade_9bl_curso.png
  92. BIN
      pix/smarts/bg_curiosidade_9br_curso.png
  93. BIN
      pix/smarts/bg_curiosidade_9l_curso.png
  94. BIN
      pix/smarts/bg_curiosidade_9meio_curso.png
  95. BIN
      pix/smarts/bg_curiosidade_9r_curso.png
  96. BIN
      pix/smarts/bg_curiosidade_9tl_curso.png
  97. BIN
      pix/smarts/bg_curiosidade_9tr_curso.png
  98. BIN
      pix/smarts/bg_dica_9bl_curso.png
  99. BIN
      pix/smarts/bg_dica_9br_curso.png
  100. BIN
      pix/smarts/bg_dica_9l_curso.png

2
classes/autoprefixer.php

@ -104,6 +104,8 @@ class autoprefixer {
* @param Document $tree The CSS tree.
*/
public function __construct(Document $tree) {
debugging('theme_boost\autoprefixer() is deprecated. Required prefixes for Bootstrap ' .
'are now in theme/boost/scss/moodle/prefixes.scss', DEBUG_DEVELOPER);
$this->tree = $tree;
$pseudos = array_map(function($pseudo) {

50
classes/output/block_settings_renderer.php

@ -1,50 +0,0 @@
<?php
// 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/>.
/**
* Overriden block settings renderer.
*
* @package theme_boost
* @copyright 2016 Frédéric Massart - FMCorz.net
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace theme_boost\output;
defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot . '/blocks/settings/renderer.php');
use moodle_url;
/**
* Overriden block settings renderer.
*
* @package theme_boost
* @copyright 2016 Frédéric Massart - FMCorz.net
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class block_settings_renderer extends \block_settings_renderer {
public function search_form(moodle_url $formtarget, $searchvalue) {
$data = [
'action' => $formtarget->out(false),
'label' => get_string('searchinsettings', 'admin'),
'searchvalue' => $searchvalue
];
return $this->render_from_template('block_settings/search_form', $data);
}
}

52
classes/output/core/admin_renderer.php

@ -1,52 +0,0 @@
<?php
// 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/>.
/**
* Admin renderer.
*
* @package theme_noanme
* @copyright 2016 Frédéric Massart - FMCorz.net
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace theme_boost\output\core;
defined('MOODLE_INTERNAL') || die();
use moodle_url;
require_once($CFG->dirroot . '/' . $CFG->admin . '/renderer.php');
/**
* Admin renderer class.
*
* @package theme_noanme
* @copyright 2016 Frédéric Massart - FMCorz.net
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class admin_renderer extends \core_admin_renderer {
/**
* Output a warning message.
*
* @param string $message the message to display.
* @param string $type type class
* @return string HTML to output.
*/
protected function warning($message, $type = 'warning') {
return $this->box($message, 'generalbox m-b-1 admin' . $type);
}
}

81
classes/output/core/course_renderer.php

@ -1,81 +0,0 @@
<?php
// 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/>.
/**
* Course renderer.
*
* @package theme_noanme
* @copyright 2016 Frédéric Massart - FMCorz.net
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace theme_boost\output\core;
defined('MOODLE_INTERNAL') || die();
use moodle_url;
require_once($CFG->dirroot . '/course/renderer.php');
/**
* Course renderer class.
*
* @package theme_noanme
* @copyright 2016 Frédéric Massart - FMCorz.net
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class course_renderer extends \core_course_renderer {
/**
* Renders html to display a course search form.
*
* @param string $value default value to populate the search field
* @param string $format display format - 'plain' (default), 'short' or 'navbar'
* @return string
*/
public function course_search_form($value = '', $format = 'plain') {
static $count = 0;
$formid = 'coursesearch';
if ((++$count) > 1) {
$formid .= $count;
}
switch ($format) {
case 'navbar' :
$formid = 'coursesearchnavbar';
$inputid = 'navsearchbox';
$inputsize = 20;
break;
case 'short' :
$inputid = 'shortsearchbox';
$inputsize = 12;
break;
default :
$inputid = 'coursesearchbox';
$inputsize = 30;
}
$data = (object) [
'searchurl' => (new moodle_url('/course/search.php'))->out(false),
'id' => $formid,
'inputid' => $inputid,
'inputsize' => $inputsize,
'value' => $value
];
return $this->render_from_template('theme_boost/course_search_form', $data);
}
}

140
classes/output/core/files_renderer.php

@ -1,140 +0,0 @@
<?php
// 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/>.
namespace theme_boost\output\core;
use plugin_renderer_base;
defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot . '/files/renderer.php');
/**
* Rendering of files viewer related widgets.
* @package theme_boost
* @copyright 2016 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Rendering of files viewer related widgets.
* @package theme_boost
* @copyright 2016 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class files_renderer extends \core_files_renderer {
/**
* FileManager JS template for window with file information/actions.
*
*/
protected function fm_js_template_fileselectlayout() {
$context = [
'helpicon' => $this->help_icon('setmainfile', 'repository')
];
return $this->render_from_template('core/filemanager_fileselect', $context);
}
/**
* FileManager JS template for popup confirm dialogue window.
*
* @return string
*/
protected function fm_js_template_confirmdialog() {
return $this->render_from_template('core/filemanager_confirmdialog', []);
}
/**
* Template for FilePicker with general layout (not QuickUpload).
*
*
* @return string
*/
protected function fp_js_template_generallayout() {
return $this->render_from_template('core/filemanager_modal_generallayout', []);
}
/**
* Returns html for displaying one file manager
*
* @param form_filemanager $fm
* @return string
*/
protected function fm_print_generallayout($fm) {
$context = [
'client_id' => $fm->options->client_id,
'helpicon' => $this->help_icon('setmainfile', 'repository'),
'restrictions' => $this->fm_print_restrictions($fm)
];
return $this->render_from_template('core/filemanager_page_generallayout', $context);
}
/**
* Returns HTML for default repository searchform to be passed to Filepicker
*
* This will be used as contents for search form defined in generallayout template
* (form with id {TOOLSEARCHID}).
* Default contents is one text input field with name="s"
*/
public function repository_default_searchform() {
return $this->render_from_template('core/filemanager_default_searchform', []);
}
/**
* FilePicker JS template for 'Upload file' repository
*
* @return string
*/
protected function fp_js_template_uploadform() {
return $this->render_from_template('core/filemanager_uploadform', []);
}
/**
* FilePicker JS template for repository login form including templates for each element type
*
* @return string
*/
protected function fp_js_template_loginform() {
return $this->render_from_template('core/filemanager_loginform', []);
}
/**
* FilePicker JS template for window appearing to select a file.
*
* @return string
*/
protected function fp_js_template_selectlayout() {
return $this->render_from_template('core/filemanager_selectlayout', []);
}
/**
* FilePicker JS template for popup dialogue window asking for action when file with the same name already exists
* (multiple-file version).
*
* @return string
*/
protected function fp_js_template_processexistingfilemultiple() {
return $this->render_from_template('core/filemanager_processexistingfilemultiple', []);
}
/**
* FilePicker JS template for popup dialogue window asking for action when file with the same name already exists.
*
* @return string
*/
protected function fp_js_template_processexistingfile() {
return $this->render_from_template('core/filemanager_processexistingfile', []);
}
}

58
classes/output/core_question/bank_renderer.php

@ -1,58 +0,0 @@
<?php
// 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/>.
/**
* Question renderer.
*
* @package theme_boost
* @copyright 2017 onwards Ankit Agarwal <ankit.agrr@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace theme_boost\output\core_question;
defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot . '/' . $CFG->admin . '/renderer.php');
/**
* Question renderer class.
*
* @package theme_boost
* @copyright 2017 onwards Ankit Agarwal <ankit.agrr@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class bank_renderer extends \core_question_bank_renderer {
/**
* Display additional navigation if needed.
*
* @return string
*/
public function extra_horizontal_navigation() {
// Horizontal navigation for question bank.
if ($questionnode = $this->page->settingsnav->find("questionbank", \navigation_node::TYPE_CONTAINER)) {
if ($children = $questionnode->children) {
$tabs = [];
foreach ($children as $key => $node) {
$tabs[] = new \tabobject($node->key, $node->action, $node->text);
}
$active = $questionnode->find_active_node()->key;
return \html_writer::div(print_tabs([$tabs], $active, null, null, true), 'questionbank-navigation');
}
}
return '';
}
}

687
classes/output/core_renderer.php

@ -16,24 +16,7 @@
namespace theme_boost\output;
use coding_exception;
use html_writer;
use tabobject;
use tabtree;
use custom_menu_item;
use custom_menu;
use block_contents;
use navigation_node;
use action_link;
use stdClass;
use moodle_url;
use preferences_groups;
use action_menu;
use help_icon;
use single_button;
use paging_bar;
use context_course;
use pix_icon;
defined('MOODLE_INTERNAL') || die;
@ -44,673 +27,19 @@ defined('MOODLE_INTERNAL') || die;
* @copyright 2012 Bas Brands, www.basbrands.nl
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class core_renderer extends \core_renderer {
/** @var custom_menu_item language The language menu if created */
protected $language = null;
/**
* Outputs the opening section of a box.
*
* @param string $classes A space-separated list of CSS classes
* @param string $id An optional ID
* @param array $attributes An array of other attributes to give the box.
* @return string the HTML to output.
*/
public function box_start($classes = 'generalbox', $id = null, $attributes = array()) {
if (is_array($classes)) {
$classes = implode(' ', $classes);
}
return parent::box_start($classes . ' p-y-1', $id, $attributes);
}
/**
* Wrapper for header elements.
*
* @return string HTML to display the main header.
*/
public function full_header() {
global $PAGE;
$html = html_writer::start_tag('header', array('id' => 'page-header', 'class' => 'row'));
$html .= html_writer::start_div('col-xs-12 p-a-1');
$html .= html_writer::start_div('card');
$html .= html_writer::start_div('card-block');
$html .= html_writer::div($this->context_header_settings_menu(), 'pull-xs-right context-header-settings-menu');
$html .= html_writer::start_div('pull-xs-left');
$html .= $this->context_header();
$html .= html_writer::end_div();
$pageheadingbutton = $this->page_heading_button();
if (empty($PAGE->layout_options['nonavbar'])) {
$html .= html_writer::start_div('clearfix w-100 pull-xs-left', array('id' => 'page-navbar'));
$html .= html_writer::tag('div', $this->navbar(), array('class' => 'breadcrumb-nav'));
$html .= html_writer::div($pageheadingbutton, 'breadcrumb-button pull-xs-right');
$html .= html_writer::end_div();
} else if ($pageheadingbutton) {
$html .= html_writer::div($pageheadingbutton, 'breadcrumb-button nonavbar pull-xs-right');
}
$html .= html_writer::tag('div', $this->course_header(), array('id' => 'course-header'));
$html .= html_writer::end_div();
$html .= html_writer::end_div();
$html .= html_writer::end_div();
$html .= html_writer::end_tag('header');
return $html;
}
/**
* The standard tags that should be included in the <head> tag
* including a meta description for the front page
*
* @return string HTML fragment.
*/
public function standard_head_html() {
global $SITE, $PAGE;
$output = parent::standard_head_html();
if ($PAGE->pagelayout == 'frontpage') {
$summary = s(strip_tags(format_text($SITE->summary, FORMAT_HTML)));
if (!empty($summary)) {
$output .= "<meta name=\"description\" content=\"$summary\" />\n";
}
}
return $output;
}
/*
* This renders the navbar.
* Uses bootstrap compatible html.
*/
public function navbar() {
return $this->render_from_template('core/navbar', $this->page->navbar);
}
/**
* We don't like these...
*
*/
public function edit_button(moodle_url $url) {
return '';
}
/**
* Override to inject the logo.
*
* @param array $headerinfo The header info.
* @param int $headinglevel What level the 'h' tag will be.
* @return string HTML for the header bar.
*/
public function context_header($headerinfo = null, $headinglevel = 1) {
global $SITE;
if ($this->should_display_main_logo($headinglevel)) {
$sitename = format_string($SITE->fullname, true, array('context' => context_course::instance(SITEID)));
return html_writer::div(html_writer::empty_tag('img', [
'src' => $this->get_logo_url(null, 150), 'alt' => $sitename]), 'logo');
}
return parent::context_header($headerinfo, $headinglevel);
}
/**
* Get the compact logo URL.
*
* @return string
*/
public function get_compact_logo_url($maxwidth = 100, $maxheight = 100) {
return parent::get_compact_logo_url(null, 70);
}
/**
* Whether we should display the main logo.
*
* @return bool
*/
public function should_display_main_logo($headinglevel = 1) {
global $PAGE;
// Only render the logo if we're on the front page or login page and the we have a logo.
$logo = $this->get_logo_url();
if ($headinglevel == 1 && !empty($logo)) {
if ($PAGE->pagelayout == 'frontpage' || $PAGE->pagelayout == 'login') {
return true;
}
}
return false;
}
/**
* Whether we should display the logo in the navbar.
*
* We will when there are no main logos, and we have compact logo.
*
* @return bool
*/
public function should_display_navbar_logo() {
$logo = $this->get_compact_logo_url();
return !empty($logo) && !$this->should_display_main_logo();
}
/*
* Overriding the custom_menu function ensures the custom menu is
* always shown, even if no menu items are configured in the global
* theme settings page.
*/
public function custom_menu($custommenuitems = '') {
global $CFG;
if (empty($custommenuitems) && !empty($CFG->custommenuitems)) {
$custommenuitems = $CFG->custommenuitems;
}
$custommenu = new custom_menu($custommenuitems, current_language());
return $this->render_custom_menu($custommenu);
}
/**
* We want to show the custom menus as a list of links in the footer on small screens.
* Just return the menu object exported so we can render it differently.
*/
public function custom_menu_flat() {
global $CFG;
$custommenuitems = '';
if (empty($custommenuitems) && !empty($CFG->custommenuitems)) {
$custommenuitems = $CFG->custommenuitems;
}
$custommenu = new custom_menu($custommenuitems, current_language());
$langs = get_string_manager()->get_list_of_translations();
$haslangmenu = $this->lang_menu() != '';
if ($haslangmenu) {
$strlang = get_string('language');
$currentlang = current_language();
if (isset($langs[$currentlang])) {
$currentlang = $langs[$currentlang];
} else {
$currentlang = $strlang;
}
$this->language = $custommenu->add($currentlang, new moodle_url('#'), $strlang, 10000);
foreach ($langs as $langtype => $langname) {
$this->language->add($langname, new moodle_url($this->page->url, array('lang' => $langtype)), $langname);
}
}
return $custommenu->export_for_template($this);
}
/*
* This renders the bootstrap top menu.
*
* This renderer is needed to enable the Bootstrap style navigation.
*/
protected function render_custom_menu(custom_menu $menu) {
global $CFG;
$langs = get_string_manager()->get_list_of_translations();
$haslangmenu = $this->lang_menu() != '';
if (!$menu->has_children() && !$haslangmenu) {
return '';
}
if ($haslangmenu) {
$strlang = get_string('language');
$currentlang = current_language();
if (isset($langs[$currentlang])) {
$currentlang = $langs[$currentlang];
} else {
$currentlang = $strlang;
}
$this->language = $menu->add($currentlang, new moodle_url('#'), $strlang, 10000);
foreach ($langs as $langtype => $langname) {
$this->language->add($langname, new moodle_url($this->page->url, array('lang' => $langtype)), $langname);
}
}
$content = '';
foreach ($menu->get_children() as $item) {
$context = $item->export_for_template($this);
$content .= $this->render_from_template('core/custom_menu_item', $context);
}
return $content;
}
/**
* This code renders the navbar button to control the display of the custom menu
* on smaller screens.
*
* Do not display the button if the menu is empty.
*
* @return string HTML fragment
*/
public function navbar_button() {
global $CFG;
if (empty($CFG->custommenuitems) && $this->lang_menu() == '') {
return '';
}
$iconbar = html_writer::tag('span', '', array('class' => 'icon-bar'));
$button = html_writer::tag('a', $iconbar . "\n" . $iconbar. "\n" . $iconbar, array(
'class' => 'btn btn-navbar',
'data-toggle' => 'collapse',
'data-target' => '.nav-collapse'
));
return $button;
}
/**
* Renders tabtree
*
* @param tabtree $tabtree
* @return string
*/
protected function render_tabtree(tabtree $tabtree) {
if (empty($tabtree->subtree)) {
return '';
}
$data = $tabtree->export_for_template($this);
return $this->render_from_template('core/tabtree', $data);
}
/**
* Renders tabobject (part of tabtree)
*
* This function is called from {@link core_renderer::render_tabtree()}
* and also it calls itself when printing the $tabobject subtree recursively.
*
* @param tabobject $tabobject
* @return string HTML fragment
*/
protected function render_tabobject(tabobject $tab) {
throw new coding_exception('Tab objects should not be directly rendered.');
}
/**
* Prints a nice side block with an optional header.
*
* @param block_contents $bc HTML for the content
* @param string $region the region the block is appearing in.
* @return string the HTML to be output.
*/
public function block(block_contents $bc, $region) {
$bc = clone($bc); // Avoid messing up the object passed in.
if (empty($bc->blockinstanceid) || !strip_tags($bc->title)) {
$bc->collapsible = block_contents::NOT_HIDEABLE;
}
$id = !empty($bc->attributes['id']) ? $bc->attributes['id'] : uniqid('block-');
$context = new stdClass();
$context->skipid = $bc->skipid;
$context->blockinstanceid = $bc->blockinstanceid;
$context->dockable = $bc->dockable;
$context->id = $id;
$context->hidden = $bc->collapsible == block_contents::HIDDEN;
$context->skiptitle = strip_tags($bc->title);
$context->showskiplink = !empty($context->skiptitle);
$context->arialabel = $bc->arialabel;
$context->ariarole = !empty($bc->attributes['role']) ? $bc->attributes['role'] : 'complementary';
$context->type = $bc->attributes['data-block'];
$context->title = $bc->title;
$context->content = $bc->content;
$context->annotation = $bc->annotation;
$context->footer = $bc->footer;
$context->hascontrols = !empty($bc->controls);
if ($context->hascontrols) {
$context->controls = $this->block_controls($bc->controls, $id);
}
return $this->render_from_template('core/block', $context);
}
/**
* Returns the CSS classes to apply to the body tag.
*
* @since Moodle 2.5.1 2.6
* @param array $additionalclasses Any additional classes to apply.
* @return string
*/
public function body_css_classes(array $additionalclasses = array()) {
return $this->page->bodyclasses . ' ' . implode(' ', $additionalclasses);
}
/**
* Renders preferences groups.
*
* @param preferences_groups $renderable The renderable
* @return string The output.
*/
public function render_preferences_groups(preferences_groups $renderable) {
return $this->render_from_template('core/preferences_groups', $renderable);
}
/**
* Renders an action menu component.
*
* @param action_menu $menu
* @return string HTML
*/
public function render_action_menu(action_menu $menu) {
// We don't want the class icon there!
foreach ($menu->get_secondary_actions() as $action) {
if ($action instanceof \action_menu_link && $action->has_class('icon')) {
$action->attributes['class'] = preg_replace('/(^|\s+)icon(\s+|$)/i', '', $action->attributes['class']);
}
}
if ($menu->is_empty()) {
return '';
}
$context = $menu->export_for_template($this);
return $this->render_from_template('core/action_menu', $context);
}
/**
* Implementation of user image rendering.
*
* @param help_icon $helpicon A help icon instance
* @return string HTML fragment
*/
protected function render_help_icon(help_icon $helpicon) {
$context = $helpicon->export_for_template($this);
return $this->render_from_template('core/help_icon', $context);
}
/**
* Renders a single button widget.
*
* This will return HTML to display a form containing a single button.
*
* @param single_button $button
* @return string HTML fragment
*/
protected function render_single_button(single_button $button) {
return $this->render_from_template('core/single_button', $button->export_for_template($this));
}
/**
* Renders a paging bar.
*
* @param paging_bar $pagingbar The object.
* @return string HTML
*/
protected function render_paging_bar(paging_bar $pagingbar) {
// Any more than 10 is not usable and causes wierd wrapping of the pagination in this theme.
$pagingbar->maxdisplay = 10;
return $this->render_from_template('core/paging_bar', $pagingbar->export_for_template($this));
}
/**
* Renders the login form.
*
* @param \core_auth\output\login $form The renderable.
* @return string
*/
public function render_login(\core_auth\output\login $form) {
global $SITE;
$context = $form->export_for_template($this);
// Override because rendering is not supported in template yet.
$context->cookieshelpiconformatted = $this->help_icon('cookiesenabled');
$context->errorformatted = $this->error_text($context->error);
$url = $this->get_logo_url();
if ($url) {
$url = $url->out(false);
}
$context->logourl = $url;
$context->sitename = format_string($SITE->fullname, true, ['context' => context_course::instance(SITEID), "escape" => false]);
return $this->render_from_template('core/loginform', $context);
}
/**
* Render the login signup form into a nice template for the theme.
*
* @param mform $form
* @return string
*/
public function render_login_signup_form($form) {
global $SITE;
$context = $form->export_for_template($this);
$url = $this->get_logo_url();
if ($url) {
$url = $url->out(false);
}
$context['logourl'] = $url;
$context['sitename'] = format_string($SITE->fullname, true, ['context' => context_course::instance(SITEID), "escape" => false]);
return $this->render_from_template('core/signup_form_layout', $context);
}
/**
* This is an optional menu that can be added to a layout by a theme. It contains the
* menu for the course administration, only on the course main page.
*
* @return string
*/
public function context_header_settings_menu() {
$context = $this->page->context;
$menu = new action_menu();
$items = $this->page->navbar->get_items();
$currentnode = end($items);
$showcoursemenu = false;
$showfrontpagemenu = false;
$showusermenu = false;
// We are on the course home page.
if (($context->contextlevel == CONTEXT_COURSE) &&
!empty($currentnode) &&
($currentnode->type == navigation_node::TYPE_COURSE || $currentnode->type == navigation_node::TYPE_SECTION)) {
$showcoursemenu = true;
}
$courseformat = course_get_format($this->page->course);
// This is a single activity course format, always show the course menu on the activity main page.
if ($context->contextlevel == CONTEXT_MODULE &&
!$courseformat->has_view_page()) {
$this->page->navigation->initialise();
$activenode = $this->page->navigation->find_active_node();
// If the settings menu has been forced then show the menu.
if ($this->page->is_settings_menu_forced()) {
$showcoursemenu = true;
} else if (!empty($activenode) && ($activenode->type == navigation_node::TYPE_ACTIVITY ||
$activenode->type == navigation_node::TYPE_RESOURCE)) {
// We only want to show the menu on the first page of the activity. This means
// the breadcrumb has no additional nodes.
if ($currentnode && ($currentnode->key == $activenode->key && $currentnode->type == $activenode->type)) {
$showcoursemenu = true;
}
}
}
// This is the site front page.
if ($context->contextlevel == CONTEXT_COURSE &&
!empty($currentnode) &&
$currentnode->key === 'home') {
$showfrontpagemenu = true;
}
// This is the user profile page.
if ($context->contextlevel == CONTEXT_USER &&
!empty($currentnode) &&
($currentnode->key === 'myprofile')) {
$showusermenu = true;
}
if ($showfrontpagemenu) {
$settingsnode = $this->page->settingsnav->find('frontpage', navigation_node::TYPE_SETTING);
if ($settingsnode) {
// Build an action menu based on the visible nodes from this navigation tree.
$skipped = $this->build_action_menu_from_navigation($menu, $settingsnode, false, true);
// We only add a list to the full settings menu if we didn't include every node in the short menu.
if ($skipped) {
$text = get_string('morenavigationlinks');
$url = new moodle_url('/course/admin.php', array('courseid' => $this->page->course->id));
$link = new action_link($url, $text, null, null, new pix_icon('t/edit', $text));
$menu->add_secondary_action($link);
}
}
} else if ($showcoursemenu) {
$settingsnode = $this->page->settingsnav->find('courseadmin', navigation_node::TYPE_COURSE);
if ($settingsnode) {
// Build an action menu based on the visible nodes from this navigation tree.
$skipped = $this->build_action_menu_from_navigation($menu, $settingsnode, false, true);
// We only add a list to the full settings menu if we didn't include every node in the short menu.
if ($skipped) {
$text = get_string('morenavigationlinks');
$url = new moodle_url('/course/admin.php', array('courseid' => $this->page->course->id));
$link = new action_link($url, $text, null, null, new pix_icon('t/edit', $text));
$menu->add_secondary_action($link);
}
}
} else if ($showusermenu) {
// Get the course admin node from the settings navigation.
$settingsnode = $this->page->settingsnav->find('useraccount', navigation_node::TYPE_CONTAINER);
if ($settingsnode) {
// Build an action menu based on the visible nodes from this navigation tree.
$this->build_action_menu_from_navigation($menu, $settingsnode);
}
}
return $this->render($menu);
}
/**
* This is an optional menu that can be added to a layout by a theme. It contains the
* menu for the most specific thing from the settings block. E.g. Module administration.
*
* @return string
*/
public function region_main_settings_menu() {
$context = $this->page->context;
$menu = new action_menu();
if ($context->contextlevel == CONTEXT_MODULE) {
$this->page->navigation->initialise();
$node = $this->page->navigation->find_active_node();
$buildmenu = false;
// If the settings menu has been forced then show the menu.
if ($this->page->is_settings_menu_forced()) {
$buildmenu = true;
} else if (!empty($node) && ($node->type == navigation_node::TYPE_ACTIVITY ||
$node->type == navigation_node::TYPE_RESOURCE)) {
$items = $this->page->navbar->get_items();
$navbarnode = end($items);
// We only want to show the menu on the first page of the activity. This means
// the breadcrumb has no additional nodes.
if ($navbarnode && ($navbarnode->key === $node->key && $navbarnode->type == $node->type)) {
$buildmenu = true;
}
}
if ($buildmenu) {
// Get the course admin node from the settings navigation.
$node = $this->page->settingsnav->find('modulesettings', navigation_node::TYPE_SETTING);
if ($node) {
// Build an action menu based on the visible nodes from this navigation tree.
$this->build_action_menu_from_navigation($menu, $node);
}
}
} else if ($context->contextlevel == CONTEXT_COURSECAT) {
// For course category context, show category settings menu, if we're on the course category page.
if ($this->page->pagetype === 'course-index-category') {
$node = $this->page->settingsnav->find('categorysettings', navigation_node::TYPE_CONTAINER);
if ($node) {
// Build an action menu based on the visible nodes from this navigation tree.
$this->build_action_menu_from_navigation($menu, $node);
}
}
$url->param('sesskey', sesskey());
if ($this->page->user_is_editing()) {
$url->param('edit', 'off');
$editstring = get_string('turneditingoff');
} else {
$items = $this->page->navbar->get_items();
$navbarnode = end($items);
if ($navbarnode && ($navbarnode->key === 'participants')) {
$node = $this->page->settingsnav->find('users', navigation_node::TYPE_CONTAINER);
if ($node) {
// Build an action menu based on the visible nodes from this navigation tree.
$this->build_action_menu_from_navigation($menu, $node);
}
}
}
return $this->render($menu);
}
/**
* Take a node in the nav tree and make an action menu out of it.
* The links are injected in the action menu.
*
* @param action_menu $menu
* @param navigation_node $node
* @param boolean $indent
* @param boolean $onlytopleafnodes
* @return boolean nodesskipped - True if nodes were skipped in building the menu
*/
protected function build_action_menu_from_navigation(action_menu $menu,
navigation_node $node,
$indent = false,
$onlytopleafnodes = false) {
$skipped = false;
// Build an action menu based on the visible nodes from this navigation tree.
foreach ($node->children as $menuitem) {
if ($menuitem->display) {
if ($onlytopleafnodes && $menuitem->children->count()) {
$skipped = true;
continue;
}
if ($menuitem->action) {
if ($menuitem->action instanceof action_link) {
$link = $menuitem->action;
// Give preference to setting icon over action icon.
if (!empty($menuitem->icon)) {
$link->icon = $menuitem->icon;
}
} else {
$link = new action_link($menuitem->action, $menuitem->text, null, null, $menuitem->icon);
}
} else {
if ($onlytopleafnodes) {
$skipped = true;
continue;
}
$link = new action_link(new moodle_url('#'), $menuitem->text, null, ['disabled' => true], $menuitem->icon);
}
if ($indent) {
$link->add_class('m-l-1');
}
if (!empty($menuitem->classes)) {
$link->add_class(implode(" ", $menuitem->classes));
}
$menu->add_secondary_action($link);
$skipped = $skipped || $this->build_action_menu_from_navigation($menu, $menuitem, true);
}
$url->param('edit', 'on');
$editstring = get_string('turneditingon');
}
return $skipped;
$button = new \single_button($url, $editstring, 'post', ['class' => 'btn btn-primary']);
return $this->render_single_button($button);
}
/**
* Secure login info.
*
* @return string
*/
public function secure_login_info() {
return $this->login_info(false);
}
}

197
classes/output/core_renderer_maintenance.php

@ -1,197 +0,0 @@
<?php
// 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/>.
/**
* Overriden core maintenance renderer.
*
* @package theme_boost
* @copyright 2016 Frédéric Massart - FMCorz.net
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace theme_boost\output;
defined('MOODLE_INTERNAL') || die();
use coding_exception;
use moodle_page;
use block_contents;
use stdClass;
/**
* The maintenance renderer.
*
* @package theme_boost
* @copyright 2016 Frédéric Massart - FMCorz.net
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class core_renderer_maintenance extends core_renderer {
/**
* Initialises the renderer instance.
*
* @param moodle_page $page
* @param string $target
* @throws coding_exception
*/
public function __construct(moodle_page $page, $target) {
if ($target !== RENDERER_TARGET_MAINTENANCE || $page->pagelayout !== 'maintenance') {
throw new coding_exception('Invalid request for the maintenance renderer.');
}
parent::__construct($page, $target);
}
/**
* Does nothing. The maintenance renderer cannot produce blocks.
*
* @param block_contents $bc
* @param string $region
* @return string
*/
public function block(block_contents $bc, $region) {
return '';
}
/**
* Does nothing. The maintenance renderer cannot produce blocks.
*
* @param string $region
* @param array $classes
* @param string $tag
* @return string
*/
public function blocks($region, $classes = array(), $tag = 'aside') {
return '';
}
/**
* Does nothing. The maintenance renderer cannot produce blocks.
*
* @param string $region
* @return string
*/
public function blocks_for_region($region) {
return '';
}
/**
* Does nothing. The maintenance renderer cannot produce a course content header.
*
* @param bool $onlyifnotcalledbefore
* @return string
*/
public function course_content_header($onlyifnotcalledbefore = false) {
return '';
}
/**
* Does nothing. The maintenance renderer cannot produce a course content footer.
*
* @param bool $onlyifnotcalledbefore
* @return string
*/
public function course_content_footer($onlyifnotcalledbefore = false) {
return '';
}
/**
* Does nothing. The maintenance renderer cannot produce a course header.
*
* @return string
*/
public function course_header() {
return '';
}
/**
* Does nothing. The maintenance renderer cannot produce a course footer.
*
* @return string
*/
public function course_footer() {
return '';
}
/**
* Does nothing. The maintenance renderer cannot produce a custom menu.
*
* @param string $custommenuitems
* @return string
*/
public function custom_menu($custommenuitems = '') {
return '';
}
/**
* Does nothing. The maintenance renderer cannot produce a file picker.
*
* @param array $options
* @return string
*/
public function file_picker($options) {
return '';
}
/**
* Does nothing. The maintenance renderer cannot produce and HTML file tree.
*
* @param array $dir
* @return string
*/
public function htmllize_file_tree($dir) {
return '';
}
/**
* Does nothing. The maintenance renderer does not support JS.
*
* @param block_contents $bc
*/
public function init_block_hider_js(block_contents $bc) {
// Does nothing.
}
/**
* Does nothing. The maintenance renderer cannot produce language menus.
*
* @return string
*/
public function lang_menu() {
return '';
}
/**
* Does nothing. The maintenance renderer has no need for login information.
*
* @param null $withlinks
* @return string
*/
public function login_info($withlinks = null) {
return '';
}
/**
* Does nothing. The maintenance renderer cannot produce user pictures.
*
* @param stdClass $user
* @param array $options
* @return string
*/
public function user_picture(stdClass $user, array $options = null) {
return '';
}
}

44
classes/output/gradereport_history_renderer.php

@ -1,44 +0,0 @@
<?php
// 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/>.
/**
* Overriden gradereport_history renderer.
*
* @package theme_boost
* @copyright 2016 Frédéric Massart - FMCorz.net
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace theme_boost\output;
defined('MOODLE_INTERNAL') || die();
use gradereport_history\output\user_button;
/**
* Overriden gradereport_history renderer.
*
* @package theme_boost
* @copyright 2016 Frédéric Massart - FMCorz.net
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class gradereport_history_renderer extends \gradereport_history\output\renderer {
public function render_user_button(user_button $button) {
$data = $button->export_for_template($this);
return $this->render_from_template('gradereport_history/user_button', $data);
}
}

46
classes/privacy/provider.php

@ -24,23 +24,55 @@
namespace theme_boost\privacy;
use \core_privacy\local\metadata\collection;
defined('MOODLE_INTERNAL') || die();
/**
* The boost theme does not store any data.
* The boost theme stores a user preference data.
*
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @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
// This plugin has data.
\core_privacy\local\metadata\provider,
// This plugin has some sitewide user preferences to export.
\core_privacy\local\request\user_preference_provider {
/** The user preference for the navigation drawer. */
const DRAWER_OPEN_NAV = 'drawer-open-nav';
/**
* Returns meta data about this system.
*
* @param collection $items The initialised item collection to add items to.
* @return collection A listing of user data stored through this system.
*/
public static function get_metadata(collection $items) : collection {
$items->add_user_preference(self::DRAWER_OPEN_NAV, 'privacy:metadata:preference:draweropennav');
return $items;
}
/**
* Get the language string identifier with the component's language
* file to explain why this plugin stores no data.
* Store all user preferences for the plugin.
*
* @return string
* @param int $userid The userid of the user whose data is to be exported.
*/
public static function get_reason() : string {
return 'privacy:metadata';
public static function export_user_preferences(int $userid) {
$draweropennavpref = get_user_preferences(self::DRAWER_OPEN_NAV, null, $userid);
if (isset($draweropennavpref)) {
$preferencestring = get_string('privacy:drawernavclosed', 'theme_boost');
if ($draweropennavpref == 'true') {
$preferencestring = get_string('privacy:drawernavopen', 'theme_boost');
}
\core_privacy\local\request\writer::export_user_preference(
'theme_boost',
self::DRAWER_OPEN_NAV,
$draweropennavpref,
$preferencestring
);
}
}
}

165
config.php

@ -1,54 +1,39 @@
<?php
// Every file should have GPL and copyright in the header - we skip it in tutorials but you should not skip it for real.
// This line protects the file from being accessed by a URL directly.
// 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/>.
/**
* Boost config.
*
* @package theme_boost
* @copyright 2016 Frédéric Massart
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
// $THEME is defined before this page is included and we can define settings by adding properties to this global object.
// The first setting we need is the name of the theme. This should be the last part of the component name, and the same
// as the directory name for our theme.
$THEME->name = 'ilb';
// This setting list the style sheets we want to include in our theme. Because we want to use SCSS instead of CSS - we won't
// list any style sheets. If we did we would list the name of a file in the /style/ folder for our theme without any css file
// extensions.
$THEME->sheets = [];
// This is a setting that can be used to provide some styling to the content in the TinyMCE text editor. This is no longer the
// default text editor and "Atto" does not need this setting so we won't provide anything. If we did it would work the same
// as the previous setting - listing a file in the /styles/ folder.
$THEME->editor_sheets = [];
// This is a critical setting. We want to inherit from theme_boost because it provides a great starting point for SCSS bootstrap4
// themes. We could add more than one parent here to inherit from multiple parents, and if we did they would be processed in
// order of importance (later themes overriding earlier ones). Things we will inherit from the parent theme include
// styles and mustache templates and some (not all) settings.
$THEME->parents = ['boost'];
// A dock is a way to take blocks out of the page and put them in a persistent floating area on the side of the page. Boost
// does not support a dock so we won't either - but look at bootstrapbase for an example of a theme with a dock.
$THEME->enable_dock = false;
// This is an old setting used to load specific CSS for some YUI JS. We don't need it in Boost based themes because Boost
// provides default styling for the YUI modules that we use. It is not recommended to use this setting anymore.
$THEME->yuicssmodules = array();
// Most themes will use this rendererfactory as this is the one that allows the theme to override any other renderer.
$THEME->rendererfactory = 'theme_overridden_renderer_factory';
// This is a list of blocks that are required to exist on all pages for this theme to function correctly. For example
// bootstrap base requires the settings and navigation blocks because otherwise there would be no way to navigate to all the
// pages in Moodle. Boost does not require these blocks because it provides other ways to navigate built into the theme.
$THEME->requiredblocks = '';
// This is a feature that tells the blocks library not to use the "Add a block" block. We don't want this in boost based themes because
// it forces a block region into the page when editing is enabled and it takes up too much room.
$THEME->addblockposition = BLOCK_ADDBLOCK_POSITION_FLATNAV;
require_once(__DIR__ . '/lib.php');
$THEME->name = 'boost';
$THEME->sheets = [];
$THEME->editor_sheets = [];
$THEME->editor_scss = ['editor'];
$THEME->usefallback = true;
$THEME->iconsystem = \core\output\icon_system::FONTAWESOME;
$THEME->scss = function($theme) {
return theme_boost_get_main_scss_content($theme);
};
$THEME->layouts = [
// Most backwards compatible layout without the blocks - this is the layout used by default.
@ -82,23 +67,93 @@ $THEME->layouts = [
),
// The site home page.
'frontpage' => array(
'file' => 'frontpage_ilb.php',
'file' => 'columns2.php',
'regions' => array('side-pre'),
'defaultregion' => 'side-pre',
'options' => array('nonavbar' => true),
),
// Server administration scripts.
'admin' => array(
'file' => 'columns2.php',
'regions' => array('side-pre'),
'defaultregion' => 'side-pre',
),
// My dashboard page.
'mydashboard' => array(
'file' => 'columns2.php',
'regions' => array('side-pre'),
'defaultregion' => 'side-pre',
'options' => array('nonavbar' => true, 'langmenu' => true),
'options' => array('nonavbar' => true, 'langmenu' => true, 'nocontextheader' => true),
),
// My public page.
'mypublic' => array(
'file' => 'columns2.php',
'regions' => array('side-pre'),
'defaultregion' => 'side-pre',
),
'login' => array(
'file' => 'login.php',
'regions' => array(),
'options' => array('langmenu' => true),
),
// Pages that appear in pop-up windows - no navigation, no blocks, no header.
'popup' => array(
'file' => 'columns1.php',
'regions' => array(),
'options' => array('nofooter' => true, 'nonavbar' => true),
),
// No blocks and minimal footer - used for legacy frame layouts only!
'frametop' => array(
'file' => 'columns1.php',
'regions' => array(),
'options' => array('nofooter' => true, 'nocoursefooter' => true),
),
// Embeded pages, like iframe/object embeded in moodleform - it needs as much space as possible.
'embedded' => array(
'file' => 'embedded.php',
'regions' => array('side-pre'),
'defaultregion' => 'side-pre',
),
// 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(
'file' => 'maintenance.php',
'regions' => array(),
),
// Should display the content and basic headers only.
'print' => array(
'file' => 'columns1.php',
'regions' => array(),
'options' => array('nofooter' => true, 'nonavbar' => false),
),
// The pagelayout used when a redirection is occuring.
'redirect' => array(
'file' => 'embedded.php',
'regions' => array(),
),
// The pagelayout used for reports.
'report' => array(
'file' => 'columns2.php',
'regions' => array('side-pre'),
'defaultregion' => 'side-pre',
),
// The pagelayout used for safebrowser and securewindow.
'secure' => array(
'file' => 'secure.php',
'regions' => array('side-pre'),
'defaultregion' => 'side-pre'
)
];
// This is the function that returns the SCSS source for the main file in our theme. We override the boost version because
// we want to allow presets uploaded to our own theme file area to be selected in the preset list.
$THEME->scss = function($theme) {
return theme_ilb_get_main_scss_content($theme);
};
$THEME->parents = [];
$THEME->enable_dock = false;
$THEME->extrascsscallback = 'theme_boost_get_extra_scss';
$THEME->prescsscallback = 'theme_boost_get_pre_scss';
$THEME->precompiledcsscallback = 'theme_boost_get_precompiled_css';
$THEME->yuicssmodules = array();
$THEME->rendererfactory = 'theme_overridden_renderer_factory';
$THEME->requiredblocks = '';
$THEME->addblockposition = BLOCK_ADDBLOCK_POSITION_FLATNAV;
$THEME->iconsystem = \core\output\icon_system::FONTAWESOME;

BIN
js/apple-touch-icon-114x114.png?v=OmmK4dNQkX

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

BIN
js/apple-touch-icon-120x120.png?v=OmmK4dNQkX

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

BIN
js/apple-touch-icon-144x144.png?v=OmmK4dNQkX

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

BIN
js/apple-touch-icon-152x152.png?v=OmmK4dNQkX

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

BIN
js/apple-touch-icon-180x180.png?v=OmmK4dNQkX

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

BIN
js/apple-touch-icon-57x57.png?v=OmmK4dNQkX

Binary file not shown.

Before

Width:  |  Height:  |  Size: 733 B

BIN
js/apple-touch-icon-60x60.png?v=OmmK4dNQkX

Binary file not shown.

Before

Width:  |  Height:  |  Size: 792 B

BIN
js/apple-touch-icon-72x72.png?v=OmmK4dNQkX

Binary file not shown.

Before

Width:  |  Height:  |  Size: 859 B

BIN
js/apple-touch-icon-76x76.png?v=OmmK4dNQkX

Binary file not shown.

Before

Width:  |  Height:  |  Size: 926 B

48
js/audio.min.js

@ -1,48 +0,0 @@
(function(audiojs,audiojsInstance,container){var path=(function(){var re=new RegExp('audio(\.min)?\.js.*'),scripts=document.getElementsByTagName('script');for(var i=0,ii=scripts.length;i<ii;i++){var path=scripts[i].getAttribute('src');if(re.test(path))return path.replace(re,'');}})();container[audiojs]={instanceCount:0,instances:{},flashSource:'\
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="$1" width="1" height="1" name="$1" style="position: absolute; left: -1px;"> \
<param name="movie" value="$2?playerInstance='+audiojs+'.instances[\'$1\']&datetime=$3"> \
<param name="allowscriptaccess" value="always"> \
<embed name="$1" src="$2?playerInstance='+audiojs+'.instances[\'$1\']&datetime=$3" width="1" height="1" allowscriptaccess="always"> \
</object>',settings:{autoplay:false,loop:false,preload:true,imageLocation:path+'player-graphics.gif',swfLocation:path+'audiojs.swf',useFlash:(function(){var a=document.createElement('audio');return!(a.canPlayType&&a.canPlayType('audio/mpeg;').replace(/no/,''));})(),hasFlash:(function(){if(navigator.plugins&&navigator.plugins.length&&navigator.plugins['Shockwave Flash']){return true;}else if(navigator.mimeTypes&&navigator.mimeTypes.length){var mimeType=navigator.mimeTypes['application/x-shockwave-flash'];return mimeType&&mimeType.enabledPlugin;}else{try{var ax=new ActiveXObject('ShockwaveFlash.ShockwaveFlash');return true;}catch(e){}}
return false;})(),createPlayer:{markup:'\
<div class="play-pause"> \
<p class="play glyphicon glyphicon-play"></p> \
<p class="pause glyphicon glyphicon-pause"></p> \
<p class="loading glyphicon glyphicon-repeat"></p> \
<p class="error glyphicon glyphicon-remove"></p> \
</div> \
<div class="scrubber"> \
<div class="progress"></div> \
<div class="loaded"></div> \
</div> \
<div class="time"> \
<em class="played">00:00</em><strong class="duration">00:00</strong> \
</div> \
<div class="error-message"></div>',playPauseClass:'play-pause',scrubberClass:'scrubber',progressClass:'progress',loaderClass:'loaded',timeClass:'time',durationClass:'duration',playedClass:'played',errorMessageClass:'error-message',playingClass:'playing',loadingClass:'loading',errorClass:'error'},trackEnded:function(e){},flashError:function(){var player=this.settings.createPlayer,errorMessage=getByClass(player.errorMessageClass,this.wrapper),html='Missing <a href="http://get.adobe.com/flashplayer/">flash player</a> plugin.';if(this.mp3)html+=' <a href="'+this.mp3+'">Download audio file</a>.';container[audiojs].helpers.removeClass(this.wrapper,player.loadingClass);container[audiojs].helpers.addClass(this.wrapper,player.errorClass);errorMessage.innerHTML=html;},loadError:function(e){var player=this.settings.createPlayer,errorMessage=getByClass(player.errorMessageClass,this.wrapper);container[audiojs].helpers.removeClass(this.wrapper,player.loadingClass);container[audiojs].helpers.addClass(this.wrapper,player.errorClass);errorMessage.innerHTML='Error loading: "'+this.mp3+'"';},init:function(){var player=this.settings.createPlayer;container[audiojs].helpers.addClass(this.wrapper,player.loadingClass);},loadStarted:function(){var player=this.settings.createPlayer,duration=getByClass(player.durationClass,this.wrapper),m=Math.floor(this.duration/60),s=Math.floor(this.duration%60);container[audiojs].helpers.removeClass(this.wrapper,player.loadingClass);duration.innerHTML=((m<10?'0':'')+m+':'+(s<10?'0':'')+s);},loadProgress:function(percent){var player=this.settings.createPlayer,scrubber=getByClass(player.scrubberClass,this.wrapper),loaded=getByClass(player.loaderClass,this.wrapper);loaded.style.width=(scrubber.offsetWidth*percent)+'px';},playPause:function(){if(this.playing)this.settings.play();else this.settings.pause();},play:function(){var player=this.settings.createPlayer;container[audiojs].helpers.addClass(this.wrapper,player.playingClass);},pause:function(){var player=this.settings.createPlayer;container[audiojs].helpers.removeClass(this.wrapper,player.playingClass);},updatePlayhead:function(percent){var player=this.settings.createPlayer,scrubber=getByClass(player.scrubberClass,this.wrapper),progress=getByClass(player.progressClass,this.wrapper);progress.style.width=(scrubber.offsetWidth*percent)+'px';var played=getByClass(player.playedClass,this.wrapper),p=this.duration*percent,m=Math.floor(p/60),s=Math.floor(p%60);played.innerHTML=((m<10?'0':'')+m+':'+(s<10?'0':'')+s);}},create:function(element,options){var options=options||{}
if(element.length){return this.createAll(options,element);}else{return this.newInstance(element,options);}},createAll:function(options,elements){var audioElements=elements||document.getElementsByTagName('audio'),instances=[]
options=options||{};for(var i=0,ii=audioElements.length;i<ii;i++){instances.push(this.newInstance(audioElements[i],options));}
return instances;},newInstance:function(element,options){var element=element,s=this.helpers.clone(this.settings),id='audiojs'+this.instanceCount,wrapperId='audiojs_wrapper'+this.instanceCount,instanceCount=this.instanceCount++;if(element.getAttribute('autoplay')!=null)s.autoplay=true;if(element.getAttribute('loop')!=null)s.loop=true;if(element.getAttribute('preload')=='none')s.preload=false;if(options)this.helpers.merge(s,options);if(s.createPlayer.markup)element=this.createPlayer(element,s.createPlayer,wrapperId);else element.parentNode.setAttribute('id',wrapperId);var audio=new container[audiojsInstance](element,s);if(s.css)this.helpers.injectCss(audio,s.css);if(s.useFlash&&s.hasFlash){this.injectFlash(audio,id);this.attachFlashEvents(audio.wrapper,audio);}else if(s.useFlash&&!s.hasFlash){this.settings.flashError.apply(audio);}
if(!s.useFlash||(s.useFlash&&s.hasFlash))this.attachEvents(audio.wrapper,audio);this.instances[id]=audio;return audio;},createPlayer:function(element,player,id){var wrapper=document.createElement('div'),newElement=element.cloneNode(true);wrapper.setAttribute('class','audiojs');wrapper.setAttribute('className','audiojs');wrapper.setAttribute('id',id);if(newElement.outerHTML&&!document.createElement('audio').canPlayType){newElement=this.helpers.cloneHtml5Node(element);wrapper.innerHTML=player.markup;wrapper.appendChild(newElement);element.outerHTML=wrapper.outerHTML;wrapper=document.getElementById(id);}else{wrapper.appendChild(newElement);wrapper.innerHTML=wrapper.innerHTML+player.markup;element.parentNode.replaceChild(wrapper,element);}
return wrapper.getElementsByTagName('audio')[0];},attachEvents:function(wrapper,audio){if(!audio.settings.createPlayer)return;var player=audio.settings.createPlayer,playPause=getByClass(player.playPauseClass,wrapper),scrubber=getByClass(player.scrubberClass,wrapper),leftPos=function(elem){var curleft=0;if(elem.offsetParent){do{curleft+=elem.offsetLeft;}while(elem=elem.offsetParent);}
return curleft;};container[audiojs].events.addListener(playPause,'click',function(e){audio.playPause.apply(audio);});container[audiojs].events.addListener(scrubber,'click',function(e){var relativeLeft=e.clientX-leftPos(this);audio.skipTo(relativeLeft/scrubber.offsetWidth);});if(audio.settings.useFlash)return;container[audiojs].events.trackLoadProgress(audio);container[audiojs].events.addListener(audio.element,'timeupdate',function(e){audio.updatePlayhead.apply(audio);});container[audiojs].events.addListener(audio.element,'ended',function(e){audio.trackEnded.apply(audio);});container[audiojs].events.addListener(audio.source,'error',function(e){clearInterval(audio.readyTimer);clearInterval(audio.loadTimer);audio.settings.loadError.apply(audio);});},attachFlashEvents:function(element,audio){audio['swfReady']=false;audio['load']=function(mp3){audio.mp3=mp3;if(audio.swfReady)audio.element.load(mp3);}
audio['loadProgress']=function(percent,duration){audio.loadedPercent=percent;audio.duration=duration;audio.settings.loadStarted.apply(audio);audio.settings.loadProgress.apply(audio,[percent]);}
audio['skipTo']=function(percent){if(percent>audio.loadedPercent)return;audio.updatePlayhead.call(audio,[percent])
audio.element.skipTo(percent);}
audio['updatePlayhead']=function(percent){audio.settings.updatePlayhead.apply(audio,[percent]);}
audio['play']=function(){if(!audio.settings.preload){audio.settings.preload=true;audio.element.init(audio.mp3);}
audio.playing=true;audio.element.pplay();audio.settings.play.apply(audio);}
audio['pause']=function(){audio.playing=false;audio.element.ppause();audio.settings.pause.apply(audio);}
audio['setVolume']=function(v){audio.element.setVolume(v);}
audio['loadStarted']=function(){audio.swfReady=true;if(audio.settings.preload)audio.element.init(audio.mp3);if(audio.settings.autoplay)audio.play.apply(audio);}},injectFlash:function(audio,id){var flashSource=this.flashSource.replace(/\$1/g,id);flashSource=flashSource.replace(/\$2/g,audio.settings.swfLocation);flashSource=flashSource.replace(/\$3/g,(+new Date+Math.random()));var html=audio.wrapper.innerHTML,div=document.createElement('div');div.innerHTML=flashSource+html;audio.wrapper.innerHTML=div.innerHTML;audio.element=this.helpers.getSwf(id);},helpers:{merge:function(obj1,obj2){for(attr in obj2){if(obj1.hasOwnProperty(attr)||obj2.hasOwnProperty(attr)){obj1[attr]=obj2[attr];}}},clone:function(obj){if(obj==null||typeof(obj)!=='object')return obj;var temp=new obj.constructor();for(var key in obj)temp[key]=arguments.callee(obj[key]);return temp;},addClass:function(element,className){var re=new RegExp('(\\s|^)'+className+'(\\s|$)');if(re.test(element.className))return;element.className+=' '+className;},removeClass:function(element,className){var re=new RegExp('(\\s|^)'+className+'(\\s|$)');element.className=element.className.replace(re,' ');},injectCss:function(audio,string){var prepend='',styles=document.getElementsByTagName('style'),css=string.replace(/\$1/g,audio.settings.imageLocation);for(var i=0,ii=styles.length;i<ii;i++){var title=styles[i].getAttribute('title');if(title&&~title.indexOf('audiojs')){style=styles[i];if(style.innerHTML===css)return;prepend=style.innerHTML;break;}};var head=document.getElementsByTagName('head')[0],firstchild=head.firstChild,style=document.createElement('style');if(!head)return;style.setAttribute('type','text/css');style.setAttribute('title','audiojs');if(style.styleSheet)style.styleSheet.cssText=prepend+css;else style.appendChild(document.createTextNode(prepend+css));if(firstchild)head.insertBefore(style,firstchild);else head.appendChild(styleElement);},cloneHtml5Node:function(audioTag){var fragment=document.createDocumentFragment(),doc=fragment.createElement?fragment:document;doc.createElement('audio');var div=doc.createElement('div');fragment.appendChild(div);div.innerHTML=audioTag.outerHTML;return div.firstChild;},getSwf:function(name){var swf=document[name]||window[name];return swf.length>1?swf[swf.length-1]:swf;}},events:{memoryLeaking:false,listeners:[],addListener:function(element,eventName,func){if(element.addEventListener){element.addEventListener(eventName,func,false);}else if(element.attachEvent){this.listeners.push(element);if(!this.memoryLeaking){window.attachEvent('onunload',function(){if(this.listeners){for(var i=0,ii=this.listeners.length;i<ii;i++){container[audiojs].events.purge(this.listeners[i]);}}});this.memoryLeaking=true;}
element.attachEvent('on'+eventName,function(){func.call(element,window.event);});}},trackLoadProgress:function(audio){if(!audio.settings.preload)return;var readyTimer,loadTimer,audio=audio,ios=(/(ipod|iphone|ipad)/i).test(navigator.userAgent);readyTimer=setInterval(function(){if(audio.element.readyState>-1){if(!ios)audio.init.apply(audio);}
if(audio.element.readyState>1){if(audio.settings.autoplay)audio.play.apply(audio);clearInterval(readyTimer);loadTimer=setInterval(function(){audio.loadProgress.apply(audio);if(audio.loadedPercent>=1)clearInterval(loadTimer);});}},10);audio.readyTimer=readyTimer;audio.loadTimer=loadTimer;},purge:function(d){var a=d.attributes,i;if(a){for(i=0;i<a.length;i+=1){if(typeof d[a[i].name]==='function')d[a[i].name]=null;}}
a=d.childNodes;if(a){for(i=0;i<a.length;i+=1)purge(d.childNodes[i]);}},ready:(function(){return function(fn){var win=window,done=false,top=true,doc=win.document,root=doc.documentElement,add=doc.addEventListener?'addEventListener':'attachEvent',rem=doc.addEventListener?'removeEventListener':'detachEvent',pre=doc.addEventListener?'':'on',init=function(e){if(e.type=='readystatechange'&&doc.readyState!='complete')return;(e.type=='load'?win:doc)[rem](pre+e.type,init,false);if(!done&&(done=true))fn.call(win,e.type||e);},poll=function(){try{root.doScroll('left');}catch(e){setTimeout(poll,50);return;}
init('poll');};if(doc.readyState=='complete')fn.call(win,'lazy');else{if(doc.createEventObject&&root.doScroll){try{top=!win.frameElement;}catch(e){}
if(top)poll();}
doc[add](pre+'DOMContentLoaded',init,false);doc[add](pre+'readystatechange',init,false);win[add](pre+'load',init,false);}}})()}}
container[audiojsInstance]=function(element,settings){this.element=element;this.wrapper=element.parentNode;this.source=element.getElementsByTagName('source')[0]||element;this.mp3=(function(element){var source=element.getElementsByTagName('source')[0];return element.getAttribute('src')||(source?source.getAttribute('src'):null);})(element);this.settings=settings;this.loadStartedCalled=false;this.loadedPercent=0;this.duration=1;this.playing=false;}
container[audiojsInstance].prototype={updatePlayhead:function(){var percent=this.element.currentTime/this.duration;this.settings.updatePlayhead.apply(this,[percent]);},skipTo:function(percent){if(percent>this.loadedPercent)return;this.element.currentTime=this.duration*percent;this.updatePlayhead();},load:function(mp3){this.loadStartedCalled=false;this.source.setAttribute('src',mp3);this.element.load();this.mp3=mp3;container[audiojs].events.trackLoadProgress(this);},loadError:function(){this.settings.loadError.apply(this);},init:function(){this.settings.init.apply(this);},loadStarted:function(){if(!this.element.duration)return false;this.duration=this.element.duration;this.updatePlayhead();this.settings.loadStarted.apply(this);},loadProgress:function(){if(this.element.buffered!=null&&this.element.buffered.length){if(!this.loadStartedCalled){this.loadStartedCalled=this.loadStarted();}
var durationLoaded=this.element.buffered.end(this.element.buffered.length-1);this.loadedPercent=durationLoaded/this.duration;this.settings.loadProgress.apply(this,[this.loadedPercent]);}},playPause:function(){if(this.playing)this.pause();else this.play();},play:function(){var ios=(/(ipod|iphone|ipad)/i).test(navigator.userAgent);if(ios&&this.element.readyState==0)this.init.apply(this);if(!this.settings.preload){this.settings.preload=true;this.element.setAttribute('preload','auto');container[audiojs].events.trackLoadProgress(this);}
this.playing=true;this.element.play();this.settings.play.apply(this);},pause:function(){this.playing=false;this.element.pause();this.settings.pause.apply(this);},setVolume:function(v){this.element.volume=v;},trackEnded:function(e){this.skipTo.apply(this,[0]);if(!this.settings.loop)this.pause.apply(this);this.settings.trackEnded.apply(this);}}
var getByClass=function(searchClass,node){var matches=[];node=node||document;if(node.getElementsByClassName){matches=node.getElementsByClassName(searchClass);}else{var i,l,els=node.getElementsByTagName("*"),pattern=new RegExp("(^|\\s)"+searchClass+"(\\s|$)");for(i=0,l=els.length;i<l;i++){if(pattern.test(els[i].className)){matches.push(els[i]);}}}
return matches.length>1?matches:matches[0];};})('audiojs','audiojsInstance',this);

35
js/audiojs-doc-ready.js

@ -1,35 +0,0 @@
// initialise plugins
jQuery(document).ready(function($){
//alert('is running');
// Audio js
audiojs.events.ready(function() {
var as = audiojs.createAll();
});
});
jQuery(window).load(function($){
jQuery(".audiojs").each(function() {
var wi = jQuery(this).width();
if (wi <= 310){
jQuery(this).addClass('audioResize');
}else {
jQuery(this).removeClass('audioResize');
}
});
});
/*
$(window).on("resize load", function () {
var wi = $('#audiojs_wrapper0').width();
if (wi <= 267){
$('#audiojs_wrapper0').addClass('audioResize');
}
else {
$('#audiojs_wrapper0').removeClass('audioResize');
}
});
*/

2381
js/base-cachekey3894.css

File diff suppressed because it is too large

25
js/collapse-image.js

@ -1,25 +0,0 @@
$(document).ready(function(){
$(".div-collapse").click(function () {
//open up the content needed - toggle the slide- if visible, slide up, if not slidedown.
$(".caixa-collapse").slideToggle(2, function () {
//execute this after slideToggle is done
//change text of header based on visibility of content div
});
if ($("#img_click").attr("src") == "../../theme/ilb/pix/smarts/bg_saiba_mais_header2_curso.png") {
$('#img_click').attr('src','../../theme/ilb/pix/smarts/bg_saiba_mais_fechado2.png');
}
else{
$('#img_click').attr('src','../../theme/ilb/pix/smarts/bg_saiba_mais_header2_curso.png');
$(".caixa-collapse").css("margin-top", "0");
}
$header = $(this);
//getting the next element
});
});

10253
js/jquery.js

File diff suppressed because it is too large

2
js/jquery.lazyload.min.js

@ -1,2 +0,0 @@
/*! Lazy Load 1.9.3 - MIT license - Copyright 2010-2013 Mika Tuupola */
!function(a,b,c,d){var e=a(b);a.fn.lazyload=function(f){function g(){var b=0;i.each(function(){var c=a(this);if(!j.skip_invisible||c.is(":visible"))if(a.abovethetop(this,j)||a.leftofbegin(this,j));else if(a.belowthefold(this,j)||a.rightoffold(this,j)){if(++b>j.failure_limit)return!1}else c.trigger("appear"),b=0})}var h,i=this,j={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:b,data_attribute:"original",skip_invisible:!0,appear:null,load:null,placeholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC"};return f&&(d!==f.failurelimit&&(f.failure_limit=f.failurelimit,delete f.failurelimit),d!==f.effectspeed&&(f.effect_speed=f.effectspeed,delete f.effectspeed),a.extend(j,f)),h=j.container===d||j.container===b?e:a(j.container),0===j.event.indexOf("scroll")&&h.bind(j.event,function(){return g()}),this.each(function(){var b=this,c=a(b);b.loaded=!1,(c.attr("src")===d||c.attr("src")===!1)&&c.is("img")&&c.attr("src",j.placeholder),c.one("appear",function(){if(!this.loaded){if(j.appear){var d=i.length;j.appear.call(b,d,j)}a("<img />").bind("load",function(){var d=c.attr("data-"+j.data_attribute);c.hide(),c.is("img")?c.attr("src",d):c.css("background-image","url('"+d+"')"),c[j.effect](j.effect_speed),b.loaded=!0;var e=a.grep(i,function(a){return!a.loaded});if(i=a(e),j.load){var f=i.length;j.load.call(b,f,j)}}).attr("src",c.attr("data-"+j.data_attribute))}}),0!==j.event.indexOf("scroll")&&c.bind(j.event,function(){b.loaded||c.trigger("appear")})}),e.bind("resize",function(){g()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&e.bind("pageshow",function(b){b.originalEvent&&b.originalEvent.persisted&&i.each(function(){a(this).trigger("appear")})}),a(c).ready(function(){g()}),this},a.belowthefold=function(c,f){var g;return g=f.container===d||f.container===b?(b.innerHeight?b.innerHeight:e.height())+e.scrollTop():a(f.container).offset().top+a(f.container).height(),g<=a(c).offset().top-f.threshold},a.rightoffold=function(c,f){var g;return g=f.container===d||f.container===b?e.width()+e.scrollLeft():a(f.container).offset().left+a(f.container).width(),g<=a(c).offset().left-f.threshold},a.abovethetop=function(c,f){var g;return g=f.container===d||f.container===b?e.scrollTop():a(f.container).offset().top,g>=a(c).offset().top+f.threshold+a(c).height()},a.leftofbegin=function(c,f){var g;return g=f.container===d||f.container===b?e.scrollLeft():a(f.container).offset().left,g>=a(c).offset().left+f.threshold+a(c).width()},a.inviewport=function(b,c){return!(a.rightoffold(b,c)||a.leftofbegin(b,c)||a.belowthefold(b,c)||a.abovethetop(b,c))},a.extend(a.expr[":"],{"below-the-fold":function(b){return a.belowthefold(b,{threshold:0})},"above-the-top":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-screen":function(b){return a.rightoffold(b,{threshold:0})},"left-of-screen":function(b){return!a.rightoffold(b,{threshold:0})},"in-viewport":function(b){return a.inviewport(b,{threshold:0})},"above-the-fold":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-fold":function(b){return a.rightoffold(b,{threshold:0})},"left-of-fold":function(b){return!a.rightoffold(b,{threshold:0})}})}(jQuery,window,document);

11
js/manifest.json?v=697oma3x8q

@ -1,11 +0,0 @@
{
"icons": [
{
"src": "\/noticias\/++resource++senado.noticias\/favicon\/android-chrome-192x192.png?v=697oma3x8q",
"sizes": "192x192",
"type": "image\/png"
}
],
"theme_color": "#00305c",
"display": "browser"
}

169
js/resourceconfigbootstrapbootstrap.min-cachekey1567.js

File diff suppressed because one or more lines are too long

335
js/resourceconfigjqueryjquery-1.11.2.min-cachekey3986.js

File diff suppressed because one or more lines are too long

2208
js/resourcesenado.jqueryjquery-cachekey5865.js

File diff suppressed because one or more lines are too long

85
js/resourcestaticjscalendario-cachekey4269.js

@ -1,85 +0,0 @@
/* - ++resource++static/js/calendario.js - */
$(document).ready(function(){
// var $ = $18; // version 1.8
// alert("[window.$, $]: " + window.$(document).jquery + ", " + $(document).jquery)
// Agenda
configCalendar();
// Notícia
configNoticia();
});
////////////////////////////////////////////////////////////////////////////
// Configuração do calendário para a utilização da agenda.
var calendarMesAtual = "";
// Configuração do calendário.
function configCalendar() {
mes = $(".portletCalendar .portletHeader").text();
if (mes == calendarMesAtual) {
return true;
}
// O mês foi alterado.
configCalendarLinks();
return false;
}
// Configuração de links para a agenda.
function configCalendarLinks() {
// Modifica o endereço dos links para apontarem para a view.
$("table.ploneCalendar a").each(function(index) {
var linkAgenda = $(this);
var endereco = linkAgenda.attr('href');
var texto = $(this).attr('title');
var data = texto.substring(0, 10);
var parts = endereco.split("/search");
var urlPresidencia = parts[0] + "/eventos";
var novoEndereco = urlPresidencia + "/pesquisaagenda?data=" + data;
linkAgenda.attr("href", novoEndereco);
});
// Tratamento dos eventos de mudança de mês (previous e next).
$(".portletCalendar a#calendar-previous, .portletCalendar a#calendar-next").each(function(index) {
$(this).click(function() {
calendarMesAtual = $(".portletCalendar .portletHeader").text();
serviceTimer(configCalendar, 1000);
});
});
}
// Configuração da view de notícia.
// Remove a imagem de upload na view de detalhamento da notícia.
function configNoticia() {
imgNoticia = $("div.newsImageContainer");
imgNoticia.remove();
sumario = $("div#parent-fieldname-description");
sumario.remove();
$(".newsDataPublicacao").after($('<div />').load('socialshare?NoticiaID='+ window.location));
}
function Imprimir(objeto){
var printContent = document.getElementById(objeto);
var parametrosExibicaoJanela = 'left=250,top=150,width=800,height=800px,toolbar=0,scrollbars=0,status=0,directories=no, menubar=no, resizable=no';
var winPrint = window.open('', '', parametrosExibicaoJanela);
winPrint.document.write(printContent.innerHTML);
var printIconesAcessibilidade = winPrint.document.getElementById('socialshare');
printIconesAcessibilidade.innerHTML = "";
winPrint.document.close();
winPrint.focus();
winPrint.print();
winPrint.close();
}
function EnviarEmail(objeto){
titulo = objeto.title;
endereco = objeto.location;
window.open("mailto:?Subject=" + titulo + "&body=" + titulo + escape('\n') + endereco);
}

68
js/resourcestaticjsphoto-gallery-cachekey3318.js

@ -1,68 +0,0 @@
/* - ++resource++static/js/photo-gallery.js - */
$(document).ready(function(){
$('li img').on('click',function(){
var src = $(this).attr('src');
var img = '<img src="' + src + '" class="img-responsive"/>';
//start of new code new code
var index = $(this).parent('li').index();
var html = '';
html += img;
html += '<div style="height:25px;clear:both;display:block;">';
html += '<a class="controls next" href="'+ (index+2) + '">próximo </a>';
html += '<a class="controls previous" href="' + (index) + '"> anterior</a>';
html += '</div>';
$('#myModal').modal();
$('#myModal').on('shown.bs.modal', function(){
$('#myModal .modal-body').html(html);
//new code
$('a.controls').trigger('click');
})
$('#myModal').on('hidden.bs.modal', function(){
$('#myModal .modal-body').html('');
});
});
})
$(document).on('click', 'a.controls', function(){
var index = $(this).attr('href');
var src = $('ul.row li:nth-child('+ index +') img').attr('src');
$('.modal-body img').attr('src', src);
var newPrevIndex = parseInt(index) - 1;
var newNextIndex = parseInt(newPrevIndex) + 2;
if($(this).hasClass('previous')){
$(this).attr('href', newPrevIndex);
$('a.next').attr('href', newNextIndex);
}else{
$(this).attr('href', newNextIndex);
$('a.previous').attr('href', newPrevIndex);
}
var total = $('ul.row li').length + 1;
//hide next button
if(total === newNextIndex){
$('a.next').hide();
}else{
$('a.next').show()
}
//hide previous button
if(newPrevIndex === 0){
$('a.previous').hide();
}else{
$('a.previous').show()
}
return false;
});

22
js/root_index.js

@ -1,22 +0,0 @@
/* global jQuery */
(function($) {
$(function() {
var carousel = $('#carrosselImagensSenado')
$("img.lazyload").lazyload({
event : "cliqueseta"
});
var carregaImagem = function() {
carousel.find('.item.active img.lazyload').trigger("cliqueseta")
}
carousel.on('slid.bs.carousel', function () {
carregaImagem();
})
carregaImagem();
});
})(jQuery);

17
js/sanfona.js

@ -1,17 +0,0 @@
$( document ).ready(function() {
var acc = document.getElementsByClassName("sanfona");
var i;
for (i = 0; i < acc.length; i++) {
acc[i].addEventListener("click", function() {
this.classList.toggle("active-sanfona");
var painel = this.nextElementSibling;
if (painel.style.display === "block") {
painel.style.display = "none";
} else {
painel.style.display = "block";
}
});
}
});

13
js/tabs.js

@ -1,13 +0,0 @@
function openCity(evt, tabId) {
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(tabId).style.display = "block";
evt.currentTarget.className += " active";
}

57
js/youtubeEvents.js

@ -1,57 +0,0 @@
/* global jQuery */
(function (global, $, undefined) {
$(function () {
var play = '{"event":"command","func":"playVideo"}',
pause = '{"event":"command","func":"pauseVideo"}'
$.fn.carouselVideo = function (options) {
var iframes = this.find('iframe.yt'),
$carousel = this
var masks = iframes.map(function (i, obj) {
var mask = $('<div class="ytmask">')
return mask.appendTo($(obj).closest('.item'))
})
this.on('click', '.ytmask', function (e) {
var $this = $(this)
$carousel.carousel('pause')
$this
.hide()
.closest('.item')
.find('iframe.yt')
.get(0)
.contentWindow
.postMessage(play, '*')
})
this.on('slid.bs.carousel', function () {
$carousel.carousel('cycle')
iframes.each(function () {
this.contentWindow.postMessage(pause, '*')
})
masks.each(function () {
$(this).show()
})
})
}
$('.js-carousel-ytvideo').carouselVideo()
})
})(window, jQuery)

12
lang/en/theme_ilb.php

@ -1,12 +0,0 @@
<?php
// Every file should have GPL and copyright in the header - we skip it in tutorials but you should not skip it for real.
// This line protects the file from being accessed by a URL directly.
defined('MOODLE_INTERNAL') || die();
// A description shown in the admin theme selector.
$string['choosereadme'] = 'Tema do ILB para o Moodle';
// The name of our plugin.
$string['pluginname'] = 'ILB';
// We need to include a lang string for each block region.
$string['region-side-pre'] = 'Right';

11
layout/columns1.php

@ -15,25 +15,22 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* A one column layout for the ilb theme.
* A one column layout for the boost theme.
*
* @package theme_ilb
* @package theme_boost
* @copyright 2016 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir . '/../config.php');
$bodyattributes = $OUTPUT->body_attributes([]);
$templatecontext = [
'sitename' => format_string($SITE->shortname, true, ['context' => context_course::instance(SITEID), "escape" => false]),
'output' => $OUTPUT,
'bodyattributes' => $bodyattributes,
'moodle_url' => $CFG->wwwroot
'bodyattributes' => $bodyattributes
];
echo $OUTPUT->render_from_template('theme_ilb/columns1', $templatecontext);
echo $OUTPUT->render_from_template('theme_boost/columns1', $templatecontext);

19
layout/columns2.php

@ -15,9 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* A two column layout for the ilb theme.
* A two column layout for the boost theme.
*
* @package theme_ilb
* @package theme_boost
* @copyright 2016 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@ -26,7 +26,6 @@ defined('MOODLE_INTERNAL') || die();
user_preference_allow_ajax_update('drawer-open-nav', PARAM_ALPHA);
require_once($CFG->libdir . '/behat/lib.php');
require_once($CFG->libdir . '/../config.php');
if (isloggedin()) {
$navdraweropen = (get_user_preferences('drawer-open-nav', 'true') == 'true');
@ -40,7 +39,9 @@ if ($navdraweropen) {
$bodyattributes = $OUTPUT->body_attributes($extraclasses);
$blockshtml = $OUTPUT->blocks('side-pre');
$hasblocks = strpos($blockshtml, 'data-block=') !== false;
$regionmainsettingsmenu = $OUTPUT->region_main_settings_menu();
$buildregionmainsettings = !$PAGE->include_region_main_settings_in_header_actions();
// If the settings menu will be included in the header then don't add it here.
$regionmainsettingsmenu = $buildregionmainsettings ? $OUTPUT->region_main_settings_menu() : false;
$templatecontext = [
'sitename' => format_string($SITE->shortname, true, ['context' => context_course::instance(SITEID), "escape" => false]),
'output' => $OUTPUT,
@ -49,9 +50,11 @@ $templatecontext = [
'bodyattributes' => $bodyattributes,
'navdraweropen' => $navdraweropen,
'regionmainsettingsmenu' => $regionmainsettingsmenu,
'hasregionmainsettingsmenu' => !empty($regionmainsettingsmenu),
'moodle_url' => $CFG->wwwroot
'hasregionmainsettingsmenu' => !empty($regionmainsettingsmenu)
];
$templatecontext['flatnavigation'] = $PAGE->flatnav;
echo $OUTPUT->render_from_template('theme_ilb/columns2', $templatecontext);
$nav = $PAGE->flatnav;
$templatecontext['flatnavigation'] = $nav;
$templatecontext['firstcollectionlabel'] = $nav->get_collectionlabel();
echo $OUTPUT->render_from_template('theme_boost/columns2', $templatecontext);

14
layout/embedded.php

@ -15,18 +15,22 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* An embedded layout for the ilb theme.
* An embedded layout for the boost theme.
*
* @package theme_ilb
* @package theme_boost
* @copyright 2016 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$fakeblockshtml = $OUTPUT->blocks('side-pre', array(), 'aside', true);
$hasfakeblocks = strpos($fakeblockshtml, 'data-block="_fake"') !== false;
$templatecontext = [
'sitename' => format_string($SITE->shortname, true, ['context' => context_course::instance(SITEID), "escape" => false]),
'output' => $OUTPUT
'output' => $OUTPUT,
'hasfakeblocks' => $hasfakeblocks,
'fakeblocks' => $fakeblockshtml,
];
echo $OUTPUT->render_from_template('theme_ilb/embedded', $templatecontext);
echo $OUTPUT->render_from_template('theme_boost/embedded', $templatecontext);

108
layout/frontpage_ilb.php

@ -1,108 +0,0 @@
<?php
// 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/>.
/**
* A one column layout for the ilb theme.
*
* @package theme_ilb
* @copyright 2016 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir . '/../config.php');
$bodyattributes = $OUTPUT->body_attributes([]);
if (isloggedin()) {
user_preference_allow_ajax_update('drawer-open-nav', PARAM_ALPHA);
require_once($CFG->libdir . '/behat/lib.php');
$navdraweropen = (get_user_preferences('drawer-open-nav', 'true') == 'true');
$extraclasses = [];
if ($navdraweropen) {
$extraclasses[] = 'drawer-open-left';
}
$blockshtml = $OUTPUT->blocks('side-pre');
$hasblocks = strpos($blockshtml, 'data-block=') !== false;
$regionmainsettingsmenu = $OUTPUT->region_main_settings_menu();
global $USER,$PAGE;
$user_picture=new user_picture($USER);
$user_picture_url=$user_picture->get_url($PAGE);
$user_profile_url=$CFG->wwwroot . "/user/profile.php?id=" . $USER->id . "&course=1";
$templatecontext = [
'sitename' => format_string($SITE->shortname, true, ['context' => context_course::instance(SITEID), "escape" => false]),
'output' => $OUTPUT,
'projetos_especiais' => $OUTPUT->image_url('projetos_especiais', 'theme'),
'conheca-senado' => $OUTPUT->image_url('conheca-senado', 'theme'),
'Cursos-on-line-sem-tutor' => $OUTPUT->image_url('Cursos-on-line-sem-tutor', 'theme'),
'Cursos-on-line' => $OUTPUT->image_url('Cursos-on-line', 'theme'),
'formacao_interna' => $OUTPUT->image_url('formacao_interna', 'theme'),
'oficinas-interlegis' => $OUTPUT->image_url('oficinas-interlegis', 'theme'),
'pos-graduacao' => $OUTPUT->image_url('pos-graduacao', 'theme'),
'video-aula' => $OUTPUT->image_url('video-aula', 'theme'),
'icon_ContatoEmail-azul' => $OUTPUT->image_url('icon_ContatoEmail-azul', 'theme'),
'icon_ContatoFone-azul' => $OUTPUT->image_url('icon_ContatoFone-azul', 'theme'),
'fundo-c' => $OUTPUT->image_url('fundo-c', 'theme'),
'fundo-c' => $OUTPUT->image_url('fundo-c', 'theme'),
'logo_saberes_xl' => $OUTPUT->image_url('logo_saberes_xl', 'theme'),
'sidepreblocks' => $blockshtml,
'hasblocks' => $hasblocks,
'bodyattributes' => $bodyattributes,
'CursosOnlineSemTutoria' => $OUTPUT->image_url('Cursos-on-line-sem-tutor', 'theme'),
'navdraweropen' => $navdraweropen,
'regionmainsettingsmenu' => $regionmainsettingsmenu,
'hasregionmainsettingsmenu' => !empty($regionmainsettingsmenu),
'username' => $USER->username,
'firstname' => $USER->firstname,
'lastname' => $USER->lastname,
'sessKey' => $USER->sesskey,
'loginChangeNotification' => false,
'moodle_url' => $CFG->wwwroot,
'userpictureurl' => $user_picture_url,
'userprofileurl' => $user_profile_url,
];
} else {
$templatecontext = [
'sitename' => format_string($SITE->shortname, true, ['context' => context_course::instance(SITEID), "escape" => false]),
'projetos_especiais' => $OUTPUT->image_url('projetos_especiais', 'theme'),
'conheca-senado' => $OUTPUT->image_url('conheca-senado', 'theme'),
'Cursos-on-line-sem-tutor' => $OUTPUT->image_url('Cursos-on-line-sem-tutor', 'theme'),
'Cursos-on-line' => $OUTPUT->image_url('Cursos-on-line', 'theme'),
'formacao_interna' => $OUTPUT->image_url('formacao_interna', 'theme'),
'oficinas-interlegis' => $OUTPUT->image_url('oficinas-interlegis', 'theme'),
'pos-graduacao' => $OUTPUT->image_url('pos-graduacao', 'theme'),
'video-aula' => $OUTPUT->image_url('video-aula', 'theme'),
'fundo-c' => $OUTPUT->image_url('fundo-c', 'theme'),
'icon_ContatoEmail-azul' => $OUTPUT->image_url('icon_ContatoEmail-azul', 'theme'),
'icon_ContatoFone-azul' => $OUTPUT->image_url('icon_ContatoFone-azul', 'theme'),
'logo_saberes_xl' => $OUTPUT->image_url('logo_saberes_xl', 'theme'),
'output' => $OUTPUT,
'bodyattributes' => $bodyattributes,
'moodle_url' => $CFG->wwwroot
];
}
$templatecontext['flatnavigation'] = $PAGE->flatnav;
echo $OUTPUT->render_from_template('theme_ilb/frontpage_ilb', $templatecontext);

11
layout/login.php

@ -16,12 +16,10 @@
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir . '/../config.php');
/**
* A login page layout for the ilb theme.
* A login page layout for the boost theme.
*
* @package theme_ilb
* @package theme_boost
* @copyright 2016 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@ -31,9 +29,8 @@ $bodyattributes = $OUTPUT->body_attributes();
$templatecontext = [
'sitename' => format_string($SITE->shortname, true, ['context' => context_course::instance(SITEID), "escape" => false]),
'output' => $OUTPUT,
'bodyattributes' => $bodyattributes,
'moodle_url' => $CFG->wwwroot
'bodyattributes' => $bodyattributes
];
echo $OUTPUT->render_from_template('theme_ilb/login', $templatecontext);
echo $OUTPUT->render_from_template('theme_boost/login', $templatecontext);

36
layout/login_nova_conta.php

@ -1,36 +0,0 @@
<?php
// 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/>.
defined('MOODLE_INTERNAL') || die();
/**
* A login page layout for the ilb theme.
*
* @package theme_ilb
* @copyright 2016 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$bodyattributes = $OUTPUT->body_attributes();
$templatecontext = [
'sitename' => format_string($SITE->shortname, true, ['context' => context_course::instance(SITEID), "escape" => false]),
'output' => $OUTPUT,
'bodyattributes' => $bodyattributes
];
echo $OUTPUT->render_from_template('theme_ilb/login_nova_conta', $templatecontext);

6
layout/maintenance.php

@ -15,9 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* A maintenance layout for the ilb theme.
* A maintenance layout for the boost theme.
*
* @package theme_ilb
* @package theme_boost
* @copyright 2016 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@ -31,4 +31,4 @@ $templatecontext = [
'output' => $OUTPUT
];
echo $OUTPUT->render_from_template('theme_ilb/maintenance', $templatecontext);
echo $OUTPUT->render_from_template('theme_boost/maintenance', $templatecontext);

6
layout/secure.php

@ -15,9 +15,9 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* A secure layout for the ilb theme.
* A secure layout for the boost theme.
*
* @package theme_ilb
* @package theme_boost
* @copyright 2016 Damyon Wiese
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@ -36,5 +36,5 @@ $templatecontext = [
'hasblocks' => $hasblocks
];
echo $OUTPUT->render_from_template('theme_ilb/secure', $templatecontext);
echo $OUTPUT->render_from_template('theme_boost/secure', $templatecontext);

186
lib.php

@ -1,34 +1,156 @@
<?php
// Every file should have GPL and copyright in the header - we skip it in tutorials but you should not skip it for real.
// This line protects the file from being accessed by a URL directly.
// 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/>.
/**
* Theme functions.
*
* @package theme_boost
* @copyright 2016 Frédéric Massart - FMCorz.net
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
// We will add callbacks here as we add features to our theme.
function theme_ilb_get_main_scss_content($theme) {
global $CFG;
$scss = '';
$filename = !empty($theme->settings->preset) ? $theme->settings->preset : null;
$fs = get_file_storage();
$context = context_system::instance();
if ($filename == 'default.scss') {
// We still load the default preset files directly from the boost theme. No sense in duplicating them.
$scss .= file_get_contents($CFG->dirroot . '/theme/boost/scss/preset/default.scss');
} else if ($filename == 'plain.scss') {
// We still load the default preset files directly from the boost theme. No sense in duplicating them.
$scss .= file_get_contents($CFG->dirroot . '/theme/boost/scss/preset/plain.scss');
} else if ($filename && ($presetfile = $fs->get_file($context->id, 'theme_ilb', 'preset', 0, '/', $filename))) {
// This preset file was fetched from the file area for theme_ilb and not theme_boost (see the line above).
$scss .= $presetfile->get_content();
} else {
// Safety fallback - maybe new installs etc.
$scss .= file_get_contents($CFG->dirroot . '/theme/boost/scss/preset/default.scss');
}
return $scss;
}
/**
* Post process the CSS tree.
*
* @param string $tree The CSS tree.
* @param theme_config $theme The theme config object.
*/
function theme_boost_css_tree_post_processor($tree, $theme) {
error_log('theme_boost_css_tree_post_processor() is deprecated. Required' .
'prefixes for Bootstrap are now in theme/boost/scss/moodle/prefixes.scss');
$prefixer = new theme_boost\autoprefixer($tree);
$prefixer->prefix();
}
/**
* Inject additional SCSS.
*
* @param theme_config $theme The theme config object.
* @return string
*/
function theme_boost_get_extra_scss($theme) {
$content = '';
$imageurl = $theme->setting_file_url('backgroundimage', 'backgroundimage');
// Sets the background image, and its settings.
if (!empty($imageurl)) {
$content .= 'body { ';
$content .= "background-image: url('$imageurl'); background-size: cover;";
$content .= ' }';
}
// Always return the background image with the scss when we have it.
return !empty($theme->settings->scss) ? $theme->settings->scss . ' ' . $content : $content;
}
/**
* Serves any files associated with the theme settings.
*
* @param stdClass $course
* @param stdClass $cm
* @param context $context
* @param string $filearea
* @param array $args
* @param bool $forcedownload
* @param array $options
* @return bool
*/
function theme_boost_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload, array $options = array()) {
if ($context->contextlevel == CONTEXT_SYSTEM && ($filearea === 'logo' || $filearea === 'backgroundimage')) {
$theme = theme_config::load('boost');
// By default, theme files must be cache-able by both browsers and proxies.
if (!array_key_exists('cacheability', $options)) {
$options['cacheability'] = 'public';
}
return $theme->setting_file_serve($filearea, $args, $forcedownload, $options);
} else {
send_file_not_found();
}
}
/**
* Returns the main SCSS content.
*
* @param theme_config $theme The theme config object.
* @return string
*/
function theme_boost_get_main_scss_content($theme) {
global $CFG;
$scss = '';
$filename = !empty($theme->settings->preset) ? $theme->settings->preset : null;
$fs = get_file_storage();
$context = context_system::instance();
if ($filename == 'default.scss') {
$scss .= file_get_contents($CFG->dirroot . '/theme/boost/scss/preset/default.scss');
} else if ($filename == 'plain.scss') {
$scss .= file_get_contents($CFG->dirroot . '/theme/boost/scss/preset/plain.scss');
} else if ($filename && ($presetfile = $fs->get_file($context->id, 'theme_boost', 'preset', 0, '/', $filename))) {
$scss .= $presetfile->get_content();
} else {
// Safety fallback - maybe new installs etc.
$scss .= file_get_contents($CFG->dirroot . '/theme/boost/scss/preset/default.scss');
}
return $scss;
}
/**
* Get compiled css.
*
* @return string compiled css
*/
function theme_boost_get_precompiled_css() {
global $CFG;
return file_get_contents($CFG->dirroot . '/theme/boost/style/moodle.css');
}
/**
* Get SCSS to prepend.
*
* @param theme_config $theme The theme config object.
* @return array
*/
function theme_boost_get_pre_scss($theme) {
global $CFG;
$scss = '';
$configurable = [
// Config key => [variableName, ...].
'brandcolor' => ['primary'],
];
// Prepend variables first.
foreach ($configurable as $configkey => $targets) {
$value = isset($theme->settings->{$configkey}) ? $theme->settings->{$configkey} : null;
if (empty($value)) {
continue;
}
array_map(function($target) use (&$scss, $value) {
$scss .= '$' . $target . ': ' . $value . ";\n";
}, (array) $targets);
}
// Prepend pre-scss.
if (!empty($theme->settings->scsspre)) {
$scss .= $theme->settings->scsspre;
}
return $scss;
}

BIN
pix/Cursos-on-line-sem-tutor.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

BIN
pix/Cursos-on-line-sem-tutor_BACKUP_25256.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

0
pix/Cursos-on-line-sem-tutor_BASE_25256.png

BIN
pix/Cursos-on-line-sem-tutor_LOCAL_25256.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

BIN
pix/Cursos-on-line-sem-tutor_REMOTE_25256.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

BIN
pix/Cursos-on-line.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

BIN
pix/aviso_saberes_offline.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 KiB

BIN
pix/conheca-senado.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

BIN
pix/favicon.ico

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
pix/formacao_interna.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

BIN
pix/fundo-c.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 B

BIN
pix/hand.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 645 B

BIN
pix/icon_ContatoEmail-azul.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 642 B

BIN
pix/icon_ContatoFone-azul.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 790 B

BIN
pix/logo_saberes_xl.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

BIN
pix/matricula_aberta.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

BIN
pix/matricula_aberta_verde.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

BIN
pix/matricula_encerrada.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

BIN
pix/matricula_encerrada_vermelho.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

BIN
pix/oficinas-interlegis.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

BIN
pix/pos-graduacao.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

BIN
pix/projetos_especiais.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

BIN
pix/screenshot.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

BIN
pix/smarts/bg_atencao_9bl_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 552 B

BIN
pix/smarts/bg_atencao_9br_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

BIN
pix/smarts/bg_atencao_9l_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 616 B

BIN
pix/smarts/bg_atencao_9meio_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

BIN
pix/smarts/bg_atencao_9r_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 557 B

BIN
pix/smarts/bg_atencao_9tl_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

BIN
pix/smarts/bg_atencao_9tr_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

BIN
pix/smarts/bg_atividade_9bl_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 260 B

BIN
pix/smarts/bg_atividade_9br_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 B

BIN
pix/smarts/bg_atividade_9l_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 383 B

BIN
pix/smarts/bg_atividade_9meio_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 B

BIN
pix/smarts/bg_atividade_9r_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 293 B

BIN
pix/smarts/bg_atividade_9tl_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

BIN
pix/smarts/bg_atividade_9tr_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 912 B

BIN
pix/smarts/bg_conceito_9bl_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 B

BIN
pix/smarts/bg_conceito_9br_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 286 B

BIN
pix/smarts/bg_conceito_9l_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 389 B

BIN
pix/smarts/bg_conceito_9meio_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 B

BIN
pix/smarts/bg_conceito_9r_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 297 B

BIN
pix/smarts/bg_conceito_9tl_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

BIN
pix/smarts/bg_conceito_9tr_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 918 B

BIN
pix/smarts/bg_curiosidade_9bl_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 564 B

BIN
pix/smarts/bg_curiosidade_9br_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

BIN
pix/smarts/bg_curiosidade_9l_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 624 B

BIN
pix/smarts/bg_curiosidade_9meio_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

BIN
pix/smarts/bg_curiosidade_9r_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 559 B

BIN
pix/smarts/bg_curiosidade_9tl_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

BIN
pix/smarts/bg_curiosidade_9tr_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

BIN
pix/smarts/bg_dica_9bl_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 567 B

BIN
pix/smarts/bg_dica_9br_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

BIN
pix/smarts/bg_dica_9l_curso.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 627 B

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save