Merge branch 'MDL-59165-master-2' of git://github.com/andrewnicols/moodle

This commit is contained in:
Jake Dallimore
2017-07-04 09:16:11 +08:00
3 changed files with 28 additions and 2 deletions
@@ -77,3 +77,4 @@ $string['pluginnotenabledorconfigured'] = 'Plugin not enabled or configured.';
$string['remoteaddons'] = 'Remote add-ons';
$string['typeoflogin'] = 'Type of login';
$string['typeoflogin_desc'] = 'If the site uses a SSO authentication method, then select via a browser window or via an embedded browser. An embedded browser provides a better user experience, though it doesn\'t work with all SSO plugins. If using SSO, autologinguests should be disabled.';
$string['getmoodleonyourmobile'] = 'Get Moodle on your mobile';
+15
View File
@@ -126,3 +126,18 @@ function tool_mobile_myprofile_navigation(\core_user\output\myprofile\tree $tree
$node = new core_user\output\myprofile\node('mobile', 'mobileappnode', $mobilestr, null);
$tree->add_node($node);
}
/**
* Callback to add footer elements.
*
* @return str valid html footer content
* @since Moodle 3.4
*/
function tool_mobile_standard_footer_html() {
global $CFG;
$output = '';
if (!empty($CFG->enablemobilewebservice) && $url = tool_mobile_create_app_download_url()) {
$output .= html_writer::link($url, get_string('getmoodleonyourmobile', 'tool_mobile'));
}
return $output;
}
+12 -2
View File
@@ -741,16 +741,26 @@ class core_renderer extends renderer_base {
public function standard_footer_html() {
global $CFG, $SCRIPT;
$output = '';
if (during_initial_install()) {
// Debugging info can not work before install is finished,
// in any case we do not want any links during installation!
return '';
return $output;
}
// Give plugins an opportunity to add any footer elements.
// The callback must always return a string containing valid html footer content.
$pluginswithfunction = get_plugins_with_function('standard_footer_html', 'lib.php');
foreach ($pluginswithfunction as $plugins) {
foreach ($plugins as $function) {
$output .= $function();
}
}
// This function is normally called from a layout.php file in {@link core_renderer::header()}
// but some of the content won't be known until later, so we return a placeholder
// for now. This will be replaced with the real content in {@link core_renderer::footer()}.
$output = $this->unique_performance_info_token;
$output .= $this->unique_performance_info_token;
if ($this->page->devicetypeinuse == 'legacy') {
// The legacy theme is in use print the notification
$output .= html_writer::tag('div', get_string('legacythemeinuse'), array('class'=>'legacythemeinuse'));