MOBILE-3218 mod: Fix isPluginEnabled return type on activities
parent
6ad4d8744d
commit
a6432ad7b7
|
@ -304,7 +304,7 @@ export class AddonModImscpProvider {
|
||||||
* @param siteId Site ID. If not defined, current site.
|
* @param siteId Site ID. If not defined, current site.
|
||||||
* @return Promise resolved with true if plugin is enabled, rejected or resolved with false otherwise.
|
* @return Promise resolved with true if plugin is enabled, rejected or resolved with false otherwise.
|
||||||
*/
|
*/
|
||||||
isPluginEnabled(siteId?: string): Promise<any> {
|
isPluginEnabled(siteId?: string): Promise<boolean> {
|
||||||
return this.sitesProvider.getSite(siteId).then((site) => {
|
return this.sitesProvider.getSite(siteId).then((site) => {
|
||||||
return site.canDownloadFiles();
|
return site.canDownloadFiles();
|
||||||
});
|
});
|
||||||
|
|
|
@ -2775,7 +2775,7 @@ export class AddonModLessonProvider {
|
||||||
* @param siteId Site ID. If not defined, current site.
|
* @param siteId Site ID. If not defined, current site.
|
||||||
* @return Promise resolved with true if plugin is enabled, rejected or resolved with false otherwise.
|
* @return Promise resolved with true if plugin is enabled, rejected or resolved with false otherwise.
|
||||||
*/
|
*/
|
||||||
isPluginEnabled(siteId?: string): Promise<any> {
|
isPluginEnabled(siteId?: string): Promise<boolean> {
|
||||||
return this.sitesProvider.getSite(siteId).then((site) => {
|
return this.sitesProvider.getSite(siteId).then((site) => {
|
||||||
// All WS were introduced at the same time so checking one is enough.
|
// All WS were introduced at the same time so checking one is enough.
|
||||||
return site.wsAvailable('mod_lesson_get_lesson_access_information');
|
return site.wsAvailable('mod_lesson_get_lesson_access_information');
|
||||||
|
|
Loading…
Reference in New Issue