MOBILE-2900 courses: Exclude enrolled user count from WS call
parent
e3690ab2c6
commit
b23881299c
|
@ -176,7 +176,8 @@ export class CoreSite {
|
||||||
3.3: 2017051503,
|
3.3: 2017051503,
|
||||||
3.4: 2017111300,
|
3.4: 2017111300,
|
||||||
3.5: 2018051700,
|
3.5: 2018051700,
|
||||||
3.6: 2018120300
|
3.6: 2018120300,
|
||||||
|
3.7: 2019030700 // @todo: Replace it with the right 3.7 date when released
|
||||||
};
|
};
|
||||||
|
|
||||||
// Rest of variables.
|
// Rest of variables.
|
||||||
|
|
|
@ -682,14 +682,19 @@ export class CoreCoursesProvider {
|
||||||
return this.sitesProvider.getSite(siteId).then((site) => {
|
return this.sitesProvider.getSite(siteId).then((site) => {
|
||||||
|
|
||||||
const userId = site.getUserId(),
|
const userId = site.getUserId(),
|
||||||
data = {
|
data: any = {
|
||||||
userid: userId
|
userid: userId
|
||||||
},
|
},
|
||||||
preSets = {
|
preSets = {
|
||||||
cacheKey: this.getUserCoursesCacheKey(),
|
cacheKey: this.getUserCoursesCacheKey(),
|
||||||
|
getCacheUsingCacheKey: true,
|
||||||
omitExpires: !!preferCache
|
omitExpires: !!preferCache
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (site.isVersionGreaterEqualThan('3.7')) {
|
||||||
|
data.returnusercount = 0;
|
||||||
|
}
|
||||||
|
|
||||||
return site.read('core_enrol_get_users_courses', data, preSets);
|
return site.read('core_enrol_get_users_courses', data, preSets);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue