Merge pull request #2251 from crazyserver/MOBILE-3314
MOBILE-3314 assign: Check grade access before prefetchmain
commit
90fecdefa2
|
@ -443,7 +443,11 @@ export class AddonModAssignPrefetchHandler extends CoreCourseActivityPrefetchHan
|
|||
|
||||
// Prefetch grade items.
|
||||
if (userId) {
|
||||
promises.push(this.gradesHelper.getGradeModuleItems(courseId, moduleId, userId, undefined, siteId, true));
|
||||
promises.push(this.courseProvider.getModuleBasicGradeInfo(moduleId, siteId).then((gradeInfo) => {
|
||||
if (gradeInfo) {
|
||||
promises.push(this.gradesHelper.getGradeModuleItems(courseId, moduleId, userId, undefined, siteId, true));
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
// Prefetch feedback.
|
||||
|
|
|
@ -24,7 +24,6 @@ import { CoreGroupsProvider } from '@providers/groups';
|
|||
import { CoreTextUtilsProvider } from '@providers/utils/text';
|
||||
import { CoreCourseActivityPrefetchHandlerBase } from '@core/course/classes/activity-prefetch-handler';
|
||||
import { CoreCourseHelperProvider } from '@core/course/providers/helper';
|
||||
import { CoreGradesHelperProvider } from '@core/grades/providers/helper';
|
||||
import { CoreUserProvider } from '@core/user/providers/user';
|
||||
import { AddonModWikiProvider } from './wiki';
|
||||
import { AddonModWikiSyncProvider } from './wiki-sync';
|
||||
|
@ -55,7 +54,6 @@ export class AddonModWikiPrefetchHandler extends CoreCourseActivityPrefetchHandl
|
|||
protected textUtils: CoreTextUtilsProvider,
|
||||
protected courseHelper: CoreCourseHelperProvider,
|
||||
protected groupsProvider: CoreGroupsProvider,
|
||||
protected gradesHelper: CoreGradesHelperProvider,
|
||||
protected syncProvider: AddonModWikiSyncProvider) {
|
||||
|
||||
super(translate, appProvider, utils, courseProvider, filepoolProvider, sitesProvider, domUtils, filterHelper,
|
||||
|
|
Loading…
Reference in New Issue