"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[81872,69006],{74919:(e,n,t)=>{t.r(n),t.d(n,{default:()=>h});var o=t(2138),r=t(49983),i=t(86654),d=t(54438),s=t(2910),a=t(58197),l=t(68273),u=t(88246),c=t(73955);let h=(()=>{var e;class AddonModLtiIndexPage extends o._{}return(e=AddonModLtiIndexPage).ɵfac=(()=>{let n;return function AddonModLtiIndexPage_Factory(t){return(n||(n=d.xGo(e)))(t||e)}})(),e.ɵcmp=d.VBU({type:e,selectors:[["page-addon-mod-lti-index"]],viewQuery:function AddonModLtiIndexPage_Query(e,n){if(1&e&&d.GBs(r.AddonModLtiIndexComponent,5),2&e){let e;d.mGM(e=d.lsd())&&(n.activityComponent=e.first)}},standalone:!0,features:[d.Vt3,d.aNF],decls:14,vars:12,consts:[["collapsible",""],["slot","start"],[3,"text"],["contextLevel","module",3,"text","contextInstanceId","courseId"],["slot","end"],[1,"limited-width"],["slot","fixed",3,"ionRefresh","disabled"],[3,"pullingText"],[3,"dataRetrieved","module","courseId"]],template:function AddonModLtiIndexPage_Template(e,n){1&e&&(d.j41(0,"ion-header",0)(1,"ion-toolbar")(2,"ion-buttons",1),d.nrm(3,"ion-back-button",2),d.nI1(4,"translate"),d.k0s(),d.j41(5,"ion-title")(6,"h1"),d.nrm(7,"core-format-text",3),d.k0s()(),d.nrm(8,"ion-buttons",4),d.k0s()(),d.j41(9,"ion-content",5)(10,"ion-refresher",6),d.bIt("ionRefresh",(function AddonModLtiIndexPage_Template_ion_refresher_ionRefresh_10_listener(e){return null==n.activityComponent?null:n.activityComponent.doRefresh(e.target)})),d.nrm(11,"ion-refresher-content",7),d.nI1(12,"translate"),d.k0s(),d.j41(13,"addon-mod-lti-index",8),d.bIt("dataRetrieved",(function AddonModLtiIndexPage_Template_addon_mod_lti_index_dataRetrieved_13_listener(e){return n.updateData(e)})),d.k0s()()),2&e&&(d.R7$(3),d.Y8G("text",d.bMT(4,8,"core.back")),d.R7$(4),d.Y8G("text",n.title)("contextInstanceId",n.module.id)("courseId",n.courseId),d.R7$(3),d.Y8G("disabled",null==n.activityComponent?null:n.activityComponent.showLoading),d.R7$(),d.FS9("pullingText",d.bMT(12,10,"core.pulltorefresh")),d.R7$(2),d.Y8G("module",n.module)("courseId",n.courseId))},dependencies:[i.n,s.QW,s.W9,s.eU,s.To,s.Ki,s.BC,s.ai,s.el,a.B,l.M,u.i,c.D9,r.AddonModLtiIndexComponent],encapsulation:2}),AddonModLtiIndexPage})()},69006:(e,n,t)=>{t.d(n,{y:()=>m});var o=t(10467),r=t(23063),i=t(49882),d=t(44682),s=t(55554),a=t(51024),l=t(52749),u=t(25572),c=t(79555),h=t(95384),f=t(54438),p=t(2910);let m=(()=>{var e;class CoreCourseModuleMainActivityComponent extends r.x{constructor(e="CoreCourseModuleMainResourceComponent",n,t){super(e,t),this.content=n,this.moduleName=""}ngOnInit(){var _superprop_getNgOnInit=()=>super.ngOnInit,e=this;return(0,o.A)((function*(){yield _superprop_getNgOnInit().call(e),e.hasOffline=!1,e.moduleName=h.CoreCourseModuleHelper.translateModuleName(e.pluginName||e.moduleName||""),e.syncEventName&&(e.syncObserver=i.z.on(e.syncEventName,(n=>{e.autoSyncEventReceived(n)}),e.siteId))}))()}isRefreshSyncNeeded(e){return!1}autoSyncEventReceived(e){this.isRefreshSyncNeeded(e)&&this.showLoadingAndRefresh(!1)}refreshContent(e=!1,n=!1){var t=this;return(0,o.A)((function*(){t.module&&(yield s.g.ignoreErrors(Promise.all([t.invalidateContent(),t.showCompletion?d.CoreCourse.invalidateModule(t.module.id):void 0])),yield t.loadContent(!0,e,n))}))()}showLoadingAndFetch(e=!1,n=!1){var t=this;return(0,o.A)((function*(){var o;t.showLoading=!0,null===(o=t.content)||void 0===o||o.scrollToTop(),yield t.loadContent(!1,e,n)}))()}showLoadingAndRefresh(e=!1,n=!1){var t;return this.showLoading=!0,null===(t=this.content)||void 0===t||t.scrollToTop(),this.refreshContent(e,n)}fetchContent(e=!1,n=!1,t=!1){return(0,o.A)((function*(){}))()}loadContent(e,n=!1,t=!1){var r=this;return(0,o.A)((function*(){if(r.module)try{e&&r.showCompletion&&(yield s.g.ignoreErrors(r.fetchModule())),yield r.fetchContent(e,n,t),r.finishSuccessfulFetch()}catch(t){var o;if(!e&&(null===(o=l.CoreSites.getCurrentSite())||void 0===o||!o.isOfflineDisabled())&&h.CoreCourseModuleHelper.isNotFoundError(t))return yield r.refreshContent(n);u.CoreAlerts.showError(t,{default:c.HT.instant(r.fetchContentDefaultError)})}finally{r.showLoading=!1}}))()}sync(){return(0,o.A)((function*(){return{updated:!1,warnings:[]}}))()}hasSyncSucceed(e){return e.updated}syncActivity(e=!1){var n=this;return(0,o.A)((function*(){try{const e=yield n.sync();return e.warnings.length&&u.CoreAlerts.show({message:e.warnings[0]}),n.hasSyncSucceed(e)}catch(n){return e&&u.CoreAlerts.showError(n,{default:c.HT.instant("core.errorsync")}),!1}}))()}ngOnDestroy(){var e;super.ngOnDestroy(),null===(e=this.syncObserver)||void 0===e||e.off()}}return(e=CoreCourseModuleMainActivityComponent).ɵfac=function CoreCourseModuleMainActivityComponent_Factory(n){return new(n||e)(f.rXU("",8),f.rXU(p.W9),f.rXU(a.A))},e.ɵcmp=f.VBU({type:e,selectors:[["ng-component"]],inputs:{group:"group"},features:[f.Vt3],decls:0,vars:0,template:function CoreCourseModuleMainActivityComponent_Template(e,n){},encapsulation:2}),CoreCourseModuleMainActivityComponent})()}}]);