1"use strict";(self.webpackChunkSUIT_LMS=self.webpackChunkSUIT_LMS||[]).push([[148],{8769:(D,f,n)=>{n.d(f,{f:()=>E});var u=n(1386),h=n(4438),v=n(3149),C=n(944);let E=(()=>{class g{constructor(i,s,a){this.pageservice=i,this.http=s}GetCourseContent(i,s,a,e){let t=new u.gV;return t.showFailureMessage=!1,t.showSuccessMessage=!1,new Promise((M,p)=>{this.http.Post("/Course/GetCourseContent",{SemesterTypeId:i,SemesterYearId:s,ContentTypeId:a,CourseCode:e},void 0,t).then(m=>{M(m)}).catch(m=>{p(m)})})}GetCourseContentBySession(i,s,a){let e=new u.gV;return e.showFailureMessage=!1,e.showSuccessMessage=!1,new Promise((t,M)=>{this.http.Post("/Course/GetCourseContentBySession",{SessionId:i,ContentTypeId:s,CourseCode:a},void 0,e).then(p=>{t(p)}).catch(p=>{M(p)})})}GetSessionList(){let i=new u.gV;return i.showFailureMessage=!1,i.showSuccessMessage=!1,new Promise((s,a)=>{this.http.Get("/Course/GetSessionList",void 0,void 0,i).then(e=>{s(e)}).catch(e=>{a(e)})})}GetCourseList(i){let s=new u.gV;return s.showFailureMessage=!1,s.showSuccessMessage=!1,new Promise((a,e)=>{this.http.Get("/Course/GetRegisteredCourseList",{SessionId:i},void 0,s).then(t=>{a(t)}).catch(t=>{e(t)})})}GetTeacherCourseList(i){let s=new u.gV;return s.showFailureMessage=!1,s.showSuccessMessage=!1,new Promise((a,e)=>{this.http.Get("/Course/GetTeacherRegisteredCourseList",{SessionId:i},void 0,s).then(t=>{a(t)}).catch(t=>{e(t)})})}DownloadCourseContent(i){let s=new u.gV;s.showFailureMessage=!1,s.showSuccessMessage=!1,this.http.GetPdfFile("/Attachment/DownloadCourseContent",{fileUrl:i}).then(a=>{let e=new FileReader;e.addEventListener("load",()=>{},!1),a&&e.readAsDataURL(a),console.log(a.type);const t=document.createElement("a");t.href=URL.createObjectURL(a),t.download=i,document.body.appendChild(t),t.click()}).catch(a=>{this.pageservice.ShowError("file Download error, please try again later.")}).finally(()=>{this.pageservice.setPageNotBusy()})}GetDropDownLists(i){let s=new u.gV;return s.showFailureMessage=!1,s.showSuccessMessage=!1,new Promise((a,e)=>{this.http.Post("/Course/GetDropDownLists",i,void 0,s).then(t=>{a(t)}).catch(t=>{e(t)})})}SaveUpdateMarks(i){let s=new u.gV;return s.showFailureMessage=!0,s.showSuccessMessage=!0,new Promise((a,e)=>{this.http.Post("/Course/SaveUpdateMarks",i,void 0,s).then(t=>{a(t)}).catch(t=>{e(t)})})}DeleteMarks(i){let s=new u.gV;return s.showFailureMessage=!0,s.showSuccessMessage=!0,new Promise((a,e)=>{this.http.Post("/Course/DeleteMarks",{Id:i},void 0,s).then(t=>{a(t)}).catch(t=>{e(t)})})}GetMarksDistribution(i){let s=new u.gV;return s.showFailureMessage=!0,s.showSuccessMessage=!0,new Promise((a,e)=>{this.http.Post("/Course/GetMarksDistribution",{SessionId:i},void 0,s).then(t=>{a(t)}).catch(t=>{e(t)})})}static{this.\u0275fac=function(s){return new(s||g)(h.KVO(v.b),h.KVO(u.kl),h.KVO(C.U))}}static{this.\u0275prov=h.jDH({token:g,factory:g.\u0275fac,providedIn:"root"})}}return g})()},9148:(D,f,n)=>{n.r(f),n.d(f,{QuizSubmissionComponent:()=>R});var u=n(177),h=n(8326),v=n(1570),C=n(2557),E=n(69),g=n(1843),S=n(7162),i=n(3617),s=n(3237),e=n(4438),t=n(3149),M=n(5860),p=n(3443),m=n(7101),O=n(8769),b=n(5412);const w=()=>({width:"50%"});function I(_,P){if(1&_&&(e.j41(0,"option",18),e.EFF(1),e.k0s()),2&_){const r=P.$implicit;e.FS9("value",r.SessionId),e.R7$(),e.SpI("",r.SessionName," ")}}function T(_,P){if(1&_){const r=e.RV6();e.j41(0,"div")(1,"app-table",19),e.bIt("view",function(o){e.eBV(r);const c=e.XpG();return e.Njj(c.onView(o))}),e.k0s()()}if(2&_){const r=e.XpG();e.R7$(),e.Y8G("DataSet",r.dataset)("showEdit",!1)("showDelete",!1)("showView",!0)}}function z(_,P){1&_&&(e.j41(0,"div",20)(1,"div",21),e.nrm(2,"i",22),e.j41(3,"span"),e.EFF(4,"No data available to display"),e.k0s()()())}let R=(()=>{class _ extends E.G{constructor(r,l,o,c,d,U){super(r,o),this._route=l,this.userService=o,this._quizService=c,this.cdr=d,this.courseService=U,this.message="Testing",this.pageTitle="Quiz Submission",this.pageLink="/quiz/submission",this.visible=!1,this._updateQuizMarks={}}ngOnInit(){this.GetSession()}GetSession(){this.setPageBusy(),this.courseService.GetSessionList().then(r=>{this.sessions=r.Data,this.sessions.length>0&&(this.searchSessionid=this.sessions[0].SessionId,this.GetAllSubmittedQuiz(this.searchSessionid))}).finally(()=>{this.SetPageReady(!0),this.setPageNotBusy()})}GetAllSubmittedQuiz(r=null){this.setPageBusy(),this._quizService.GetAllSubmittedQuiz(r).then(l=>{setTimeout(()=>{this.dataset=l.Data,this.cdr.detectChanges()},100)}).catch(()=>{this.setPageNotBusy()}).finally(()=>{this.setPageNotBusy()})}onView(r){this.visible=!0,this.quizData=r;let l=new s.Model(this.quizData.quizJson);l.data=JSON.parse(JSON.parse(this.quizData.quizResponse)),l.mode="display",l.showCompletedPage=!1,l.showNavigationButtons=!0,this.surveyModel=l,this._updateQu
1izMarks={},this._updateQuizMarks.ObtainedMarks=r["Obt Marks"],this._updateQuizMarks.TotalMarks=r.Marks}onUpdateMarks(){this._updateQuizMarks.ObtainedMarks>this._updateQuizMarks.TotalMarks?this.ShowError("Obtained marks can not be greater than total marks"):(this.setPageBusy(),this._updateQuizMarks.QuizID=this.quizData.Id,this.setPageBusy(),this._quizService.UpdateQuizMarks(this._updateQuizMarks).then(r=>{this.ShowSuccess("Marks successfully upated."),this.GetAllSubmittedQuiz()}).catch(r=>{this.ShowError("Error occurred!"),this.setPageNotBusy()}).finally(()=>{this.setPageNotBusy(),this.visible=!1}))}static{this.\u0275fac=function(l){return new(l||_)(e.rXU(t.b),e.rXU(M.nX),e.rXU(p.D),e.rXU(m.p),e.rXU(e.gRc),e.rXU(O.f))}}static{this.\u0275cmp=e.VBU({type:_,selectors:[["app-quiz-submission"]],standalone:!0,features:[e.Vt3,e.aNF],decls:21,vars:14,consts:[[3,"title","pageLink"],[1,"mb-4","col-4"],["for","calendar-12h",1,"font-bold","block","mb-2"],[1,"form-control","form-control-sm",3,"ngModelChange","change","ngModel"],[3,"value",4,"ngFor","ngForOf"],[4,"ngIf"],["class","no-data-message",4,"ngIf"],[1,"card","flex","justify-content-center"],["position","center",3,"visibleChange","header","modal","visible"],[1,"mt-2"],[3,"model"],[1,"col-12","d-flex"],[1,"col-md-6","mt-2"],["for","calendar-12h",1,"font-bold","block","mb-2","d-flex"],["type","number",1,"form-control",3,"ngModelChange","ngModel"],[1,"col-md-6","mt-4"],["type","button",1,"btn","btn-outline-info","float-right",3,"click"],[1,"fa","fa-check"],[3,"value"],[3,"view","DataSet","showEdit","showDelete","showView"],[1,"no-data-message"],[1,"message-container"],[1,"fa","fa-exclamation-circle","message-icon"]],template:function(l,o){1&l&&(e.nrm(0,"app-pageheader",0),e.j41(1,"div",1)(2,"label",2),e.EFF(3,"Session"),e.k0s(),e.j41(4,"select",3),e.mxI("ngModelChange",function(d){return e.DH7(o.searchSessionid,d)||(o.searchSessionid=d),d}),e.bIt("change",function(){return o.GetAllSubmittedQuiz(o.searchSessionid)}),e.DNE(5,I,2,2,"option",4),e.k0s()(),e.DNE(6,T,2,4,"div",5)(7,z,5,0,"div",6),e.j41(8,"div",7)(9,"p-dialog",8),e.mxI("visibleChange",function(d){return e.DH7(o.visible,d)||(o.visible=d),d}),e.j41(10,"div",9),e.nrm(11,"survey",10),e.k0s(),e.j41(12,"div",11)(13,"div",12)(14,"label",13),e.EFF(15,"Obtained Marks* "),e.k0s(),e.j41(16,"input",14),e.mxI("ngModelChange",function(d){return e.DH7(o._updateQuizMarks.ObtainedMarks,d)||(o._updateQuizMarks.ObtainedMarks=d),d}),e.k0s()(),e.j41(17,"div",15)(18,"button",16),e.bIt("click",function(){return o.onUpdateMarks()}),e.nrm(19,"i",17),e.EFF(20," Update Marks"),e.k0s()()()()()),2&l&&(e.Y8G("title",o.pageTitle)("pageLink",o.pageLink),e.R7$(4),e.R50("ngModel",o.searchSessionid),e.R7$(),e.Y8G("ngForOf",o.sessions),e.R7$(),e.Y8G("ngIf",o.dataset),e.R7$(),e.Y8G("ngIf",0==(null==o.dataset?null:o.dataset.Rows.length)),e.R7$(2),e.Aen(e.lJ4(13,w)),e.Y8G("header","View Quiz")("modal",!0),e.R50("visible",o.visible),e.R7$(2),e.Y8G("model",o.surveyModel),e.R7$(5),e.R50("ngModel",o._updateQuizMarks.ObtainedMarks))},dependencies:[u.MD,u.Sq,u.bT,g.f,b.U,C.O,h.YN,h.xH,h.y7,h.me,h.Q0,h.wz,h.BC,h.vS,S.FF,S.UM,S.ut,i.Zs,v.P,v.l],styles:["[_nghost-%COMP%] .ngx-pagination-previous a{color:#ff5733}[_nghost-%COMP%] .ngx-pagination-next a{color:#3af}[_nghost-%COMP%] .ngx-pagination-previous a:hover, .ngx-pagination-next[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:#f90}"]})}}return _})()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.