File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
frontend/src/components/assessments/reports Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -290,7 +290,8 @@ export default {
290
290
schoolNameNumberFilter: null ,
291
291
schoolSearchNames: [],
292
292
selectedSessionID: null ,
293
- isDistrictUser: false
293
+ isDistrictUser: false ,
294
+ schoolUserSchoolID: null
294
295
};
295
296
},
296
297
computed: {
@@ -303,6 +304,7 @@ export default {
303
304
async created () {
304
305
authStore ().getUserInfo ().then (() => {
305
306
this .isDistrictUser = this .userInfo .activeInstituteType !== ' SCHOOL' ;
307
+ this .schoolUserSchoolID = this .userInfo .activeInstituteType === ' SCHOOL' ? this .userInfo .activeInstituteIdentifier : null ;
306
308
});
307
309
await this .getAllSessions ();
308
310
this .setupSchoolLists ();
@@ -391,7 +393,8 @@ export default {
391
393
async downloadXamFile () {
392
394
this .isLoading = true ;
393
395
try {
394
- const url = ` ${ ApiRoutes .assessments .BASE_REPORTS_URL } /${ this .userInfo .activeInstituteType } /${ this .selectedSessionID } /school/${ this .schoolNameNumberFilter } /download` ;
396
+ const url = ` ${ ApiRoutes .assessments .BASE_REPORTS_URL } /${ this .userInfo .activeInstituteType } /${ this .selectedSessionID } /school/${
397
+ this .isDistrictUser ? this .schoolNameNumberFilter : this .schoolUserSchoolID } /download` ;
395
398
window .open (url);
396
399
} catch (error) {
397
400
console .error (error);
You can’t perform that action at this time.
0 commit comments