diff --git a/scripts/langindex.json b/scripts/langindex.json index 16f8cbda6..6377afa61 100644 --- a/scripts/langindex.json +++ b/scripts/langindex.json @@ -869,6 +869,7 @@ "addon.mod_scorm.organizations": "scorm", "addon.mod_scorm.passed": "scorm", "addon.mod_scorm.reviewmode": "scorm", + "addon.mod_scorm.score": "scorm", "addon.mod_scorm.scormstatusnotdownloaded": "local_moodlemobileapp", "addon.mod_scorm.scormstatusoutdated": "local_moodlemobileapp", "addon.mod_scorm.suspended": "scorm", @@ -1564,6 +1565,7 @@ "core.login.auth_email": "auth_email/pluginname", "core.login.authenticating": "local_moodlemobileapp", "core.login.cancel": "moodle", + "core.login.changepassowrdinstructions": "local_moodlemobileapp", "core.login.changepassword": "moodle", "core.login.changepasswordbutton": "local_moodlemobileapp", "core.login.changepasswordhelp": "local_moodlemobileapp", diff --git a/src/addon/mod/scorm/components/index/addon-mod-scorm-index.html b/src/addon/mod/scorm/components/index/addon-mod-scorm-index.html index dffd0c865..265323472 100644 --- a/src/addon/mod/scorm/components/index/addon-mod-scorm-index.html +++ b/src/addon/mod/scorm/components/index/addon-mod-scorm-index.html @@ -100,6 +100,7 @@ + ({{ 'addon.mod_scorm.score' | translate }}: {{sco.score_raw}})

diff --git a/src/addon/mod/scorm/lang/en.json b/src/addon/mod/scorm/lang/en.json index c5b06c51a..e7d6e5cfb 100644 --- a/src/addon/mod/scorm/lang/en.json +++ b/src/addon/mod/scorm/lang/en.json @@ -44,6 +44,7 @@ "organizations": "Organisations", "passed": "Passed", "reviewmode": "Review mode", + "score": "Score", "scormstatusnotdownloaded": "This SCORM package is not downloaded. It will be automatically downloaded when you open it.", "scormstatusoutdated": "This SCORM package has been modified since the last download. It will be automatically downloaded when you open it.", "suspended": "Suspended", diff --git a/src/addon/mod/scorm/pages/player/player.ts b/src/addon/mod/scorm/pages/player/player.ts index 1334a74d4..a7b507809 100644 --- a/src/addon/mod/scorm/pages/player/player.ts +++ b/src/addon/mod/scorm/pages/player/player.ts @@ -45,6 +45,7 @@ export class AddonModScormPlayerPage implements OnInit, OnDestroy { nextSco: any; // Next SCO. src: string; // Iframe src. errorMessage: string; // Error message. + accessInfo: any; // Access information. protected siteId: string; protected mode: string; // Mode to play the SCORM. @@ -239,6 +240,10 @@ export class AddonModScormPlayerPage implements OnInit, OnDestroy { .then((data) => { this.userData = data; })); + // Get access information. + promises.push(this.scormProvider.getAccessInformation(this.scorm.id).then((accessInfo) => { + this.accessInfo = accessInfo; + })); return Promise.all(promises); }); @@ -394,7 +399,8 @@ export class AddonModScormPlayerPage implements OnInit, OnDestroy { mode: this.mode, selected: this.currentSco && this.currentSco.id, moduleId: this.scorm.coursemodule, - courseId: this.scorm.course + courseId: this.scorm.course, + accessInfo: this.accessInfo }, { cssClass: 'core-modal-lateral', showBackdrop: true, enableBackdropDismiss: true, diff --git a/src/addon/mod/scorm/pages/toc/toc.html b/src/addon/mod/scorm/pages/toc/toc.html index 8ed5ab7c5..0cff8c294 100644 --- a/src/addon/mod/scorm/pages/toc/toc.html +++ b/src/addon/mod/scorm/pages/toc/toc.html @@ -26,6 +26,7 @@ + ({{ 'addon.mod_scorm.score' | translate }}: {{sco.score_raw}}) diff --git a/src/addon/mod/scorm/pages/toc/toc.ts b/src/addon/mod/scorm/pages/toc/toc.ts index 8aee2d236..8e25df969 100644 --- a/src/addon/mod/scorm/pages/toc/toc.ts +++ b/src/addon/mod/scorm/pages/toc/toc.ts @@ -32,12 +32,14 @@ export class AddonModScormTocPage { selected: number; moduleId: number; courseId: number; + accessInfo: any; constructor(navParams: NavParams, private viewCtrl: ViewController) { this.toc = navParams.get('toc') || []; this.attemptToContinue = navParams.get('attemptToContinue'); this.moduleId = navParams.get('moduleId'); this.courseId = navParams.get('courseId'); + this.accessInfo = navParams.get('accessInfo'); const mode = navParams.get('mode'); this.selected = navParams.get('selected'); diff --git a/src/addon/mod/scorm/providers/scorm.ts b/src/addon/mod/scorm/providers/scorm.ts index f2fadc93a..2592cbb25 100644 --- a/src/addon/mod/scorm/providers/scorm.ts +++ b/src/addon/mod/scorm/providers/scorm.ts @@ -949,6 +949,9 @@ export class AddonModScormProvider { // Exit var. sco.exitvar = typeof scoData.exitvar == 'undefined' ? 'cmi.core.exit' : scoData.exitvar; sco.exitvalue = scoData[sco.exitvar]; + + // Copy score. + sco.score_raw = scoData.score_raw; }); return scos; diff --git a/src/assets/lang/en.json b/src/assets/lang/en.json index 369ad5236..0258261e8 100644 --- a/src/assets/lang/en.json +++ b/src/assets/lang/en.json @@ -868,6 +868,7 @@ "addon.mod_scorm.organizations": "Organisations", "addon.mod_scorm.passed": "Passed", "addon.mod_scorm.reviewmode": "Review mode", + "addon.mod_scorm.score": "Score", "addon.mod_scorm.scormstatusnotdownloaded": "This SCORM package is not downloaded. It will be automatically downloaded when you open it.", "addon.mod_scorm.scormstatusoutdated": "This SCORM package has been modified since the last download. It will be automatically downloaded when you open it.", "addon.mod_scorm.suspended": "Suspended",