MOBILE-3201 wiki: Fix wiki page log
parent
b4f563282b
commit
0787368872
|
@ -13,7 +13,7 @@ ion-app.app-root addon-mod-wiki-index {
|
||||||
.addon-mod_wiki-page-content {
|
.addon-mod_wiki-page-content {
|
||||||
background-color: $white;
|
background-color: $white;
|
||||||
border-top: 1px solid $gray;
|
border-top: 1px solid $gray;
|
||||||
@include safe-area-padding-horizontal(0px, 0px);
|
@include safe-area-padding-horizontal(10px, 10px);
|
||||||
@include darkmode() {
|
@include darkmode() {
|
||||||
background-color: $black;
|
background-color: $black;
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,14 +99,14 @@ export class AddonModWikiIndexComponent extends CoreCourseModuleMainActivityComp
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isMainPage) {
|
if (!this.pageId) {
|
||||||
this.wikiProvider.logView(this.wiki.id, this.wiki.name).then(() => {
|
this.wikiProvider.logView(this.wiki.id, this.wiki.name).then(() => {
|
||||||
this.courseProvider.checkModuleCompletion(this.courseId, this.module.completiondata);
|
this.courseProvider.checkModuleCompletion(this.courseId, this.module.completiondata);
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
// Ignore errors.
|
// Ignore errors.
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.wikiProvider.logPageView(this.pageId, this.wiki.id, this.wiki.name).catch(() => {
|
this.wikiProvider.logPageView(this.pageId, this.wiki.id, this.wiki.name).catch((error) => {
|
||||||
// Ignore errors.
|
// Ignore errors.
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -280,9 +280,11 @@ export class AddonModWikiIndexComponent extends CoreCourseModuleMainActivityComp
|
||||||
this.currentPage = data.pageId;
|
this.currentPage = data.pageId;
|
||||||
|
|
||||||
this.showLoadingAndFetch(true, false).then(() => {
|
this.showLoadingAndFetch(true, false).then(() => {
|
||||||
|
if (this.currentPage) {
|
||||||
this.wikiProvider.logPageView(this.currentPage, this.wiki.id, this.wiki.name).catch(() => {
|
this.wikiProvider.logPageView(this.currentPage, this.wiki.id, this.wiki.name).catch(() => {
|
||||||
// Ignore errors.
|
// Ignore errors.
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Stop listening for new page events.
|
// Stop listening for new page events.
|
||||||
|
|
Loading…
Reference in New Issue