@ -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); |
|
||||
} |
|
||||
|
|
||||
} |
|
@ -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); |
|
||||
} |
|
||||
|
|
||||
} |
|
@ -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); |
|
||||
} |
|
||||
|
|
||||
} |
|
@ -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', []); |
|
||||
} |
|
||||
} |
|
@ -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 ''; |
|
||||
} |
|
||||
} |
|
@ -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 ''; |
|
||||
} |
|
||||
} |
|
@ -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); |
|
||||
} |
|
||||
|
|
||||
} |
|
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 733 B |
Before Width: | Height: | Size: 792 B |
Before Width: | Height: | Size: 859 B |
Before Width: | Height: | Size: 926 B |
@ -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); |
|
@ -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'); |
|
||||
} |
|
||||
}); |
|
||||
*/ |
|
@ -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
|
|
||||
|
|
||||
|
|
||||
}); |
|
||||
}); |
|
@ -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); |
|
@ -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" |
|
||||
} |
|
@ -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); |
|
||||
} |
|
@ -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; |
|
||||
}); |
|
@ -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); |
|
@ -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"; |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
}); |
|
@ -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"; |
|
||||
} |
|
@ -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) |
|
@ -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'; |
|
@ -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); |
|
@ -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); |
|
||||
|
|
Before Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 268 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 154 B |
Before Width: | Height: | Size: 645 B |
Before Width: | Height: | Size: 642 B |
Before Width: | Height: | Size: 790 B |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 132 KiB |
Before Width: | Height: | Size: 552 B |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 616 B |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 557 B |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 260 B |
Before Width: | Height: | Size: 282 B |
Before Width: | Height: | Size: 383 B |
Before Width: | Height: | Size: 143 B |
Before Width: | Height: | Size: 293 B |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 912 B |
Before Width: | Height: | Size: 271 B |
Before Width: | Height: | Size: 286 B |
Before Width: | Height: | Size: 389 B |
Before Width: | Height: | Size: 143 B |
Before Width: | Height: | Size: 297 B |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 918 B |
Before Width: | Height: | Size: 564 B |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 624 B |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 559 B |
Before Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 567 B |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 627 B |