MOBILE-1611 filter: Don't force cache when getting modules
parent
7876d75ac2
commit
127e391cf4
|
@ -1,4 +1,4 @@
|
||||||
// (C) Copyright 2015 Martin Dougiamas
|
// (C) Copyright 2015 Moodle Pty Ltd.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
|
// (C) Copyright 2015 Moodle Pty Ltd.
|
||||||
// (C) Copyright 2015 Martin Dougiamas
|
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
|
@ -49,7 +48,6 @@ export class AddonFilterMathJaxLoaderHandler extends CoreFilterDefaultHandler {
|
||||||
|
|
||||||
// List of explicit mappings and known exceptions (moodle => mathjax).
|
// List of explicit mappings and known exceptions (moodle => mathjax).
|
||||||
protected EXPLICIT_MAPPING = {
|
protected EXPLICIT_MAPPING = {
|
||||||
'cz': 'cs',
|
|
||||||
'zh-tw': 'zh-hant',
|
'zh-tw': 'zh-hant',
|
||||||
'zh-cn': 'zh-hans',
|
'zh-cn': 'zh-hans',
|
||||||
};
|
};
|
||||||
|
@ -115,7 +113,6 @@ export class AddonFilterMathJaxLoaderHandler extends CoreFilterDefaultHandler {
|
||||||
|
|
||||||
// We cannot get the filter settings, so we cannot know if it can be used as a replacement for the TeX filter.
|
// We cannot get the filter settings, so we cannot know if it can be used as a replacement for the TeX filter.
|
||||||
// Assume it cannot (default value).
|
// Assume it cannot (default value).
|
||||||
|
|
||||||
let hasDisplayOrInline = false;
|
let hasDisplayOrInline = false;
|
||||||
if (text.match(/\\[\[\(]/) || text.match(/\$\$/)) {
|
if (text.match(/\\[\[\(]/) || text.match(/\$\$/)) {
|
||||||
// Only parse the text if there are mathjax symbols in it.
|
// Only parse the text if there are mathjax symbols in it.
|
||||||
|
@ -170,7 +167,7 @@ export class AddonFilterMathJaxLoaderHandler extends CoreFilterDefaultHandler {
|
||||||
/**
|
/**
|
||||||
* Check if the JS library has been loaded.
|
* Check if the JS library has been loaded.
|
||||||
*
|
*
|
||||||
* @return {boolean} Whether the library has been loaded.
|
* @return Whether the library has been loaded.
|
||||||
*/
|
*/
|
||||||
protected jsLoaded(): boolean {
|
protected jsLoaded(): boolean {
|
||||||
return this.window.M && this.window.M.filter_mathjaxloader;
|
return this.window.M && this.window.M.filter_mathjaxloader;
|
||||||
|
|
|
@ -71,7 +71,7 @@ export class CoreFilterHelperProvider {
|
||||||
*/
|
*/
|
||||||
getCourseModulesContexts(courseId: number, siteId?: string): Promise<{contextlevel: string, instanceid: number}[]> {
|
getCourseModulesContexts(courseId: number, siteId?: string): Promise<{contextlevel: string, instanceid: number}[]> {
|
||||||
|
|
||||||
return this.courseProvider.getSections(courseId, false, true, {omitExpires: true}, siteId).then((sections) => {
|
return this.courseProvider.getSections(courseId, false, true, undefined, siteId).then((sections) => {
|
||||||
const contexts: {contextlevel: string, instanceid: number}[] = [];
|
const contexts: {contextlevel: string, instanceid: number}[] = [];
|
||||||
|
|
||||||
sections.forEach((section) => {
|
sections.forEach((section) => {
|
||||||
|
|
Loading…
Reference in New Issue