uawdijnntqw1x1x1
IP : 216.73.216.55
Hostname : srv913213
Kernel : Linux srv913213 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
OS : Linux
PATH:
/
var
/
www
/
krbed.in
/
..
/
..
/
www
/
..
/
www
/
html
/
..
/
school_portal_admin
/
149-es5.4eb3adc0c48bd8d01d2b.js
/
/
function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,c="function"==typeof Symbol?Symbol:{},n=c.iterator||"@@iterator",a=c.toStringTag||"@@toStringTag";function i(c,n,a,i){var s=n&&n.prototype instanceof r?n:r,l=Object.create(s.prototype);return _regeneratorDefine2(l,"_invoke",function(c,n,a){var i,r,s,l=0,d=a||[],u=!1,m={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,c){return i=t,r=0,s=e,m.n=c,o}};function p(c,n){for(r=c,s=n,t=0;!u&&l&&!a&&t<d.length;t++){var a,i=d[t],p=m.p,h=i[2];c>3?(a=h===n)&&(s=i[(r=i[4])?5:(r=3,3)],i[4]=i[5]=e):i[0]<=p&&((a=c<2&&p<i[1])?(r=0,m.v=n,m.n=i[1]):p<h&&(a=c<3||i[0]>n||n>h)&&(i[4]=c,i[5]=n,m.n=h,r=0))}if(a||c>1)return o;throw u=!0,n}return function(a,d,h){if(l>1)throw TypeError("Generator is already running");for(u&&1===d&&p(d,h),r=d,s=h;(t=r<2?e:s)||!u;){i||(r?r<3?(r>1&&(m.n=-1),p(r,s)):m.n=s:m.v=s);try{if(l=2,i){if(r||(a="next"),t=i[a]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,r<2&&(r=0)}else 1===r&&(t=i.return)&&t.call(i),r<2&&(s=TypeError("The iterator does not provide a '"+a+"' method"),r=1);i=e}else if((t=(u=m.n<0)?s:c.call(n,m))!==o)break}catch(t){i=e,r=1,s=t}finally{l=1}}return{value:t,done:u}}}(c,a,i),!0),l}var o={};function r(){}function s(){}function l(){}t=Object.getPrototypeOf;var d=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,(function(){return this})),t),u=l.prototype=r.prototype=Object.create(d);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,_regeneratorDefine2(e,a,"GeneratorFunction")),e.prototype=Object.create(u),e}return s.prototype=l,_regeneratorDefine2(u,"constructor",l),_regeneratorDefine2(l,"constructor",s),s.displayName="GeneratorFunction",_regeneratorDefine2(l,a,"GeneratorFunction"),_regeneratorDefine2(u),_regeneratorDefine2(u,a,"Generator"),_regeneratorDefine2(u,n,(function(){return this})),_regeneratorDefine2(u,"toString",(function(){return"[object Generator]"})),(_regenerator=function(){return{w:i,m:m}})()}function _regeneratorDefine2(e,t,c,n){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}(_regeneratorDefine2=function(e,t,c,n){function i(t,c){_regeneratorDefine2(e,t,(function(e){return this._invoke(t,c,e)}))}t?a?a(e,t,{value:c,enumerable:!n,configurable:!n,writable:!n}):e[t]=c:(i("next",0),i("throw",1),i("return",2))})(e,t,c,n)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(e,t){var c=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=c){var n,a,i,o,r=[],s=!0,l=!1;try{if(i=(c=c.call(e)).next,0===t){if(Object(c)!==c)return;s=!1}else for(;!(s=(n=i.call(c)).done)&&(r.push(n.value),r.length!==t);s=!0);}catch(e){l=!0,a=e}finally{try{if(!s&&null!=c.return&&(o=c.return(),Object(o)!==o))return}finally{if(l)throw a}}return r}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _createForOfIteratorHelper(e,t){var c="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!c){if(Array.isArray(e)||(c=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){c&&(e=c);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,r=!1;return{s:function(){c=c.call(e)},n:function(){var e=c.next();return o=e.done,e},e:function(e){r=!0,i=e},f:function(){try{o||null==c.return||c.return()}finally{if(r)throw i}}}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var c={}.toString.call(e).slice(8,-1);return"Object"===c&&e.constructor&&(c=e.constructor.name),"Map"===c||"Set"===c?Array.from(e):"Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var c=0,n=Array(t);c<t;c++)n[c]=e[c];return n}function _defineProperties(e,t){for(var c=0;c<t.length;c++){var n=t[c];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_toPropertyKey(n.key),n)}}function _createClass(e,t,c){return t&&_defineProperties(e.prototype,t),c&&_defineProperties(e,c),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==typeof t?t:t+""}function _toPrimitive(e,t){if("object"!=typeof e||!e)return e;var c=e[Symbol.toPrimitive];if(void 0!==c){var n=c.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(window.webpackJsonp=window.webpackJsonp||[]).push([[149],{dnT2:function(e,t,c){"use strict";c.r(t);var n,a,i,o,r,s,l,d,u,m,p,h=c("tyNb"),f=c("ofXK"),g=c("3Pt+"),b=c("bTqV"),x=c("Wp6s"),v=c("bSwM"),y=c("FKr1"),k=c("iadO"),w=c("NFeN"),_=c("qFsG"),C=c("MutI"),O=c("bv9b"),F=c("QibW"),q=c("xHqg"),G=c("STbY"),I=c("YUcS"),S=c("rIor"),M=c("CzEO"),P=c("lDzL"),Q=c("7pIB"),N=c("M9IT"),A=c("Qu3c"),D=c("Dh3D"),T=c("+0xr"),j=c("d3UM"),L=c("elPL"),E=c("0OQn"),z=c("cZdB"),Y=c("r3oX"),X=c("aYsj"),H=c("buGD"),R=c("qc5V"),B=c("tk/3"),$=c("lJxs"),V=c("JzQ9"),U=c("rnHP"),J=_createClass((function e(){_classCallCheck(this,e),this.id="",this.questionGroupId="",this.groupName="",this.noOfQus=0,this.noOfPreparedQus=0,this.marks="",this.eachMark="",this.answerOption="",this.questions=[]})),W=c("fXoL"),K=((n=function(){return _createClass((function e(){_classCallCheck(this,e)}),[{key:"adapt",value:function(e){return this.obj=new V.d,this.obj.optionId=e.option_id,this.obj.optionName=e.option_name,this.obj.questionId=e.question_id,this.obj.isAnswer=e.is_answer,this.obj}}])}()).\u0275fac=function(e){return new(e||n)},n.\u0275prov=W.Tb({token:n,factory:n.\u0275fac,providedIn:"root"}),n),Z=c("q9nw"),ee=((p=function(){return _createClass((function e(){_classCallCheck(this,e)}),[{key:"adapt",value:function(e){var t;return this.obj=new Z.d,this.obj.answerId=e.option_id,this.obj.answer=null!=(t=e.answer)?t:"",this.obj}}])}()).\u0275fac=function(e){return new(e||p)},p.\u0275prov=W.Tb({token:p,factory:p.\u0275fac,providedIn:"root"}),p),te=((m=function(){return _createClass((function e(){_classCallCheck(this,e)}),[{key:"adapt",value:function(e){var t;return this.obj=new V.c,e.onlineexam_result_attachment_id?this.obj.attachmentId=e.onlineexam_result_attachment_id:e.onlineexam_question_attachment_id?this.obj.attachmentId=e.onlineexam_question_attachment_id:e.onlineexam_attachment_id&&(this.obj.attachmentId=e.onlineexam_attachment_id),this.obj.attachment=null!=(t=e.attachment)?t:"",this.obj}}])}()).\u0275fac=function(e){return new(e||m)},m.\u0275prov=W.Tb({token:m,factory:m.\u0275fac,providedIn:"root"}),m),ce=((u=function(){return _createClass((function e(){_classCallCheck(this,e)}),[{key:"adapt",value:function(e){var t,c;return this.obj=new Z.h,this.obj.studAssignmentId=e.onlineexam_result_attachment_id,this.obj.evaluateAttachment=null!=(t=e.evaluate_attach)?t:"",this.obj.attachment=null!=(c=e.attachment)?c:"",this.obj}}])}()).\u0275fac=function(e){return new(e||u)},u.\u0275prov=W.Tb({token:u,factory:u.\u0275fac,providedIn:"root"}),u),ne=((d=function(){return _createClass((function e(t,c,n,a){_classCallCheck(this,e),this.adapterQuesOptions=t,this.adapterQuesAns=c,this.adapterQuesAttach=n,this.adapterStudAttach=a}),[{key:"adapt",value:function(e){var t,c,n,a,i,o,r,s,l,d,u,m,p,h=this,f=[];e.ques_options&&(null===(t=e)||void 0===t||t.ques_options.forEach((function(e){f.push(h.adapterQuesOptions.adapt(e))})));var g=[];e.ques_answer&&(null===(c=e)||void 0===c||c.ques_answer.forEach((function(e){g.push(h.adapterQuesAns.adapt(e))})));var b=[];e.Ques_attachment?null===(n=e)||void 0===n||n.Ques_attachment.forEach((function(e){b.push(h.adapterQuesAttach.adapt(e))})):e.ques_attachment&&(null===(a=e)||void 0===a||a.ques_attachment.forEach((function(e){b.push(h.adapterQuesAttach.adapt(e))})));var x=[];return e.student_attachment&&(null===(i=e)||void 0===i||i.student_attachment.forEach((function(e){x.push(h.adapterStudAttach.adapt(e))}))),this.obj=new V.e,this.obj.type=null!=(o=e.type)?o:"",this.obj.questionId=null!=(r=e.onlineexam_question_id)?r:e.question_id,this.obj.questionName=null!=(s=e.question_name)?s:"",this.obj.studentAnswer=null!=(l=e.stu_answer)?l:"",this.obj.studentOptionId=null!=(d=e.stu_option_id)?d:"",this.obj.isPermissionUpload=null!=(u=e.is_permission_upload)?u:"",this.obj.questionMark=e.question_mark,this.obj.obtainedMark=e.obtained_mark,this.obj.quesOptions=f,this.obj.quesAnswer=g,this.obj.answer=e.answer,this.obj.quesAttachment=null!=b?b:[],this.obj.studAttachment=null!=x?x:[],this.obj.studMark=null!=(m=e.stu_mark)?m:[],this.obj.isFavorite=null!=(p=e.is_favorite)?p:0,this.obj}}])}()).\u0275fac=function(e){return new(e||d)(W.hc(K),W.hc(ee),W.hc(te),W.hc(ce))},d.\u0275prov=W.Tb({token:d,factory:d.\u0275fac,providedIn:"root"}),d),ae=((l=function(){return _createClass((function e(t){_classCallCheck(this,e),this.adapterQuestions=t}),[{key:"adapt",value:function(e){var t,c=this,n=[];return e.questions&&(null===(t=e)||void 0===t||t.questions.forEach((function(e){n.push(c.adapterQuestions.adapt(e))}))),this.obj=new J,this.obj.questionGroupId=e.onlineexam_question_group_id,this.obj.groupName=e.group_name,this.obj.noOfQus=e.no_of_questions,this.obj.noOfPreparedQus=e.prepared_question,this.obj.marks=e.marks,this.obj.eachMark=e.each_mark,this.obj.answerOption=e.answer_option,this.obj.questions=n,this.obj}}])}()).\u0275fac=function(e){return new(e||l)(W.hc(ne))},l.\u0275prov=W.Tb({token:l,factory:l.\u0275fac,providedIn:"root"}),l),ie=((s=function(){return _createClass((function e(){_classCallCheck(this,e)}),[{key:"adapt",value:function(e){var t,c,n,a,i,o;return this.obj=new V.f,this.obj.studentId=null!=(t=e.student_id)?t:"",this.obj.rollNumber=null!=(c=e.roll_number)?c:"",this.obj.studentName=null!=(n=e.first_name)?n:"",this.obj.lastSubmissionDate=null!=(a=e.last_submission_date)?a:"",this.obj.photo=null!=(i=e.photo)?i:"",this.obj.status=null!=(o=e.status)?o:"",this.obj}}])}()).\u0275fac=function(e){return new(e||s)},s.\u0275prov=W.Tb({token:s,factory:s.\u0275fac,providedIn:"root"}),s),oe=((r=function(){return _createClass((function e(t,c,n,a){_classCallCheck(this,e),this.sectionAdapter=t,this.qusgrp=c,this.questionAdapter=n,this.studentAdapter=a}),[{key:"adapt",value:function(e){var t,c,n,a,i,o,r,s,l,d,u,m,p,h,f,g,b,x,v,y,k,w,_=this,C=[];e.section&&e.section.forEach((function(e){C.push(_.sectionAdapter.adapt(e))}));var O=[];e.onlineexam_question_group&&e.onlineexam_question_group.forEach((function(e){O.push(_.qusgrp.adapt(e))}));var F=[];e.questions&&e.questions.forEach((function(e){F.push(_.questionAdapter.adapt(e))}));var q=[];return e.student_list&&e.student_list.forEach((function(e){q.push(_.studentAdapter.adapt(e))})),this.obj=new V.a,this.obj.onlineexamId=null!=(t=e.onlineexam_id)?t:"",this.obj.academicYearId=null!=(c=e.academic_year_id)?c:"",this.obj.academicYearName=null!=(n=e.academic_year_name)?n:"",this.obj.batchId=null!=(a=e.batch_id)?a:"",this.obj.batchName=null!=(i=e.batch_name)?i:"",this.obj.classId=null!=(o=e.class_id)?o:"",this.obj.className=null!=(r=e.class_name)?r:"",this.obj.startDate=null!=(s=e.start_date)?s:"",this.obj.startTime=null!=(l=e.start_time)?l:"",this.obj.endTime=null!=(d=e.end_time)?d:"",this.obj.submissionTime=null!=(u=e.last_submission_time)?u:"",this.obj.submissionDate=null!=(m=e.last_submission_date)?m:"",this.obj.subjectId=null!=(p=e.subject_id)?p:"",this.obj.subjectName=null!=(h=e.subject_name)?h:"",this.obj.sectionName=null!=(f=e.section_name)?f:"",this.obj.description=null!=(g=e.description)?g:"",this.obj.title=null!=(b=e.title)?b:"",this.obj.attachment=null!=(x=e.assignment_attachment)?x:"",this.obj.language=null!=(v=e.language_type)?v:"",this.obj.totalMarks=null!=(y=e.mark)?y:"",this.obj.studentList=null!=q?q:[],this.obj.givenBy=null!=(k=e.given_by)?k:"",this.obj.sections=null!=C?C:[],this.obj.group=null!=O?O:[],this.obj.questions=F,this.obj.totalCount=e.quescount,this.obj.status=null!=(w=e.status)?w:"",this.obj}}])}()).\u0275fac=function(e){return new(e||r)(W.hc(U.a),W.hc(ae),W.hc(ne),W.hc(ie))},r.\u0275prov=W.Tb({token:r,factory:r.\u0275fac,providedIn:"root"}),r),re=((o=function(){return _createClass((function e(t){_classCallCheck(this,e),this.adapter=t}),[{key:"adapt",value:function(e){var t,c,n,a,i,o,r,s,l=this,d=[];return e.data.forEach((function(e){d.push(l.adapter.adapt(e))})),{keyword:(c=null===(t=e)||void 0===t?void 0:t.keyword,null!=c?c:0),message:(a=null===(n=e)||void 0===n?void 0:n.message,null!=a?a:""),onlineexams:d,pageSize:(o=null===(i=e)||void 0===i?void 0:i.count,null!=o?o:0),page:(s=null===(r=e)||void 0===r?void 0:r.page,null!=s?s:0)}}}])}()).\u0275fac=function(e){return new(e||o)(W.hc(oe))},o.\u0275prov=W.Tb({token:o,factory:o.\u0275fac,providedIn:"root"}),o),se=((i=function(){return _createClass((function e(t){_classCallCheck(this,e),this.adapter=t}),[{key:"adapt",value:function(e){var t,c,n,a,i,o,r,s,l=this,d=[];return e.data.forEach((function(e){d.push(l.adapter.adapt(e))})),{keyword:(c=null===(t=e)||void 0===t?void 0:t.keyword,null!=c?c:0),message:(a=null===(n=e)||void 0===n?void 0:n.message,null!=a?a:""),questions:d,pageSize:(o=null===(i=e)||void 0===i?void 0:i.count,null!=o?o:0),page:(s=null===(r=e)||void 0===r?void 0:r.page,null!=s?s:0)}}}])}()).\u0275fac=function(e){return new(e||i)(W.hc(ne))},i.\u0275prov=W.Tb({token:i,factory:i.\u0275fac,providedIn:"root"}),i),le=((a=function(){return _createClass((function e(t,c,n){_classCallCheck(this,e),this.transAdapter=t,this.questionAdaptor=c,this.apiService=n,this.userId=0}),[{key:"getOnlineExamGroupList",value:function(){return this.apiService.get("onlineExamGroup")}},{key:"addOnlineExamGroup",value:function(e){return this.apiService.post("onlineExamGroup/create",e)}},{key:"save",value:function(e,t,c){var n=this;return this.apiService.post("create"==t?"onlineexamQstn/create":"onlineexamQstn/update",e).pipe(Object($.a)((function(e){return n.transAdapter.adapt(e)})))}},{key:"getOne",value:function(e){var t=this;return console.log(12345678987654325e5),this.apiService.get("homework/".concat(e)).pipe(Object($.a)((function(e){return t.transAdapter.adapt(e)})))}},{key:"getList",value:function(e){var t=this,c=new B.e;for(var n in e)c=c.set(n,e[n]);return this.apiService.get("onlineexam",c).pipe(Object($.a)((function(e){return t.transAdapter.adapt(e)})))}},{key:"getquestion",value:function(e){var t=this;return this.apiService.get("onlineexamQn/".concat(e)).pipe(Object($.a)((function(e){return t.transAdapter.adapt(e)})))}},{key:"Question",value:function(e,t,c){var n=this;return this.apiService.post("create"==t?"onlineexamQstn/create":"onlineexamQstn/update",e).pipe(Object($.a)((function(e){return n.transAdapter.adapt(e)})))}},{key:"status",value:function(e,t){return this.apiService.post(2!=t?"onlineexam/status":"onlineexam/delete",e)}},{key:"deleteAssignmentUpload",value:function(e){return this.apiService.post("homework/deleteAttachment",e)}},{key:"getAssignmentList",value:function(e){var t=this;return this.apiService.get("homework/".concat(e)).pipe(Object($.a)((function(e){return t.transAdapter.adapt(e)})))}},{key:"getQuestionsList",value:function(e){var t=this;return this.apiService.get("onlineexamQn/".concat(e)).pipe(Object($.a)((function(e){return t.transAdapter.adapt(e)})))}},{key:"saveQuestion",value:function(e,t){var c=this;return this.apiService.post("create"==t?"onlineexam/questions/create":"onlineexam/questions/update",e).pipe(Object($.a)((function(e){return c.transAdapter.adapt(e)})))}},{key:"getQusGroupList",value:function(e){var t=this;return this.apiService.get("onlineexamQn/".concat(e)).pipe(Object($.a)((function(e){return t.transAdapter.adapt(e)})))}},{key:"getQusGroupOne",value:function(e){var t=this;return this.apiService.get("onlineexamQn/detailView/".concat(e)).pipe(Object($.a)((function(e){return t.transAdapter.adapt(e)})))}},{key:"getQustionList",value:function(e,t){var c=this;return this.apiService.get("onlineexamQn/updateView/".concat(e,"/").concat(t)).pipe(Object($.a)((function(e){return c.transAdapter.adapt(e)})))}},{key:"getQustionOne",value:function(e){var t=this;return this.apiService.get("onlineexam/questions/".concat(e)).pipe(Object($.a)((function(e){return t.transAdapter.adapt(e)})))}},{key:"getPreview",value:function(e){var t=this;return this.apiService.get("onlineexam/questions/preview/".concat(e)).pipe(Object($.a)((function(e){return t.transAdapter.adapt(e)})))}},{key:"approve",value:function(e){var t=this;return this.apiService.post("onlineexam/approve",e).pipe(Object($.a)((function(e){return t.transAdapter.adapt(e)})))}},{key:"getFavQuestions",value:function(e){var t=this,c=new B.e;for(var n in e)c=c.set(n,e[n]);return this.apiService.get("onlineexam/favQn/list",c).pipe(Object($.a)((function(e){return t.transAdapter.adapt(e)})))}},{key:"getFavOne",value:function(e){var t=this;return this.apiService.get("onlineexam/favoriteQuestions/".concat(e)).pipe(Object($.a)((function(e){return t.transAdapter.adapt(e)})))}},{key:"addToFav",value:function(e){var t=this;return this.apiService.post("onlineexam/addToFavorite",e).pipe(Object($.a)((function(e){return t.transAdapter.adapt(e)})))}},{key:"getCurrentAcademicYear",value:function(){return this.apiService.get("loadCurrentAcademic")}},{key:"getImportQuestions",value:function(e,t,c){var n=this;return this.apiService.get("loadQuestions/".concat(e,"/").concat(t,"/").concat(c)).pipe(Object($.a)((function(e){return n.questionAdaptor.adapt(e)})))}},{key:"getHomeworks",value:function(e,t,c,n,a){return this.apiService.get("loadHomework/".concat(e,"/").concat(t,"/").concat(c,"/").concat(n,"/").concat(a))}},{key:"saveImportQuestion",value:function(e){return this.apiService.post("importQuestion/insert",e)}},{key:"uploadImportAttach",value:function(e){return this.apiService.post("importQuestion/uploadAttachment",e)}},{key:"deleteImportAttach",value:function(e){return this.apiService.post("importQuestion/deleteAttachment",e)}},{key:"deleteQuestion",value:function(e){return this.apiService.post("importQuestion/deleteQuestion",e)}},{key:"updateImportQuestion",value:function(e){return this.apiService.post("importQuestion/update",e)}}])}()).\u0275fac=function(e){return new(e||a)(W.hc(re),W.hc(se),W.hc(R.a))},a.\u0275prov=W.Tb({token:a,factory:a.\u0275fac,providedIn:"root"}),a),de=c("Gg3P"),ue=c("Olgc"),me=c("jtrZ"),pe=c("live"),he=c("Gh3/"),fe=c("JPLO"),ge=c("LvDl"),be=c("JX91"),xe=c("XiUz"),ve=c("f0Cb"),ye=c("kmnG"),ke=c("/1cH"),we=c("sYmb");function _e(e,t){if(1&e&&(W.dc(0,"span"),W.cd(1),W.cc()),2&e){var c=t.$implicit,n=t.last;W.Gb(1),W.fd(" ",c,"",n?"":", ","")}}function Ce(e,t){1&e&&(W.dc(0,"mat-error"),W.cd(1," Please provide the date "),W.cc())}function Oe(e,t){1&e&&(W.dc(0,"mat-error"),W.cd(1," Please provide the time "),W.cc())}function Fe(e,t){1&e&&(W.dc(0,"mat-error"),W.cd(1," Please provide the time "),W.cc())}function qe(e,t){1&e&&(W.dc(0,"mat-error"),W.cd(1," Please provide the date "),W.cc())}function Ge(e,t){1&e&&(W.dc(0,"mat-error"),W.cd(1," Please provide the time "),W.cc())}function Ie(e,t){1&e&&(W.dc(0,"mat-error"),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.Gb(1),W.ed(" ",W.rc(2,1,"homework.question.error.title")," "))}function Se(e,t){if(1&e){var c=W.ec();W.dc(0,"span",76),W.lc("click",(function(e){W.Sc(c);var t=W.pc().index;return W.pc().removeRow(t)})),W.dc(1,"i",77),W.cd(2,"delete"),W.cc(),W.cc()}}function Me(e,t){if(1&e&&(W.dc(0,"mat-option",78),W.cd(1),W.cc()),2&e){var c=t.$implicit;W.yc("value",c),W.Gb(1),W.ed(" ",c.group_name," ")}}function Pe(e,t){if(1&e){var c=W.ec();W.dc(0,"button",79),W.lc("click",(function(e){W.Sc(c);var t=W.pc().index;return W.pc().addOption(t)})),W.dc(1,"mat-icon",80),W.cd(2,"add"),W.cc(),W.cc()}}function Qe(e,t){1&e&&(W.dc(0,"mat-error"),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.Gb(1),W.ed(" ",W.rc(2,1,"homework.question.error.groupName")," "))}function Ne(e,t){1&e&&(W.dc(0,"mat-error"),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.Gb(1),W.ed(" ",W.rc(2,1,"homework.question.error.Noof")," "))}function Ae(e,t){1&e&&(W.dc(0,"mat-error"),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.Gb(1),W.ed(" ",W.rc(2,1,"homework.question.error.number")," "))}function De(e,t){1&e&&(W.dc(0,"mat-error"),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.Gb(1),W.ed(" ",W.rc(2,1,"homework.question.error.Marks")," "))}function Te(e,t){1&e&&(W.dc(0,"mat-error"),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.Gb(1),W.ed(" ",W.rc(2,1,"homework.question.error.number")," "))}function je(e,t){if(1&e){var c=W.ec();W.dc(0,"tr",58),W.dc(1,"td",59),W.ad(2,Se,3,0,"span",60),W.cc(),W.dc(3,"td",61),W.dc(4,"mat-form-field",31),W.Yb(5,"input",62),W.dc(6,"mat-autocomplete",63,64),W.ad(8,Me,2,2,"mat-option",65),W.qc(9,"async"),W.cc(),W.ad(10,Pe,3,0,"button",66),W.ad(11,Qe,3,3,"mat-error",28),W.cc(),W.cc(),W.dc(12,"td",61),W.dc(13,"mat-form-field",67),W.dc(14,"input",68),W.lc("keyup",(function(e){W.Sc(c);var n=t.index;return W.pc().valueChange(n)})),W.cc(),W.ad(15,Ne,3,3,"mat-error",28),W.ad(16,Ae,3,3,"mat-error",28),W.cc(),W.cc(),W.dc(17,"td",69),W.dc(18,"mat-form-field",70),W.dc(19,"input",71),W.lc("keyup",(function(e){W.Sc(c);var n=t.index;return W.pc().valueChange(n)})),W.cc(),W.ad(20,De,3,3,"mat-error",28),W.ad(21,Te,3,3,"mat-error",28),W.cc(),W.cc(),W.dc(22,"td",61),W.dc(23,"mat-form-field",72),W.Yb(24,"input",73),W.cc(),W.cc(),W.dc(25,"td",74),W.Yb(26,"mat-checkbox",75),W.cc(),W.cc()}if(2&e){var n=t.$implicit,a=t.index,i=W.Oc(7),o=W.pc();W.yc("formGroupName",a),W.Gb(2),W.yc("ngIf",o.questionForm.controls.groupQuestion.controls.length>1),W.Gb(3),W.yc("matAutocomplete",i),W.Gb(1),W.yc("displayWith",o.displayFn),W.Gb(2),W.yc("ngForOf",W.rc(9,11,o.filteredOptions[a])),W.Gb(2),W.yc("ngIf",o.showAddButtonArray[a]&&o.checkValue(n.controls.group_name.value)),W.Gb(1),W.yc("ngIf",(null==n.controls.group_name.errors?null:n.controls.group_name.errors.required)&&n.controls.group_name.touched),W.Gb(4),W.yc("ngIf",(null==n.controls.no_of_questions.errors?null:n.controls.no_of_questions.errors.required)&&n.controls.no_of_questions.touched),W.Gb(1),W.yc("ngIf",(null==n.controls.no_of_questions.errors?null:n.controls.no_of_questions.errors.pattern)&&n.controls.no_of_questions.touched),W.Gb(4),W.yc("ngIf",(null==n.controls.marks.errors?null:n.controls.marks.errors.required)&&n.controls.marks.touched),W.Gb(1),W.yc("ngIf",(null==n.controls.marks.errors?null:n.controls.marks.errors.pattern)&&n.controls.marks.touched)}}var Le,Ee=((Le=function(){return _createClass((function e(t,c,n,a,i,o,r,s){_classCallCheck(this,e),this.modelService=t,this.router=c,this.loader=n,this.toaster=a,this.subjectSer=i,this.formBuilder=o,this.config=r,this.severdatePipe=s,this.section=new g.g,this.sum=0,this.noOf=0,this.mark=0,this.options=[],this.filteredOptions=[],this.showAddButtonArray=[!1],this.timeFormat=Number(this.config.timeFormat),this.getGroupDetails()}),[{key:"getGroupDetails",value:function(){var e=this;this.loader.open(),this.modelService.getOnlineExamGroupList().subscribe((function(t){"success"==t.keyword?(e.options=t.data.filter((function(e){return 1==e.status})),e.form(),e.filterEachGroup(0),e.loader.close()):(e.options=[],e.form(),e.filterEachGroup(0),e.loader.close(),e.toaster.present(t.message))}))}},{key:"ngOnInit",value:function(){this.form(),this.basicData=JSON.parse(localStorage.getItem("basicData"))}},{key:"form",value:function(){this.questionForm=new g.j({lastSubmission:new g.g("",[g.B.required]),startDate:new g.g("",[g.B.required]),startTime:new g.g("",[g.B.required]),endTime:new g.g("",[g.B.required]),lastSubmissionTime:new g.g("",[g.B.required]),title:new g.g("",[g.B.required]),groupQuestion:new g.d([this.getGroup()])})}},{key:"getGroup",value:function(){return this.formBuilder.group({group_name:new g.g("",[g.B.required,(e=this.options,function(t){return e.findIndex((function(e){return ge.isEqual(e,t.value)}))<0?{forbiddenNames:{value:t.value}}:null})]),no_of_questions:new g.g("",[g.B.required,g.B.pattern("[+-]?[0-9]+(.[0-9]+)?([Ee][+-]?[0-9]+)?")]),marks:new g.g("",[g.B.required,g.B.pattern("[+-]?[0-9]+(.[0-9]+)?([Ee][+-]?[0-9]+)?")]),each_mark:new g.g(""),answer_option:new g.g(!1)});var e}},{key:"control",get:function(){return this.questionForm.controls}},{key:"isTimeValidate",value:function(){this.questionForm.get("startTime").setValidators(g.B.required),this.questionForm.get("endTime").setValidators(g.B.required),this.questionForm.get("startTime").updateValueAndValidity(),this.questionForm.get("endTime").updateValueAndValidity()}},{key:"valueChange",value:function(e){var t,c=this.getgroupContol();console.log(c,"control"),this.noOf=""!=c.controls[e].get("no_of_questions").value?c.controls[e].get("no_of_questions").value:"0",this.mark=""!=c.controls[e].get("marks").value?c.controls[e].get("marks").value:"0",console.log(this.noOf,this.mark),this.sum="0"!=this.noOf&&"0"!=this.mark&&null!=(t=Number(this.mark/this.noOf))?t:0,console.log(this.sum,"sum"),c.controls[e].patchValue({each_mark:this.sum})}},{key:"getgroupContol",value:function(){return this.questionForm.controls.groupQuestion}},{key:"addRow",value:function(){var e=this.questionForm.controls.groupQuestion;e.push(this.getGroup()),this.filterEachGroup(e.length-1)}},{key:"filterEachGroup",value:function(e){var t=this,c=this.questionForm.get("groupQuestion");this.filteredOptions[e]=c.at(e).get("group_name").valueChanges.pipe(Object(be.a)(""),Object($.a)((function(e){return"string"==typeof e?e:e.group_name})),Object($.a)((function(c){return c?t._filter(c,e):t.options.slice()})))}},{key:"_filter",value:function(e,t){var c=e.toLowerCase(),n=this.options.filter((function(e){return 0===e.group_name.toLowerCase().indexOf(c)}));return this.showAddButtonArray[t]=0===n.length,this.options.filter((function(e){return 0===e.group_name.toLowerCase().indexOf(c)}))}},{key:"removeRow",value:function(e){this.questionForm.controls.groupQuestion.removeAt(e),this.filteredOptions.splice(e,1),this.showAddButtonArray.splice(e,1)}},{key:"displayFn",value:function(e){return e?e.group_name:void 0}},{key:"addOption",value:function(e){var t=this.questionForm.get("groupQuestion"),c=t.at(e).get("group_name").value;this.options.some((function(e){return e.group_name===c}))||this.addNewOptionToGroup(t,e,c)}},{key:"addNewOptionToGroup",value:function(e,t,c){var n=this;this.loader.open();var a=new FormData;a.append("group_name",c),this.modelService.addOnlineExamGroup(a).subscribe((function(c){var a,i,o;if("success"==c.keyword){var r={onlineexam_group_id:(a=c.data[0].onlineexam_group_id,null!=a?a:""),group_name:(i=c.data[0].group_name,null!=i?i:""),status:(o=c.data[0].status,null!=o?o:"")},s=n.options.push(r)-1;e.at(t).get("group_name").setValue(n.options[s]),n.loader.close()}else n.toaster.present(c.message),n.loader.close()}))}},{key:"checkValue",value:function(e){return!!e}},{key:"changeObj",value:function(e){var t=Object(ge.cloneDeep)(e);return t.filter((function(e){e.group_name=e.group_name?e.group_name.group_name:""})),t}},{key:"create",value:function(){var e,t,c,n,a,i,o,r,s,l=this,d=this.questionForm.value,u=this.severdatePipe.transform(d.lastSubmission),m=this.severdatePipe.transform(d.startDate);if(this.questionForm.valid){this.loader.open();var p=this.changeObj(d.groupQuestion),h=new FormData;h.append("academic_year_id",null===(e=this.basicData)||void 0===e?void 0:e.academicId),h.append("batch_id",null===(t=this.basicData)||void 0===t?void 0:t.batchId),h.append("class_id",null===(c=this.basicData)||void 0===c?void 0:c.classId),h.append("subject_id",null===(n=this.basicData)||void 0===n?void 0:n.subjectId),h.append("description",null!=(a=d.description)?a:""),h.append("title",d.title),h.append("language_type",null!=(i=this.basicData.language)?i:""),h.append("start_date",m),h.append("start_time",null===(o=d)||void 0===o?void 0:o.startTime),h.append("end_time",null===(r=d)||void 0===r?void 0:r.endTime),h.append("last_submission_time",d.lastSubmissionTime),h.append("last_submission_date",u),h.append("section_id",JSON.stringify(null===(s=this.basicData)||void 0===s?void 0:s.sectionIds)),h.append("groups",JSON.stringify(p)),this.modelService.Question(h,"create").subscribe((function(e){"success"==e.keyword?(console.log(e),l.submitButton.disabled=!1,localStorage.setItem("parentPageId","1"),l.loader.close(),l.router.navigate(["/teacher/online-exam/onlineexam/".concat(e.onlineexams[0].onlineexamId)]),l.toaster.present(e.message,"")):(l.loader.close(),l.submitButton.disabled=!1,l.toaster.present(e.message))}))}}}])}()).\u0275fac=function(e){return new(e||Le)(W.Xb(le),W.Xb(h.g),W.Xb(de.a),W.Xb(ue.a),W.Xb(fe.a),W.Xb(g.f),W.Xb(me.a),W.Xb(he.d))},Le.\u0275cmp=W.Rb({type:Le,selectors:[["app-create"]],viewQuery:function(e,t){var c;1&e&&W.md(b.a,!0),2&e&&W.Nc(c=W.mc())&&(t.submitButton=c.first)},inputs:{checked:"checked"},features:[W.Fb([{provide:y.c,useClass:pe.b},{provide:y.f,useValue:pe.a},he.d])],decls:154,vars:64,consts:[[1,"create_btn","pb-0"],["fxLayout","row wrap",1,"mb-12"],["fxFlex","100","fxFlex.gt-xs","35"],["mat-raised-button","","color","primary",1,"btn-primary-bg",3,"disabled","click"],["href","#",1,"pl-12","primary-txt-color",3,"routerLink"],["fxFlex","100","fxFlex.gt-xs","65",1,"mt-8"],["fxLayout","row wrap",1,""],["fxFlex","100","fxFlex.gt-xs","100",1,""],["fxFlex","100","fxFlex.gt-xs","25",1,"mr-4"],[1,"ml-8"],["fxFlex","100","fxFlex.gt-xs","25"],[4,"ngFor","ngForOf"],[1,"form_bg","create_student"],[1,"p-0","pagewrap"],[3,"formGroup"],[1,""],[1,"card-title-text"],[1,"float-right"],["fxLayout","row wrap",1,"mt-16","grey-100","px-8","border"],["fxFlex","100","fxFlex.gt-xs","6",1,"pt-12"],[1,"red_color"],["fxFlex","100","fxFlex.gt-xs","10",1,""],["appearance","fill",1,"full-width"],["tabindex","4","matInput","","formControlName","startDate",3,"matDatepicker","focus","dateChange","click"],["input",""],["matSuffix","",3,"for"],[3,"closed"],["picker1",""],[4,"ngIf"],["fxFlex","100","fxFlex.gt-xs","8",1,"pt-12","pl-12"],["fxFlex","100","fxFlex.gt-xs","10",1,"pt-12"],["appearance","fill"],["formControlName","startTime","name","startTime","matInput","",3,"ngxTimepicker","format"],[1,"homework_time"],["timePickerFrom",""],["fxFlex","100","fxFlex.gt-xs","8",1,"pl-24","pt-12"],["formControlName","endTime","name","endTime","matInput","",3,"min","ngxTimepicker","format"],["timePicker",""],["fxFlex","100","fxFlex.gt-xs","10"],["fxFlex","100","fxFlex.gt-xs","13",1,"pt-12","pl-12"],["tabindex","4","matInput","","formControlName","lastSubmission",3,"min","matDatepicker","focus","click"],["picker2",""],["fxFlex","100","fxFlex.gt-xs","5",1,"pt-12","pl-12"],["type","text","formControlName","lastSubmissionTime","name","lastSubmissionTime","matInput","",3,"ngxTimepicker","format"],["timePickerTIme",""],["fxLayout","row wrap",1,"mt-24"],["matInput","","name","title","formControlName","title","value","",1,"f18",3,"placeholder"],[1,"table_container"],["formArrayName","groupQuestion",1,"mat-table"],[1,"mat-header-row"],[1,"mat-header-cell",2,"width","5%"],[1,"mat-header-cell"],[1,"mat-header-cell",2,"width","10%"],[1,"mat-header-cell",2,"width","14%"],[1,"mat-header-cell",2,"width","12%"],["class","mat-row",3,"formGroupName",4,"ngFor","ngForOf"],["mat-raised-button","","type","button",1,"icon-white-bg","mt-8",3,"disabled","click"],["_ngcontent-qyx-c19","",1,"material-icons","icon-image-preview"],[1,"mat-row",3,"formGroupName"],[1,"mat-cell","pl-0"],["class","icon-red-bg mt-8",3,"click",4,"ngIf"],[1,"mat-cell"],["matInput","","name","group_name","formControlName","group_name","placeholder","","value","",3,"matAutocomplete"],[3,"displayWith"],["auto","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],["matSuffix","","mat-button","","mat-icon-button","",3,"click",4,"ngIf"],["appearance","fill",2,"width","148px"],["matInput","","name","no_of_question","formControlName","no_of_questions","placeholder","","value","",3,"keyup"],[1,"mat-cell","pl-4"],["appearance","fill",2,"width","120px"],["matInput","","name","marks","formControlName","marks","placeholder","","value","",3,"keyup"],["appearance","fill",2,"width","130px"],["matInput","","name","eachmark","formControlName","each_mark","readonly","","placeholder","","value",""],[1,"mat-cell","pt-4","text-center","pr-32"],["formControlName","answer_option"],[1,"icon-red-bg","mt-8",3,"click"],["_ngcontent-qyx-c19","",1,"material-icons","icon-image-preview",2,"cursor","pointer"],[3,"value"],["matSuffix","","mat-button","","mat-icon-button","",3,"click"],["matTooltip","Add Group"]],template:function(e,t){if(1&e){var c=W.ec();W.dc(0,"div",0),W.dc(1,"div",1),W.dc(2,"div",2),W.dc(3,"button",3),W.lc("click",(function(e){return t.create()})),W.cd(4),W.qc(5,"translate"),W.cc(),W.dc(6,"a",4),W.cd(7),W.qc(8,"translate"),W.cc(),W.cc(),W.dc(9,"div",5),W.dc(10,"div",6),W.dc(11,"div",7),W.dc(12,"div",8),W.dc(13,"label"),W.dc(14,"strong"),W.cd(15,"Academic Year"),W.cc(),W.cc(),W.dc(16,"label",9),W.cd(17),W.cc(),W.cc(),W.dc(18,"div",8),W.dc(19,"label"),W.dc(20,"strong"),W.cd(21,"Batch"),W.cc(),W.cc(),W.dc(22,"label",9),W.cd(23),W.cc(),W.cc(),W.dc(24,"div",8),W.dc(25,"label"),W.dc(26,"strong"),W.cd(27,"Class"),W.cc(),W.cc(),W.dc(28,"label",9),W.cd(29),W.cc(),W.cc(),W.dc(30,"div",10),W.dc(31,"label"),W.dc(32,"strong"),W.cd(33,"Section"),W.cc(),W.cc(),W.dc(34,"label",9),W.ad(35,_e,2,2,"span",11),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(36,"div",12),W.dc(37,"mat-card",13),W.dc(38,"form",14),W.dc(39,"mat-card-title",15),W.dc(40,"div",16),W.cd(41,"Create Online Exam "),W.dc(42,"span",17),W.cd(43),W.cc(),W.cc(),W.Yb(44,"mat-divider"),W.cc(),W.dc(45,"mat-card-content"),W.dc(46,"div",18),W.dc(47,"div",19),W.dc(48,"label"),W.dc(49,"strong"),W.cd(50),W.qc(51,"translate"),W.cc(),W.dc(52,"span",20),W.cd(53,"*"),W.cc(),W.cc(),W.cc(),W.dc(54,"div",21),W.dc(55,"mat-form-field",22),W.dc(56,"input",23,24),W.lc("focus",(function(e){return W.Sc(c),W.Oc(60).open()}))("dateChange",(function(e){return t.isTimeValidate()}))("click",(function(e){return W.Sc(c),W.Oc(60).open()})),W.cc(),W.Yb(58,"mat-datepicker-toggle",25),W.dc(59,"mat-datepicker",26,27),W.lc("closed",(function(e){return W.Sc(c),W.Oc(57).blur()})),W.cc(),W.ad(61,Ce,2,0,"mat-error",28),W.cc(),W.cc(),W.dc(62,"div",29),W.dc(63,"label"),W.dc(64,"strong"),W.cd(65),W.qc(66,"translate"),W.cc(),W.dc(67,"span",20),W.cd(68,"*"),W.cc(),W.cc(),W.cc(),W.dc(69,"div",30),W.dc(70,"mat-form-field",31),W.Yb(71,"input",32),W.Yb(72,"ngx-material-timepicker",33,34),W.ad(74,Oe,2,0,"mat-error",28),W.cc(),W.cc(),W.dc(75,"div",35),W.dc(76,"label"),W.dc(77,"strong"),W.cd(78),W.qc(79,"translate"),W.cc(),W.dc(80,"span",20),W.cd(81,"*"),W.cc(),W.cc(),W.cc(),W.dc(82,"div",30),W.dc(83,"mat-form-field",31),W.Yb(84,"input",36),W.Yb(85,"ngx-material-timepicker",null,37),W.ad(87,Fe,2,0,"mat-error",28),W.cc(),W.cc(),W.Yb(88,"div",38),W.dc(89,"div",39),W.dc(90,"label"),W.dc(91,"strong"),W.cd(92),W.qc(93,"translate"),W.cc(),W.dc(94,"span",20),W.cd(95,"*"),W.cc(),W.cc(),W.cc(),W.dc(96,"div",21),W.dc(97,"mat-form-field",22),W.dc(98,"input",40,24),W.lc("focus",(function(e){return W.Sc(c),W.Oc(102).open()}))("click",(function(e){return W.Sc(c),W.Oc(102).open()})),W.cc(),W.Yb(100,"mat-datepicker-toggle",25),W.dc(101,"mat-datepicker",26,41),W.lc("closed",(function(e){return W.Sc(c),W.Oc(57).blur()})),W.cc(),W.ad(103,qe,2,0,"mat-error",28),W.cc(),W.cc(),W.dc(104,"div",42),W.dc(105,"label"),W.dc(106,"strong"),W.cd(107,"Time"),W.cc(),W.dc(108,"span",20),W.cd(109,"*"),W.cc(),W.cc(),W.cc(),W.dc(110,"div",30),W.dc(111,"mat-form-field",31),W.Yb(112,"input",43),W.Yb(113,"ngx-material-timepicker",33,44),W.ad(115,Ge,2,0,"mat-error",28),W.cc(),W.cc(),W.cc(),W.dc(116,"div",45),W.dc(117,"div",7),W.dc(118,"div",15),W.dc(119,"mat-form-field",22),W.Yb(120,"input",46),W.qc(121,"translate"),W.ad(122,Ie,3,3,"mat-error",28),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(123,"div",47),W.dc(124,"table",48),W.dc(125,"tr",49),W.Yb(126,"th",50),W.dc(127,"th",51),W.cd(128),W.qc(129,"translate"),W.dc(130,"span",20),W.cd(131,"*"),W.cc(),W.cc(),W.dc(132,"th",52),W.cd(133),W.qc(134,"translate"),W.dc(135,"span",20),W.cd(136,"*"),W.cc(),W.cc(),W.dc(137,"th",52),W.cd(138),W.qc(139,"translate"),W.dc(140,"span",20),W.cd(141,"*"),W.cc(),W.cc(),W.dc(142,"th",53),W.cd(143),W.qc(144,"translate"),W.dc(145,"span",20),W.cd(146,"*"),W.cc(),W.cc(),W.dc(147,"th",54),W.cd(148),W.qc(149,"translate"),W.cc(),W.cc(),W.ad(150,je,27,13,"tr",55),W.cc(),W.cc(),W.dc(151,"button",56),W.lc("click",(function(e){return t.addRow()})),W.dc(152,"i",57),W.cd(153,"add"),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.cc()}if(2&e){var n=W.Oc(60),a=W.Oc(73),i=W.Oc(86),o=W.Oc(102),r=W.Oc(114);W.Gb(3),W.yc("disabled",!t.questionForm.valid),W.Gb(1),W.ed(" ",W.rc(5,40,"homework.question.button.saveContinue")," "),W.Gb(2),W.yc("routerLink","/teacher/online-exam/list"),W.Gb(1),W.dd(W.rc(8,42,"homework.question.button.discard")),W.Gb(10),W.dd(null==t.basicData?null:t.basicData.academicName),W.Gb(6),W.ed("",null==t.basicData?null:t.basicData.batchName," "),W.Gb(6),W.ed("",null==t.basicData?null:t.basicData.className," "),W.Gb(6),W.yc("ngForOf",null==t.basicData?null:t.basicData.section),W.Gb(3),W.yc("formGroup",t.questionForm),W.Gb(5),W.dd(t.basicData.subjectName),W.Gb(7),W.dd(W.rc(51,44,"homework.question.lable.startDate")),W.Gb(6),W.yc("matDatepicker",n),W.Gb(2),W.yc("for",n),W.Gb(3),W.yc("ngIf",null==t.control?null:null==t.control.startDate?null:null==t.control.startDate.errors?null:t.control.startDate.errors.required),W.Gb(4),W.dd(W.rc(66,46,"homework.question.lable.startTime")),W.Gb(6),W.yc("ngxTimepicker",a)("format",t.timeFormat),W.Gb(3),W.yc("ngIf",null==t.control?null:null==t.control.startTime?null:null==t.control.startTime.errors?null:t.control.startTime.errors.required),W.Gb(4),W.dd(W.rc(79,48,"homework.question.lable.endTime")),W.Gb(6),W.yc("min",null==t.control?null:null==t.control.startTime?null:t.control.startTime.value)("ngxTimepicker",i)("format",t.timeFormat),W.Gb(3),W.yc("ngIf",null==t.control?null:null==t.control.endTime?null:null==t.control.endTime.errors?null:t.control.endTime.errors.required),W.Gb(5),W.dd(W.rc(93,50,"homework.assignment.label.LastSubmissionDate")),W.Gb(6),W.yc("min",t.questionForm.controls.startDate.value)("matDatepicker",o),W.Gb(2),W.yc("for",o),W.Gb(3),W.yc("ngIf",(null==t.questionForm.controls.lastSubmission.errors?null:t.questionForm.controls.lastSubmission.errors.required)&&t.questionForm.controls.lastSubmission.touched),W.Gb(9),W.yc("ngxTimepicker",r)("format",t.timeFormat),W.Gb(3),W.yc("ngIf",null==t.questionForm.controls.lastSubmissionTime.errors?null:t.questionForm.controls.lastSubmissionTime.errors.required),W.Gb(5),W.zc("placeholder",W.rc(121,52,"homework.question.lable.Title")),W.Gb(2),W.yc("ngIf",null==t.questionForm.controls.title.errors?null:t.questionForm.controls.title.errors.required),W.Gb(6),W.ed("",W.rc(129,54,"homework.question.lable.Group")," "),W.Gb(5),W.ed("",W.rc(134,56,"homework.question.lable.Noof")," "),W.Gb(5),W.ed("",W.rc(139,58,"homework.question.lable.Marks")," "),W.Gb(5),W.ed("",W.rc(144,60,"homework.question.lable.eachQmark")," "),W.Gb(5),W.ed("",W.rc(149,62,"homework.question.lable.Isanswer")," "),W.Gb(2),W.yc("ngForOf",t.questionForm.get("groupQuestion").controls),W.Gb(1),W.yc("disabled",t.questionForm.get("groupQuestion").invalid)}},directives:[xe.c,xe.a,b.a,h.j,f.n,x.a,g.D,g.u,g.k,x.f,ve.a,x.c,ye.b,_.b,g.c,k.b,g.t,g.i,k.d,ye.f,k.a,f.o,Y.d,Y.a,g.e,ye.a,g.l,ke.c,ke.a,v.a,y.p,w.a,A.a],pipes:[we.c,f.b],styles:[".searc-icon[_ngcontent-%COMP%]{position:absolute;top:112px;right:27px;font-size:18px}.mr-10[_ngcontent-%COMP%]{margin-right:10px}.mt-10[_ngcontent-%COMP%]{margin-top:10px}.ml-10[_ngcontent-%COMP%]{margin-left:10px}table[_ngcontent-%COMP%]{width:100%}.ml-0[_ngcontent-%COMP%]{margin-left:0!important}.minheight[_ngcontent-%COMP%]{margin-bottom:-20px}td.mat-cell[_ngcontent-%COMP%]{padding-top:12px}td.mat-cell[_ngcontent-%COMP%], th.mat-header-cell[_ngcontent-%COMP%]{border-bottom:1px solid hsla(0,0%,50.2%,.25882352941176473);border-collapse:collapse}table.mat-table[_ngcontent-%COMP%]{border-spacing:0}.mt-minus-15[_ngcontent-%COMP%]{margin-top:-15px}.dateshow[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{display:block!important}.label[_ngcontent-%COMP%]{margin-top:10px}.mat-tab[_ngcontent-%COMP%]{font-size:14px;text-transform:uppercase}.f24[_ngcontent-%COMP%]{font-size:24px}.assign-btn[_ngcontent-%COMP%]{background:#019fa2!important;color:#fff!important;border-radius:0!important;border:1px solid #019fa2!important;line-height:17px!important;padding:0 10px!important}.danger-txt-color[_ngcontent-%COMP%]{color:red}.text-right[_ngcontent-%COMP%]{text-align:right}.remove_btn[_ngcontent-%COMP%]{background:red;color:#fff;padding:0 2px;min-width:26px;line-height:11px}.remove_btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{padding-top:3px;font-size:22px}.mat-bg-warn[_ngcontent-%COMP%]{min-width:5px;line-height:23px;padding:0 1px}table.mat-table.cdk-table.relationship[_ngcontent-%COMP%] .full-width[_ngcontent-%COMP%]{width:98%!important}.preview_image[_ngcontent-%COMP%]{background-repeat:no-repeat!important;margin:8px 0 0 120px!important;max-width:100px!important;height:100px}image-cropper[_ngcontent-%COMP%]{width:300px!important;height:130px!important}.mt-20[_ngcontent-%COMP%]{margin-top:20px!important}mat-header-row.mat-header-row.cdk-header-row.ng-tns-c375-2.ng-star-inserted[_ngcontent-%COMP%]{display:none}mat-form-field.mat-form-field[_ngcontent-%COMP%]{width:100%}.image[_ngcontent-%COMP%]{margin-top:-35px}@media only screen and (max-width:375px){.form_bg.create_student[_ngcontent-%COMP%]{width:375px!important}}@media (max-width:414px){.lastname[_ngcontent-%COMP%]{padding-left:0!important}}.preview-btn[_ngcontent-%COMP%]{border:1px solid #01a39d!important;color:#01a39d!important;background:#fff!important;line-height:25px!important;border-radius:0}.f14[_ngcontent-%COMP%]{font-size:14px}.f16[_ngcontent-%COMP%]{font-size:16px}.f18[_ngcontent-%COMP%]{font-size:18px}.group_based[_ngcontent-%COMP%]{border:1px solid hsla(0,0%,50.2%,.30980392156862746)}.attachment[_ngcontent-%COMP%]{font-size:18px;margin-left:-9px;padding-top:5px}img[_ngcontent-%COMP%]{margin-right:4px}table[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:95%}.card-title-text[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{background:#734f96;color:#fff;font-size:14px;padding:2px 13px}.card-title-text[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:20px;color:#019fa2;margin-left:12px}"]}),Le),ze=c("0EQZ"),Ye=c("PSD3"),Xe=c.n(Ye),He=c("Kj3r"),Re=c("/uUt"),Be=c("xgIS"),$e=c("VxG0"),Ve=c("AH2C"),Ue=c("xe9D"),Je=c("TXEI"),We=c("Ruum"),Ke=c("0IaG");function Ze(e,t){if(1&e){var c=W.ec();W.dc(0,"mat-option",30),W.lc("click",(function(e){W.Sc(c);var n=t.$implicit,a=W.pc();return a.setClassName(n.class_name),a.getSections(n.assign_coordinator_id)})),W.cd(1),W.cc()}if(2&e){var n=t.$implicit;W.yc("value",n.class_id),W.Gb(1),W.ed(" ",n.class_name," ")}}function et(e,t){1&e&&(W.dc(0,"mat-error"),W.cd(1," Please select the class "),W.cc())}function tt(e,t){if(1&e){var c=W.ec();W.dc(0,"button",33),W.lc("click",(function(e){return W.Sc(c),W.Oc(2).click()})),W.dc(1,"input",34,35),W.lc("change",(function(e){return W.Sc(c),W.pc(2).manageSection(e)})),W.cc(),W.cd(3),W.cc()}if(2&e){var n=t.$implicit,a=W.pc(2);W.Nb("checked-section",a.isChecked(n.section_id)),W.Gb(1),W.yc("value",n.section_id),W.Gb(2),W.fd("",a.className,"",n.section_name,"")}}function ct(e,t){if(1&e&&(W.dc(0,"div",5),W.dc(1,"div",21),W.dc(2,"label"),W.dc(3,"strong"),W.cd(4,"Select Section"),W.cc(),W.dc(5,"span",7),W.cd(6,"*"),W.cc(),W.cc(),W.cc(),W.dc(7,"div",31),W.ad(8,tt,4,5,"button",32),W.cc(),W.cc()),2&e){var c=W.pc();W.Gb(8),W.yc("ngForOf",c.sections)}}function nt(e,t){1&e&&(W.dc(0,"label",36),W.cd(1,"Notes : Should select atleast any one of the section"),W.cc())}function at(e,t){if(1&e&&(W.dc(0,"mat-option",37),W.cd(1),W.cc()),2&e){var c=t.$implicit;W.yc("value",c.subjectId),W.Gb(1),W.ed(" ",c.subjectName," ")}}function it(e,t){1&e&&(W.dc(0,"mat-error"),W.cd(1," Please select the subject "),W.cc())}var ot,rt=((ot=function(){return _createClass((function e(t,c,n,a,i,o,r,s){_classCallCheck(this,e),this.dialogRef=t,this.dialog=c,this.router=n,this.modelService=a,this.teacherService=i,this.commonService=o,this.subjectService=r,this.toaster=s,this.section=[],this.currentAcademicYearId="",this.className="",localStorage.removeItem("assTranLang"),localStorage.removeItem("quesTranLang");var l=Object(Ue.b)().app.config;this.currentAcademicYearId=localStorage.getItem(l.academicId),this.batchId=localStorage.getItem(l.batchId),this.academicName=localStorage.getItem(l.academicName),this.batchName=localStorage.getItem(l.batchName)}),[{key:"ngOnInit",value:function(){this.form(),this.getClassesByBatch()}},{key:"form",value:function(){this.basicForm=new g.j({academicYearId:new g.g(this.currentAcademicYearId),batch:new g.g(this.batchId,g.B.required),class:new g.g("",g.B.required),subject:new g.g("",g.B.required),language:new g.g("",g.B.required)})}},{key:"control",get:function(){return this.basicForm.controls}},{key:"btnClick",value:function(){var e,t,c,n,a=this;if(this.basicForm.valid&&0!=this.section.length){var i=this.basicForm.value,o=this.classes.find((function(e){var t;return e.class_id==(null===(t=i)||void 0===t?void 0:t.class)})).class_name,r=[];this.section.forEach((function(e){var t=a.sections.find((function(t){return t.section_id==e}));r.push(t.section_name)}));var s=this.subjects.find((function(e){var t;return e.subjectId==(null===(t=i)||void 0===t?void 0:t.subject)})).subjectName;console.log(this.academicYear,"basicData");var l={academicId:this.currentAcademicYearId,academicName:this.academicName,batchId:null===(e=i)||void 0===e?void 0:e.batch,batchName:this.batchName,classId:null===(t=i)||void 0===t?void 0:t.class,className:o,sectionIds:this.section,section:r,subjectId:null===(c=i)||void 0===c?void 0:c.subject,subjectName:s,language:null===(n=i)||void 0===n?void 0:n.language};localStorage.setItem("basicData",JSON.stringify(l)),this.dialogRef.close(!0),localStorage.setItem("quesTranLang",i.language),this.router.navigate(["/teacher/online-exam/create"])}else Xe.a.fire({title:"Check Required",text:"Fill Mandatory Fields",icon:"warning"})}},{key:"getClassesByBatch",value:function(){var e=this;this.commonService.getClasses(this.batchId).subscribe((function(t){"success"==t.keyword?(e.classes=t.data,e.getSub()):e.toaster.present(t.message,"")}))}},{key:"getSections",value:function(e){var t=this;this.commonService.getSectionByClass(e).subscribe((function(e){"success"==e.keyword?(t.sections=e.data,t.getSub()):t.toaster.present(e.message,"")}))}},{key:"getSub",value:function(){var e=this;this.subjectService.getList({}).subscribe((function(t){"success"==t.keyword&&(e.subjects=t.subjects.filter((function(e){return"1"==e.status})))}))}},{key:"manageSection",value:function(e){var t=e.target.checked,c=e.target.value;console.log(e,"event"),console.log(e.target.checked,"event"),console.log(e.target.value,"event"),1==t?this.section.push(c):this.section=this.section.filter((function(e){return e!=c})),this.getSub(),console.log(this.section,"23456")}},{key:"isChecked",value:function(e){var t,c=_createForOfIteratorHelper(this.section);try{for(c.s();!(t=c.n()).done;)if(t.value==e)return!0}catch(n){c.e(n)}finally{c.f()}}},{key:"setClassName",value:function(e){this.className=e}},{key:"discard",value:function(){this.dialogRef.close(),localStorage.removeItem("basicData")}}])}()).\u0275fac=function(e){return new(e||ot)(W.Xb(Ke.f),W.Xb(Ke.b),W.Xb(h.g),W.Xb(le),W.Xb(Je.a),W.Xb(We.a),W.Xb(fe.a),W.Xb(ue.a))},ot.\u0275cmp=W.Rb({type:ot,selectors:[["app-create"]],decls:60,vars:20,consts:[[1,"p-0"],[1,""],[1,"card-title-text"],[1,"mb-0","pb-4"],[3,"formGroup"],["fxLayout","row wrap",1,"mt-12","grade-checkbox"],["fxFlex","100","fxFlex.gt-xs","12",1,"mt-4"],[1,"red_color"],["fxFlex","100","fxFlex.gt-xs","30",1,"flex-row","mt-4"],[1,"full-width"],["formControlName","class"],[3,"value","click",4,"ngFor","ngForOf"],[4,"ngIf"],["fxLayout","row wrap","class","mt-12 grade-checkbox",4,"ngIf"],["class","my-12",4,"ngIf"],["fxLayout","row wrap",1,"mt-28"],["fxFlex","100","fxFlex.gt-xs","13",1,"mt-0"],["fxFlex","100","fxFlex.gt-xs","81.5",1,""],["formControlName","subject"],[3,"value",4,"ngFor","ngForOf"],["fxLayout","row wrap",1,"mt-12"],["fxFlex","100","fxFlex.gt-xs","100",1,"mt-0"],["fxFlex","100","fxFlex.gt-xs","100",1,"mt-16","mb-12"],["aria-label","Select an option","formControlName","language",1,"ml-15","f14"],["name","language","value","english","checked","",1,"mr-24"],["name","language","value","tamil",1,"mr-24"],["name","language","value","hindi",1,"mr-24"],["name","language","value","french",1,"mr-24"],["mat-raised-button","","color","primary",1,"btn-primary-bg","ml-0","mt-24","mb-12",3,"disabled","click"],[1,"pl-8","primary-txt-color",3,"click"],[3,"value","click"],["fxFlex","100","fxFlex.gt-xs","100",1,"flex-row","mt-16","mb-12"],["mat-mini-fab","","style","border-radius: 0px; background: #cccccc5e; border: 1px solid #9F9C9C;color: #222;margin-right: 24px;margin-bottom: 8px;",3,"checked-section","click",4,"ngFor","ngForOf"],["mat-mini-fab","",2,"border-radius","0px","background","#cccccc5e","border","1px solid #9F9C9C","color","#222","margin-right","24px","margin-bottom","8px",3,"click"],["type","checkbox",2,"display","none",3,"value","change"],["section",""],[1,"my-12"],[3,"value"]],template:function(e,t){1&e&&(W.dc(0,"mat-card",0),W.dc(1,"mat-card-title",1),W.dc(2,"div",2),W.cd(3,"Create Online Exam"),W.cc(),W.Yb(4,"mat-divider"),W.cc(),W.dc(5,"mat-card-content",3),W.dc(6,"form",4),W.dc(7,"div",5),W.dc(8,"div",6),W.dc(9,"label"),W.dc(10,"strong"),W.cd(11,"Class"),W.cc(),W.dc(12,"span",7),W.cd(13,"*"),W.cc(),W.cc(),W.cc(),W.dc(14,"div",8),W.dc(15,"mat-form-field",9),W.Yb(16,"mat-label"),W.dc(17,"mat-select",10),W.ad(18,Ze,2,2,"mat-option",11),W.cc(),W.ad(19,et,2,0,"mat-error",12),W.cc(),W.cc(),W.cc(),W.ad(20,ct,9,1,"div",13),W.ad(21,nt,2,0,"label",14),W.dc(22,"div",15),W.dc(23,"div",16),W.dc(24,"label"),W.dc(25,"strong"),W.cd(26,"Subject"),W.cc(),W.dc(27,"span",7),W.cd(28,"*"),W.cc(),W.cc(),W.cc(),W.dc(29,"div",17),W.dc(30,"mat-form-field",9),W.Yb(31,"mat-label"),W.dc(32,"mat-select",18),W.ad(33,at,2,2,"mat-option",19),W.cc(),W.ad(34,it,2,0,"mat-error",12),W.cc(),W.cc(),W.cc(),W.dc(35,"div",20),W.dc(36,"div",21),W.dc(37,"label"),W.dc(38,"strong"),W.cd(39,"Select an Language"),W.cc(),W.dc(40,"span",7),W.cd(41,"*"),W.cc(),W.cc(),W.cc(),W.dc(42,"div",22),W.dc(43,"mat-radio-group",23),W.dc(44,"mat-radio-button",24),W.cd(45),W.qc(46,"translate"),W.cc(),W.dc(47,"mat-radio-button",25),W.cd(48),W.qc(49,"translate"),W.cc(),W.dc(50,"mat-radio-button",26),W.cd(51),W.qc(52,"translate"),W.cc(),W.dc(53,"mat-radio-button",27),W.cd(54),W.qc(55,"translate"),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(56,"button",28),W.lc("click",(function(e){return t.btnClick()})),W.cd(57,"Submit"),W.cc(),W.dc(58,"a",29),W.lc("click",(function(e){return t.discard()})),W.cd(59,"Discard"),W.cc(),W.cc(),W.cc()),2&e&&(W.Gb(6),W.yc("formGroup",t.basicForm),W.Gb(12),W.yc("ngForOf",t.classes),W.Gb(1),W.yc("ngIf",null==t.control?null:null==t.control.class?null:null==t.control.class.errors?null:t.control.class.errors.required),W.Gb(1),W.yc("ngIf",null==t.control?null:null==t.control.class?null:t.control.class.value),W.Gb(1),W.yc("ngIf",null==t.control?null:null==t.control.class?null:t.control.class.value),W.Gb(12),W.yc("ngForOf",t.subjects),W.Gb(1),W.yc("ngIf",null==t.control?null:null==t.control.subject?null:null==t.control.subject.errors?null:t.control.subject.errors.required),W.Gb(11),W.ed(" ",W.rc(46,12,"homework.assignment.radio.english"),""),W.Gb(3),W.ed(" ",W.rc(49,14,"homework.assignment.radio.tamil"),""),W.Gb(3),W.ed(" ",W.rc(52,16,"homework.assignment.radio.hindi")," "),W.Gb(3),W.ed(" ",W.rc(55,18,"homework.assignment.radio.french"),""),W.Gb(2),W.yc("disabled",!t.basicForm.valid&&0==t.section.length))},directives:[x.a,x.f,ve.a,x.c,g.D,g.u,g.k,xe.c,xe.a,ye.b,ye.e,j.a,g.t,g.i,f.n,f.o,F.b,F.a,b.a,y.p,ye.a],pipes:[we.c],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.row[_ngcontent-%COMP%]{margin-top:-10px}.f24[_ngcontent-%COMP%]{font-size:24px;margin-left:-10px}.contact_person_detail[_ngcontent-%COMP%]{border-radius:50%;width:85px}.f18[_ngcontent-%COMP%]{font-size:18px}.mat-green[_ngcontent-%COMP%]{padding:4px!important;border-radius:0!important;font-size:13px!important;background:rgba(0,128,0,.6588235294117647)!important;color:#fff}.checked-section[_ngcontent-%COMP%]{background:#019fa2!important;color:#fff!important;box-shadow:0 2px 1px 0 #222!important;border-radius:0!important;margin-right:24px;margin-bottom:8px}.unchecked-section[_ngcontent-%COMP%]{background:hsla(0,0%,80%,.3686274509803922)!important;border:1px solid #9f9c9c!important;color:#222!important;border-radius:0!important;margin-right:24px;margin-bottom:8px}.ml-0[_ngcontent-%COMP%]{margin-left:0!important}"]}),ot),st=c("73gp");function lt(e,t){if(1&e&&(W.dc(0,"mat-radio-button",16),W.dc(1,"span"),W.cd(2),W.cc(),W.cc()),2&e){var c=t.$implicit,n=W.pc(2);W.Nb("checked-section",n.ischecked(c.section_id)),W.yc("value",c.section_id),W.Gb(2),W.fd("",n.onlineexam.className,"",c.section_name,"")}}function dt(e,t){if(1&e&&(W.dc(0,"div",10),W.dc(1,"div",11),W.dc(2,"label"),W.dc(3,"strong"),W.cd(4,"Select Section"),W.cc(),W.dc(5,"span",12),W.cd(6,"*"),W.cc(),W.cc(),W.cc(),W.dc(7,"div",13),W.dc(8,"mat-radio-group",14),W.ad(9,lt,3,5,"mat-radio-button",15),W.cc(),W.cc(),W.cc()),2&e){var c=W.pc();W.Gb(9),W.yc("ngForOf",c.sections)}}function ut(e,t){1&e&&(W.dc(0,"label",17),W.cd(1,"Notes : Should select atleast any one of the section"),W.cc())}var mt,pt=((mt=function(){return _createClass((function e(t,c,n,a,i,o,r){_classCallCheck(this,e),this.onlineexam=t,this.dialogRef=c,this.dialog=n,this.router=a,this.toaster=i,this.sectionService=o,this.commonService=r;var s=Object(Ue.b)().app.config;this.batchId=localStorage.getItem(s.batchId),console.log(t,"onlineexam")}),[{key:"ngOnInit",value:function(){this.getSections(),this.form()}},{key:"form",value:function(){this.basicForm=new g.j({section:new g.g("",g.B.required)})}},{key:"getSections",value:function(){var e=this;this.commonService.getSections(this.batchId).subscribe((function(t){"success"==t.keyword?e.sections=t.data:e.toaster.present(t.message,"")}))}},{key:"ischecked",value:function(e){if(this.basicForm.value.section==e)return!0}},{key:"btnClick",value:function(){var e=this;this.dialogRef.close(!0);var t=this.sections.find((function(t){return t.section_id==e.basicForm.value.section}));localStorage.setItem("sectionForEvaluate",JSON.stringify({sectionId:this.basicForm.value.section,sectionName:t.section_name})),this.router.navigate(["/teacher/online-exam/student-list",this.onlineexam.onlineexamId])}},{key:"discard",value:function(){this.dialogRef.close(!0)}}])}()).\u0275fac=function(e){return new(e||mt)(W.Xb(Ke.a),W.Xb(Ke.f),W.Xb(Ke.b),W.Xb(h.g),W.Xb(ue.a),W.Xb(st.a),W.Xb(We.a))},mt.\u0275cmp=W.Rb({type:mt,selectors:[["app-create"]],decls:14,vars:4,consts:[[1,"p-0"],[1,""],[1,"card-title-text"],[1,"mb-0","pb-4"],[3,"formGroup"],["fxLayout","row wrap","class","mt-12 grade-checkbox",4,"ngIf"],["class","mt-12",4,"ngIf"],[1,"pt-4","mt-4"],["mat-raised-button","","color","primary",1,"btn-primary-bg","mr-12","mt-12",3,"disabled","click"],[1,"pl-8","primary-txt-color",3,"click"],["fxLayout","row wrap",1,"mt-12","grade-checkbox"],["fxFlex","100","fxFlex.gt-xs","100",1,"mt-0"],[1,"red_color"],["fxFlex","100","fxFlex.gt-xs","100",1,"flex-row","mt-16","mb-12","custom_radio"],["aria-label","Select an option","formControlName","section","name","report",1,"ml-15"],["disableRipple","true","style","background: #cccccc5e; border: 1px solid #9F9C9C;color: #222;margin-right: 24px;margin-bottom: 8px;","mat-mini-fab","",3,"checked-section","value",4,"ngFor","ngForOf"],["disableRipple","true","mat-mini-fab","",2,"background","#cccccc5e","border","1px solid #9F9C9C","color","#222","margin-right","24px","margin-bottom","8px",3,"value"],[1,"mt-12"]],template:function(e,t){1&e&&(W.dc(0,"mat-card",0),W.dc(1,"mat-card-title",1),W.dc(2,"div",2),W.cd(3,"Evaluate "),W.cc(),W.Yb(4,"mat-divider"),W.cc(),W.dc(5,"mat-card-content",3),W.dc(6,"form",4),W.ad(7,dt,10,1,"div",5),W.ad(8,ut,2,0,"label",6),W.cc(),W.cc(),W.dc(9,"mat-card-footer",7),W.dc(10,"button",8),W.lc("click",(function(e){return t.btnClick()})),W.cd(11,"Submit"),W.cc(),W.dc(12,"a",9),W.lc("click",(function(e){return t.discard()})),W.cd(13,"Discard"),W.cc(),W.cc(),W.cc()),2&e&&(W.Gb(6),W.yc("formGroup",t.basicForm),W.Gb(1),W.yc("ngIf",t.sections),W.Gb(1),W.yc("ngIf",t.sections),W.Gb(2),W.yc("disabled",t.basicForm.invalid))},directives:[x.a,x.f,ve.a,x.c,g.D,g.u,g.k,f.o,x.d,b.a,xe.c,xe.a,F.b,g.t,g.i,f.n,F.a],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.row[_ngcontent-%COMP%]{margin-top:-10px}.f24[_ngcontent-%COMP%]{font-size:24px;margin-left:-10px}.contact_person_detail[_ngcontent-%COMP%]{border-radius:50%;width:85px}.f18[_ngcontent-%COMP%]{font-size:18px}.mat-green[_ngcontent-%COMP%]{padding:4px!important;border-radius:0!important;font-size:13px!important;background:rgba(0,128,0,.6588235294117647)!important;color:#fff}.checked-section[_ngcontent-%COMP%]{background:#019fa2!important;color:#fff!important;box-shadow:0 2px 1px 0 #222!important}.unchecked-section[_ngcontent-%COMP%]{background:hsla(0,0%,80%,.3686274509803922)!important;border:1px solid #9f9c9c!important;color:#222!important}mat-radio-button[_ngcontent-%COMP%]{background:hsla(0,0%,80%,.3686274509803922);border-radius:50%;border:1px solid #9f9c9c;color:#222;margin-right:24px;margin-bottom:8px;width:40px;height:40px;cursor:pointer;box-shadow:0 2px 1px 0 #222!important}mat-radio-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:relative;top:9px;right:14px}"]}),mt),ht=c("DGYh"),ft=c("t/Tn"),gt=c("34SS");function bt(e,t){if(1&e&&(W.dc(0,"mat-radio-button",16),W.dc(1,"span"),W.cd(2),W.cc(),W.cc()),2&e){var c=t.$implicit,n=W.pc(2);W.Nb("checked-section",n.ischecked(c.section_id)),W.yc("value",c.section_id),W.Gb(2),W.fd("",n.onlineexam.className,"",c.section_name,"")}}function xt(e,t){if(1&e&&(W.dc(0,"div",10),W.dc(1,"div",11),W.dc(2,"label"),W.dc(3,"strong"),W.cd(4,"Select Section"),W.cc(),W.dc(5,"span",12),W.cd(6,"*"),W.cc(),W.cc(),W.cc(),W.dc(7,"div",13),W.dc(8,"mat-radio-group",14),W.ad(9,bt,3,5,"mat-radio-button",15),W.cc(),W.cc(),W.cc()),2&e){var c=W.pc();W.Gb(9),W.yc("ngForOf",c.sections)}}function vt(e,t){1&e&&(W.dc(0,"label",17),W.cd(1,"Notes : Should select atleast any one of the section"),W.cc())}var yt,kt=((yt=function(){return _createClass((function e(t,c,n,a,i,o,r){_classCallCheck(this,e),this.onlineexam=t,this.dialogRef=c,this.dialog=n,this.router=a,this.toaster=i,this.sectionService=o,this.commonService=r;var s=Object(Ue.b)().app.config;this.batchId=localStorage.getItem(s.batchId),console.log(t,"onlineexam")}),[{key:"ngOnInit",value:function(){this.getSections(),this.form()}},{key:"form",value:function(){this.basicForm=new g.j({section:new g.g("",g.B.required)})}},{key:"getSections",value:function(){var e=this;this.commonService.getSections(this.batchId).subscribe((function(t){"success"==t.keyword?e.sections=t.data:e.toaster.present(t.message,"")}))}},{key:"ischecked",value:function(e){if(this.basicForm.value.section==e)return!0}},{key:"btnClick",value:function(){this.dialogRef.close(!0),this.router.navigate(["/teacher/online-exam/onlineexam-analysis/".concat(this.onlineexam.onlineexamId,"/").concat(this.onlineexam.classId,"/").concat(this.basicForm.value.section)])}},{key:"discard",value:function(){this.dialogRef.close(!0)}}])}()).\u0275fac=function(e){return new(e||yt)(W.Xb(Ke.a),W.Xb(Ke.f),W.Xb(Ke.b),W.Xb(h.g),W.Xb(ue.a),W.Xb(st.a),W.Xb(We.a))},yt.\u0275cmp=W.Rb({type:yt,selectors:[["app-create"]],decls:14,vars:4,consts:[[1,"p-0"],[1,""],[1,"card-title-text"],[1,"mb-0","pb-4"],[3,"formGroup"],["fxLayout","row wrap","class","mt-12 grade-checkbox",4,"ngIf"],["class","mt-12",4,"ngIf"],[1,"pt-4","mt-4"],["mat-raised-button","","color","primary",1,"btn-primary-bg","mr-12","mt-12",3,"disabled","click"],[1,"pl-8","primary-txt-color",3,"click"],["fxLayout","row wrap",1,"mt-12","grade-checkbox"],["fxFlex","100","fxFlex.gt-xs","100",1,"mt-0"],[1,"red_color"],["fxFlex","100","fxFlex.gt-xs","100",1,"flex-row","mt-16","mb-12","custom_radio"],["aria-label","Select an option","formControlName","section","name","report",1,"ml-15"],["disableRipple","true","style","background: #cccccc5e; border: 1px solid #9F9C9C;color: #222;margin-right: 24px;margin-bottom: 8px;","mat-mini-fab","",3,"checked-section","value",4,"ngFor","ngForOf"],["disableRipple","true","mat-mini-fab","",2,"background","#cccccc5e","border","1px solid #9F9C9C","color","#222","margin-right","24px","margin-bottom","8px",3,"value"],[1,"mt-12"]],template:function(e,t){1&e&&(W.dc(0,"mat-card",0),W.dc(1,"mat-card-title",1),W.dc(2,"div",2),W.cd(3,"Onlineexam Analytics "),W.cc(),W.Yb(4,"mat-divider"),W.cc(),W.dc(5,"mat-card-content",3),W.dc(6,"form",4),W.ad(7,xt,10,1,"div",5),W.ad(8,vt,2,0,"label",6),W.cc(),W.cc(),W.dc(9,"mat-card-footer",7),W.dc(10,"button",8),W.lc("click",(function(e){return t.btnClick()})),W.cd(11,"Submit"),W.cc(),W.dc(12,"a",9),W.lc("click",(function(e){return t.discard()})),W.cd(13,"Discard"),W.cc(),W.cc(),W.cc()),2&e&&(W.Gb(6),W.yc("formGroup",t.basicForm),W.Gb(1),W.yc("ngIf",t.sections),W.Gb(1),W.yc("ngIf",t.sections),W.Gb(2),W.yc("disabled",t.basicForm.invalid))},directives:[x.a,x.f,ve.a,x.c,g.D,g.u,g.k,f.o,x.d,b.a,xe.c,xe.a,F.b,g.t,g.i,f.n,F.a],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.row[_ngcontent-%COMP%]{margin-top:-10px}.f24[_ngcontent-%COMP%]{font-size:24px;margin-left:-10px}.contact_person_detail[_ngcontent-%COMP%]{border-radius:50%;width:85px}.f18[_ngcontent-%COMP%]{font-size:18px}.mat-green[_ngcontent-%COMP%]{padding:4px!important;border-radius:0!important;font-size:13px!important;background:rgba(0,128,0,.6588235294117647)!important;color:#fff}.checked-section[_ngcontent-%COMP%]{background:#019fa2!important;color:#fff!important;box-shadow:0 2px 1px 0 #222!important}.unchecked-section[_ngcontent-%COMP%]{background:hsla(0,0%,80%,.3686274509803922)!important;border:1px solid #9f9c9c!important;color:#222!important}mat-radio-button[_ngcontent-%COMP%]{background:hsla(0,0%,80%,.3686274509803922);border-radius:50%;border:1px solid #9f9c9c;color:#222;margin-right:24px;margin-bottom:8px;width:40px;height:40px;cursor:pointer;box-shadow:0 2px 1px 0 #222!important}mat-radio-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:relative;top:9px;right:14px}"]}),yt),wt=c("dNgK"),_t=c("znSr"),Ct=["filterInput"];function Ot(e,t){if(1&e){var c=W.ec();W.dc(0,"button",52),W.lc("click",(function(e){return W.Sc(c),W.pc().subjectSearch=""})),W.dc(1,"mat-icon"),W.cd(2,"close"),W.cc(),W.cc()}}function Ft(e,t){if(1&e){var c=W.ec();W.dc(0,"mat-checkbox",53),W.lc("change",(function(e){W.Sc(c);var n=t.$implicit;return W.pc().onSubjectChange(e.checked,n.subjectId)})),W.cd(1),W.cc()}if(2&e){var n=t.$implicit;W.Gb(1),W.ed(" ",n.subjectName,"")}}function qt(e,t){if(1&e){var c=W.ec();W.dc(0,"button",52),W.lc("click",(function(e){return W.Sc(c),W.pc().classSearch=""})),W.dc(1,"mat-icon"),W.cd(2,"close"),W.cc(),W.cc()}}function Gt(e,t){if(1&e){var c=W.ec();W.dc(0,"mat-checkbox",53),W.lc("change",(function(e){W.Sc(c);var n=t.$implicit;return W.pc().onClassChange(e.checked,n.class_id)})),W.cd(1),W.cc()}if(2&e){var n=t.$implicit;W.Gb(1),W.ed(" ",n.class_name,"")}}function It(e,t){if(1&e){var c=W.ec();W.dc(0,"button",52),W.lc("click",(function(e){return W.Sc(c),W.pc().sectionSearch=""})),W.dc(1,"mat-icon"),W.cd(2,"close"),W.cc(),W.cc()}}function St(e,t){if(1&e){var c=W.ec();W.dc(0,"mat-checkbox",53),W.lc("change",(function(e){W.Sc(c);var n=t.$implicit;return W.pc().onSectionChange(e.checked,n.section_id)})),W.cd(1),W.cc()}if(2&e){var n=t.$implicit;W.Gb(1),W.ed(" ",n.section_name,"")}}function Mt(e,t){if(1&e){var c=W.ec();W.dc(0,"button",52),W.lc("click",(function(e){W.Sc(c);var t=W.pc();return t.value="",t.applyFilter("")})),W.dc(1,"mat-icon"),W.cd(2,"close"),W.cc(),W.cc()}}function Pt(e,t){if(1&e){var c=W.ec();W.dc(0,"th",54),W.dc(1,"mat-checkbox",55),W.lc("change",(function(e){W.Sc(c);var t=W.pc();return e?t.masterToggle():null})),W.cc(),W.cc()}if(2&e){var n=W.pc();W.Gb(1),W.yc("checked",n.selection.hasValue()&&n.isAllSelected())("indeterminate",n.selection.hasValue()&&!n.isAllSelected())}}function Qt(e,t){if(1&e){var c=W.ec();W.dc(0,"td",56),W.dc(1,"mat-checkbox",57),W.lc("click",(function(e){return W.Sc(c),e.stopPropagation()}))("change",(function(e){W.Sc(c);var n=t.$implicit,a=W.pc();return e?a.selection.toggle(n):null})),W.cc(),W.cc()}if(2&e){var n=t.$implicit,a=W.pc();W.Gb(1),W.yc("checked",a.selection.isSelected(n))}}function Nt(e,t){1&e&&(W.dc(0,"th",58),W.dc(1,"b"),W.cd(2),W.qc(3,"translate"),W.cc(),W.cc()),2&e&&(W.Gb(2),W.dd(W.rc(3,1,"homework.list.columName.date")))}function At(e,t){if(1&e&&(W.dc(0,"td",59),W.cd(1),W.qc(2,"displayDate"),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.dd(W.rc(2,1,c.submissionDate))}}function Dt(e,t){1&e&&(W.dc(0,"th",60),W.dc(1,"b"),W.cd(2),W.qc(3,"translate"),W.cc(),W.cc()),2&e&&(W.Gb(2),W.dd(W.rc(3,1,"homework.list.columName.type")))}function Tt(e,t){if(1&e&&(W.dc(0,"td",61),W.cd(1),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.dd(c.homeWorkType)}}function jt(e,t){1&e&&(W.dc(0,"th",62),W.dc(1,"b"),W.cd(2),W.qc(3,"translate"),W.cc(),W.cc()),2&e&&(W.Gb(2),W.dd(W.rc(3,1,"homework.list.columName.title")))}function Lt(e,t){if(1&e&&(W.dc(0,"td",59),W.cd(1),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.dd(c.title)}}function Et(e,t){1&e&&(W.dc(0,"th",63),W.dc(1,"b"),W.cd(2),W.qc(3,"translate"),W.cc(),W.cc()),2&e&&(W.Gb(2),W.dd(W.rc(3,1,"homework.list.columName.subject")))}function zt(e,t){if(1&e&&(W.dc(0,"td",59),W.cd(1),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.dd(c.subjectName)}}function Yt(e,t){1&e&&(W.dc(0,"th",64),W.dc(1,"b"),W.cd(2),W.qc(3,"translate"),W.cc(),W.cc()),2&e&&(W.Gb(2),W.dd(W.rc(3,1,"homework.list.columName.classes")))}function Xt(e,t){if(1&e&&(W.dc(0,"td",61),W.cd(1),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.ed(" ",c.className," ")}}function Ht(e,t){1&e&&(W.dc(0,"th",65),W.dc(1,"b"),W.cd(2),W.qc(3,"translate"),W.cc(),W.cc()),2&e&&(W.Gb(2),W.dd(W.rc(3,1,"homework.list.columName.academic")))}function Rt(e,t){if(1&e&&(W.dc(0,"td",61),W.cd(1),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.ed(" ",c.academicYearName," ")}}function Bt(e,t){1&e&&(W.dc(0,"th",66),W.dc(1,"b"),W.cd(2),W.qc(3,"translate"),W.cc(),W.cc()),2&e&&(W.Gb(2),W.dd(W.rc(3,1,"homework.list.columName.batch")))}function $t(e,t){if(1&e&&(W.dc(0,"td",61),W.cd(1),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.ed(" ",c.batchName," ")}}function Vt(e,t){1&e&&(W.dc(0,"th",67),W.dc(1,"b"),W.cd(2),W.qc(3,"translate"),W.cc(),W.cc()),2&e&&(W.Gb(2),W.dd(W.rc(3,1,"homework.list.columName.givenBy")))}function Ut(e,t){if(1&e&&(W.dc(0,"td",59),W.cd(1),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.dd(c.givenBy)}}function Jt(e,t){if(1&e){var c=W.ec();W.dc(0,"th",68),W.cd(1),W.qc(2,"translate"),W.dc(3,"mat-icon",69),W.cd(4,"more_vert"),W.cc(),W.dc(5,"mat-menu",null,70),W.dc(7,"button",71),W.lc("click",(function(e){return W.Sc(c),W.pc().approve()})),W.dc(8,"mat-icon",72),W.cd(9,"assignment_turned_in"),W.cc(),W.dc(10,"span"),W.cd(11),W.qc(12,"translate"),W.cc(),W.cc(),W.dc(13,"button",71),W.lc("click",(function(e){return W.Sc(c),W.pc().studentList()})),W.dc(14,"mat-icon",73),W.cd(15,"done_all"),W.cc(),W.dc(16,"span"),W.cd(17),W.qc(18,"translate"),W.cc(),W.cc(),W.dc(19,"button",71),W.lc("click",(function(e){return W.Sc(c),W.pc().action("view")})),W.dc(20,"mat-icon",74),W.cd(21,"visibility"),W.cc(),W.dc(22,"span"),W.cd(23),W.qc(24,"translate"),W.cc(),W.cc(),W.dc(25,"button",71),W.lc("click",(function(e){return W.Sc(c),W.pc().action("update")})),W.dc(26,"mat-icon",75),W.cd(27,"edit"),W.cc(),W.dc(28,"span"),W.cd(29),W.qc(30,"translate"),W.cc(),W.cc(),W.dc(31,"button",71),W.lc("click",(function(e){return W.Sc(c),W.pc().analysisReport()})),W.dc(32,"mat-icon",76),W.cd(33,"assessment"),W.cc(),W.dc(34,"span"),W.cd(35,"Analytics Report"),W.cc(),W.cc(),W.dc(36,"button",71),W.lc("click",(function(e){return W.Sc(c),W.pc().setStatus(1)})),W.dc(37,"mat-icon",77),W.cd(38,"check"),W.cc(),W.dc(39,"span"),W.cd(40),W.qc(41,"translate"),W.cc(),W.cc(),W.dc(42,"button",71),W.lc("click",(function(e){return W.Sc(c),W.pc().setStatus(0)})),W.dc(43,"mat-icon",78),W.cd(44,"block"),W.cc(),W.dc(45,"span"),W.cd(46),W.qc(47,"translate"),W.cc(),W.cc(),W.dc(48,"button",71),W.lc("click",(function(e){return W.Sc(c),W.pc().setStatus(2)})),W.dc(49,"mat-icon",79),W.cd(50,"delete"),W.cc(),W.dc(51,"span"),W.cd(52),W.qc(53,"translate"),W.cc(),W.cc(),W.cc(),W.cc()}if(2&e){var n=W.Oc(6);W.Gb(1),W.ed(" ",W.rc(2,9,"homework.list.button.status")," "),W.Gb(2),W.yc("matMenuTriggerFor",n),W.Gb(8),W.dd(W.rc(12,11,"homework.list.button.approve")),W.Gb(6),W.dd(W.rc(18,13,"homework.list.button.evaluate")),W.Gb(6),W.dd(W.rc(24,15,"homework.list.button.view")),W.Gb(6),W.dd(W.rc(30,17,"homework.list.button.edit")),W.Gb(11),W.dd(W.rc(41,19,"homework.list.button.active")),W.Gb(6),W.dd(W.rc(47,21,"homework.list.button.inactive")),W.Gb(6),W.dd(W.rc(53,23,"homework.list.button.delete"))}}function Wt(e,t){1&e&&(W.dc(0,"label",83),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.Gb(1),W.dd(W.rc(2,1,"homework.list.button.active")))}function Kt(e,t){1&e&&(W.dc(0,"label",83),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.Gb(1),W.dd(W.rc(2,1,"homework.list.button.itsDrop")))}function Zt(e,t){1&e&&(W.dc(0,"label",84),W.cd(1,"Approved"),W.cc())}function ec(e,t){1&e&&(W.dc(0,"label",85),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.Gb(1),W.dd(W.rc(2,1,"homework.list.button.inactive")))}function tc(e,t){if(1&e&&(W.dc(0,"td",59),W.ad(1,Wt,3,3,"label",80),W.ad(2,Kt,3,3,"label",80),W.ad(3,Zt,2,0,"label",81),W.ad(4,ec,3,3,"label",82),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.yc("ngIf",1==c.status),W.Gb(1),W.yc("ngIf",3==c.status),W.Gb(1),W.yc("ngIf",4==c.status),W.Gb(1),W.yc("ngIf",0==c.status)}}function cc(e,t){1&e&&W.Yb(0,"tr",86)}function nc(e,t){1&e&&W.Yb(0,"tr",87)}function ac(e,t){1&e&&(W.bc(0),W.dc(1,"p",88),W.dc(2,"b"),W.cd(3,"No Data Found..."),W.cc(),W.cc(),W.ac())}var ic,oc=function(){return{margin:"8px 15px 0px 15px"}},rc=function(){return{"flex-flow":"column"}},sc=((ic=function(){return _createClass((function e(t,c,n,a,i,o,r,s,l,d,u,m){_classCallCheck(this,e),this.cdr=t,this.dialog=c,this.router=n,this.modelService=a,this.toaster=i,this.academicService=o,this.batchService=r,this.commonService=s,this.subjectService=l,this.loader=d,this.snack=u,this.permission=m,this.displayedColumns=["select","date","title","subject","classes","acyear","batch","givenby","status"],this.dataSource=new T.o,this.selection=new ze.c(!0,[]),this.pageSizeOptions=[],this.value="",this.yearSearch="",this.batchSearch="",this.classSearch="",this.sectionSearch="",this.subjectSearch="",this.selectedAcademicYear=[],this.selectedSection=[],this.selectedClass=[],this.selectedBatch=[],this.selectedSubject=[],this.selectedType=[],localStorage.removeItem("basicData"),localStorage.removeItem("sectionForEvaluate"),this.paginationDTO=new Ve.a,this.pageSizeOptions=Object(Ue.b)().app.table.filtering.pageSizeOptions;var p=Object(Ue.b)().app.config;this.paginationDTO.academic_year_id=localStorage.getItem(p.academicId),this.paginationDTO.batch_id=localStorage.getItem(p.batchId)}),[{key:"isAllSelected",value:function(){return this.selection.selected.length===this.dataSource.data.length}},{key:"masterToggle",value:function(){var e=this;this.isAllSelected()?this.selection.clear():this.dataSource.data.forEach((function(t){return e.selection.select(t)}))}},{key:"getCheckedValue",value:function(){var e=this,t=[];return this.dataSource.connect().value.forEach((function(c){e.selection.isSelected(c)&&t.push(c)})),t}},{key:"isMultiStatus",value:function(e){return this.getCheckedValue().filter((function(t){if(t.status!=e)return t})).length>0}},{key:"ngOnInit",value:function(){this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort,this.getClass(),this.getSection(),this.getSubject()}},{key:"ngAfterViewInit",value:function(){this.filterKeyUp()}},{key:"openClick",value:function(){this.dialog.open(rt,{width:"40%",disableClose:!0}).afterClosed().subscribe((function(e){console.log("The dialog was closed")}))}},{key:"openClick1",value:function(){this.dialog.open(pt,{width:"40%",data:{onlineexamId:this.onlineexamId,className:this.getCheckedValue()[0].className},disableClose:!0}).afterClosed().subscribe((function(e){}))}},{key:"filterKeyUp",value:function(){var e=this;Object(Be.a)(this.filter.nativeElement,"keyup").pipe(Object(He.a)(150),Object(Re.a)()).subscribe((function(){if(e.dataSource){var t=e.filter.nativeElement.value;t=(t=t.trim()).toLowerCase(),e.paginationDTO.searchWith=t,e.getData()}})),this.getData()}},{key:"onSubjectChange",value:function(e,t){e?this.selectedSubject.push(t):this.selectedSubject=this.selectedSubject.filter((function(e){return e!=t})),this.paginationDTO.filterSubject=this.selectedSubject.length<=0?"":JSON.stringify(this.selectedSubject),this.getData()}},{key:"onYearChange",value:function(e,t){e?this.selectedAcademicYear.push(t):this.selectedAcademicYear=this.selectedAcademicYear.filter((function(e){return e!=t})),this.paginationDTO.filterAcademic=this.selectedAcademicYear.length<=0?"":JSON.stringify(this.selectedAcademicYear),this.getData()}},{key:"onBatchChange",value:function(e,t){e?this.selectedBatch.push(t):this.selectedBatch=this.selectedBatch.filter((function(e){return e!=t})),this.paginationDTO.filterBatch=this.selectedBatch.length<=0?"":JSON.stringify(this.selectedBatch),this.getData()}},{key:"onType",value:function(e,t){e?(this.selectedType.push(t),console.log(this.selectedType,"dgdgdgd")):this.selectedType=this.selectedType.filter((function(e){return e!=t})),this.paginationDTO.filterType=this.selectedType.length<=0?"":JSON.stringify(this.selectedType),this.getData()}},{key:"onClassChange",value:function(e,t){e?this.selectedClass.push(t):this.selectedClass=this.selectedClass.filter((function(e){return e!=t})),this.paginationDTO.filterClass=this.selectedClass.length<=0?"":JSON.stringify(this.selectedClass),this.getData()}},{key:"onSectionChange",value:function(e,t){e?this.selectedSection.push(t):this.selectedSection=this.selectedSection.filter((function(e){return e!=t})),this.paginationDTO.filterSection=this.selectedSection.length<=0?"":JSON.stringify(this.selectedSection),this.getData()}},{key:"sortData",value:function(e){this.paginationDTO.sortByKey=e.active,this.paginationDTO.sortByType=e.direction.toUpperCase(),this.getData()}},{key:"getData",value:function(){var e=this;this.modelService.getList(this.paginationDTO).subscribe((function(t){e.paginationDTO.totalSize=t.pageSize,e.dataSource=new T.o(t.onlineexams),console.log(e.dataSource.data,"this.onlineexams")}))}},{key:"getClass",value:function(){var e=this;this.commonService.getClasses(this.paginationDTO.batch_id).subscribe((function(t){"success"==t.keyword&&(e.classes=t.data)}))}},{key:"getSection",value:function(){var e=this;this.commonService.getSections(this.paginationDTO.batch_id).subscribe((function(t){"success"==t.keyword&&(e.sections=t.data)}))}},{key:"getSubject",value:function(){var e=this;this.subjectService.getList({}).subscribe((function(t){"success"==t.keyword&&(e.subjects=t.subjects.filter((function(e){return"1"==e.status})))}))}},{key:"applyFilter",value:function(e){e=(e=e.trim()).toLowerCase(),this.paginationDTO.searchWith=e,this.getData()}},{key:"onPaginateChange",value:function(e){this.paginationDTO.offset=e.pageIndex,this.paginationDTO.limit=e.pageSize,this.getData()}},{key:"action",value:function(e){var t,c;console.log(null===(t=this.getCheckedValue()[0])||void 0===t?void 0:t.status,"status");var n=e;"4"==(null===(c=this.getCheckedValue()[0])||void 0===c?void 0:c.status)?"update"==n?Xe.a.fire({icon:"error",title:"Update Online Exam",text:"Its approved, so can't update it!"}):"view"==n&&this.forAction(n):this.forAction(n)}},{key:"forAction",value:function(e){var t=this;1==this.getCheckedValue().length?(this.onlineexamId=this.getCheckedValue()[0].onlineexamId,Xe.a.fire({title:"Confirm?",text:"Are you sure? You want to "+e+" !",icon:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Yes, "+e+" it!"}).then((function(c){c.value&&t.router.navigate("update"==e?["/teacher/online-exam/edit/".concat(t.onlineexamId)]:["/teacher/online-exam/view/".concat(t.onlineexamId)])}))):Xe.a.fire({icon:"error",title:"update"==e?"Update Online Exam":"View Online Exam",text:"Please Select One Online Exam!"})}},{key:"setStatus",value:function(e){var t="";if(1==e?t="active":0==e?t="Inactive":2==e&&(t="delete"),this.getCheckedValue().length>=1){var c=1==e?0:1;2==e?this.statusAlert(t,e):this.isMultiStatus(String(c))?Xe.a.fire({icon:"error",title:"Online Exam Status",text:this.isApproved(1==e?"Inactive":"active",e)}):this.statusAlert(t,e)}else Xe.a.fire({icon:"error",title:2!=e?"Change Online Exam Status":"Delete Online Exam ",text:"Please Select Atleast One Online Exam!"})}},{key:"isApproved",value:function(e,t){var c=1==t?"active":"inactive";return"4"==this.getCheckedValue()[0].status?"Its approved, So cannot "+c+" it!":"Please select the "+e+" status of the Online Exam!"}},{key:"statusAlert",value:function(e,t){var c=this;Xe.a.fire({title:"Confirm?",text:"Are you sure? You want to "+e+" it !",icon:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Yes, "+e+" it!"}).then((function(e){e.value&&c.saveStatus(t)}))}},{key:"saveStatus",value:function(e){var t=this,c=[];this.getCheckedValue().forEach((function(e){c.push(e.onlineexamId)})),console.log(c);var n=new FormData;n.append("id",JSON.stringify(c)),2!=e&&n.append("status",String(e)),this.loader.open(),this.modelService.status(n,e).subscribe((function(c){t.data=c,"success"==t.data.keyword?(t.getCheckedValue().forEach((function(c){var n=t.dataSource.data.findIndex((function(e){if(c.onlineexamId==e.onlineexamId)return e}));2==e?t.dataSource.data.splice(n,1):n>=0&&(t.dataSource.data[n].status=e)})),t.refreshTable(),t.loader.close(),t.toaster.present(t.data.message,"")):(t.loader.close(),t.toaster.present(t.data.message,""))}))}},{key:"refreshTable",value:function(){this.dataSource=new T.o(this.dataSource.data),this.filter.nativeElement.value="",this.value="",this.dataSource.paginator=this.paginator,this.selection=new ze.c(!0,[])}},{key:"studentList",value:function(){var e,t=this;if(1==this.getCheckedValue().length){var c=null===(e=this.getCheckedValue()[0])||void 0===e?void 0:e.status;"3"!=c?"4"==c?(this.onlineexamId=this.getCheckedValue()[0].onlineexamId,Xe.a.fire({title:"Confirm?",text:"Are you sure? You want to evaluate it !",icon:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Yes, evaluate it!"}).then((function(e){e.value&&t.openClick1()}))):"4"!=c&&Xe.a.fire({icon:"error",title:"Evaluate Online Exam",text:"To evaluate, please change the status to approve!"}):Xe.a.fire({icon:"error",title:"Evaluate Online Exam",text:"It's already evaluated!"})}else Xe.a.fire({icon:"error",title:"Evaluate Online Exam",text:"Please Select One Online Exam!"})}},{key:"approve",value:function(){var e,t,c,n=this,a=null===(e=this.getCheckedValue()[0])||void 0===e?void 0:e.status,i=Object(gt.b)(),o=Object(ge.get)(i,"coordinator");if(1==this.getCheckedValue().length){var r=null===(t=this.getCheckedValue()[0])||void 0===t?void 0:t.classId,s=o.filter((function(e){return e.class_id==r}));console.log(s,"filtertedCoordinator");var l=(null===(c=s[0])||void 0===c?void 0:c.class_id)==r;console.log(l,"isCoordinatorLogin"),"4"!=a?1==l?(this.onlineexamId=this.getCheckedValue()[0].onlineexamId,Xe.a.fire({title:"Confirm?",text:"Are you sure? You want to approve it !",icon:"warning",showCancelButton:!0,confirmButtonColor:"#3085D6",cancelButtonColor:"#d33",confirmButtonText:"Yes, approve it!"}).then((function(e){e.value&&n.router.navigate(["/teacher/online-exam/approve",n.onlineexamId])}))):Xe.a.fire({icon:"error",title:"Approve Online Exam",text:"Can't have a permission to approve!"}):Xe.a.fire({icon:"error",title:"Approve Online Exam",text:"It's already approved!"})}else Xe.a.fire({icon:"error",title:"Approve Online Exam",text:"Please Select One Online Exam!"})}},{key:"openAnalysisReport",value:function(){this.dialog.open(kt,{width:"40%",data:{onlineexamId:this.onlineexamId,classId:this.getCheckedValue()[0].classId,className:this.getCheckedValue()[0].className},disableClose:!0}).afterClosed().subscribe((function(e){}))}},{key:"analysisReport",value:function(){var e;if(1==this.getCheckedValue().length){var t=null===(e=this.getCheckedValue()[0])||void 0===e?void 0:e.status;"4"==t?(this.onlineexamId=this.getCheckedValue()[0].onlineexamId,this.openAnalysisReport()):"4"!=t&&Xe.a.fire({icon:"error",title:"Analytics Report",text:"To view, please change the status to approve!"})}else Xe.a.fire({icon:"error",title:"Analytics Report",text:"Please Select One Online Exam!"})}}])}()).\u0275fac=function(e){return new(e||ic)(W.Xb(W.h),W.Xb(Ke.b),W.Xb(h.g),W.Xb(le),W.Xb(ue.a),W.Xb(ht.a),W.Xb(ft.a),W.Xb(We.a),W.Xb(fe.a),W.Xb(de.a),W.Xb(wt.a),W.Xb($e.a))},ic.\u0275cmp=W.Rb({type:ic,selectors:[["app-list"]],viewQuery:function(e,t){var c;1&e&&(W.Yc(N.a,!0),W.Yc(D.a,!0),W.md(Ct,!0)),2&e&&(W.Nc(c=W.mc())&&(t.paginator=c.first),W.Nc(c=W.mc())&&(t.sort=c.first),W.Nc(c=W.mc())&&(t.filter=c.first))},decls:95,vars:64,consts:[["fxLayout","row wrap ",1,"pagewrap"],["fxFlex","100","fxFlex.gt-xs","50",1,"pr-1"],[1,"example-button-row","mt-10"],["mat-flat-button","",1,"btn-primary-bg",3,"click"],["mat-flat-button","",1,"btn-primary-bg",3,"routerLink"],["mat-button","","color","primary",3,"matMenuTriggerFor"],[1,"material-icons"],["filter","matMenu"],[1,"filter-menu",3,"ngStyle","click"],[1,"mt-12"],["appearance","fill",1,"",2,"width","100%"],["matInput","","value","","autocomplete","off",3,"placeholder","ngModel","ngModelChange"],["mat-button","","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[1,"cb-wrapper",3,"ngStyle"],["class","example-margin pr-12","class","example-margin pr-12",3,"change",4,"ngFor","ngForOf"],[1,"mt-24"],[1,"mt-24","mb-24"],["class","example-margin pr-12",3,"change",4,"ngFor","ngForOf"],[1,"search",2,"width","100%"],["matInput","","id","filterInput","value","",3,"placeholder","ngModel","ngModelChange"],["filterInput",""],[1,"material-icons","search-icon"],[1,"table_container","pb-1"],[1,""],["mat-table","","matSort","",1,"mat-elevation-z8",3,"dataSource","matSortChange"],["matColumnDef","select",1,"checkbox-field"],["style","width: 5%; text-align: center;","mat-header-cell","",4,"matHeaderCellDef"],["style","width: 5%; text-align: center;","mat-cell","",4,"matCellDef"],["matColumnDef","date"],["mat-header-cell","","style","width: 6%;","mat-sort-header","last_submission_date",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","type"],["mat-header-cell","","style","width: 8%;","mat-sort-header","home_work_type",4,"matHeaderCellDef"],["mat-cell","","class","",4,"matCellDef"],["matColumnDef","title"],["mat-header-cell","","style","width: 21%;","mat-sort-header","title",4,"matHeaderCellDef"],["matColumnDef","subject"],["mat-header-cell","","style","width: 10%;","mat-sort-header","subject_name",4,"matHeaderCellDef"],["matColumnDef","classes"],["mat-header-cell","","class","text-center","style","width: 6%;","mat-sort-header","class_name",4,"matHeaderCellDef"],["matColumnDef","acyear"],["mat-header-cell","","class","text-center","style","width: 10%;","mat-sort-header","academic_year_name",4,"matHeaderCellDef"],["matColumnDef","batch"],["mat-header-cell","","class","","style","width: 10%;","mat-sort-header","batch_name",4,"matHeaderCellDef"],["matColumnDef","givenby"],["mat-header-cell","","style","width: 16%;","mat-sort-header","given_by",4,"matHeaderCellDef"],["matColumnDef","status"],["mat-header-cell","","style","width: 15%;",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[4,"ngIf"],[3,"length","pageSize","pageSizeOptions","page"],["mat-button","","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[1,"example-margin","pr-12",3,"change"],["mat-header-cell","",2,"width","5%","text-align","center"],[3,"checked","indeterminate","change"],["mat-cell","",2,"width","5%","text-align","center"],[3,"checked","click","change"],["mat-header-cell","","mat-sort-header","last_submission_date",2,"width","6%"],["mat-cell",""],["mat-header-cell","","mat-sort-header","home_work_type",2,"width","8%"],["mat-cell","",1,""],["mat-header-cell","","mat-sort-header","title",2,"width","21%"],["mat-header-cell","","mat-sort-header","subject_name",2,"width","10%"],["mat-header-cell","","mat-sort-header","class_name",1,"text-center",2,"width","6%"],["mat-header-cell","","mat-sort-header","academic_year_name",1,"text-center",2,"width","10%"],["mat-header-cell","","mat-sort-header","batch_name",1,"",2,"width","10%"],["mat-header-cell","","mat-sort-header","given_by",2,"width","16%"],["mat-header-cell","",2,"width","15%"],[1,"action",3,"matMenuTriggerFor"],["menu","matMenu"],["mat-menu-item","",3,"click"],[2,"color","#40ca37"],[2,"color","#07b9ef"],[2,"color","#3f51b5"],[2,"color","grey"],[2,"color","#3CCEBF"],[2,"color","green"],[2,"color","#f19421"],[2,"color","red"],["class","mat-chip mat-primary mat-standard-chip ng-tns-c12-751 mat-chip-selected ng-star-inserted",4,"ngIf"],["class","mat-chip mat-primary approve mat-standard-chip ng-tns-c12-751 mat-chip-selected ng-star-inserted",4,"ngIf"],["class","mat-chip mat-danger mat-standard-chip ng-tns-c12-751 mat-chip-selected ng-star-inserted ",4,"ngIf"],[1,"mat-chip","mat-primary","mat-standard-chip","ng-tns-c12-751","mat-chip-selected","ng-star-inserted"],[1,"mat-chip","mat-primary","approve","mat-standard-chip","ng-tns-c12-751","mat-chip-selected","ng-star-inserted"],[1,"mat-chip","mat-danger","mat-standard-chip","ng-tns-c12-751","mat-chip-selected","ng-star-inserted"],["mat-header-row",""],["mat-row",""],[1,"text-center"]],template:function(e,t){if(1&e&&(W.dc(0,"div",0),W.dc(1,"div",1),W.dc(2,"div",2),W.dc(3,"button",3),W.lc("click",(function(e){return t.openClick()})),W.cd(4),W.qc(5,"translate"),W.cc(),W.dc(6,"button",4),W.cd(7," Favourite Questions "),W.cc(),W.dc(8,"button",5),W.dc(9,"span",6),W.cd(10," filter_list "),W.cc(),W.cd(11),W.qc(12,"translate"),W.cc(),W.cc(),W.dc(13,"mat-menu",null,7),W.dc(15,"div",8),W.lc("click",(function(e){return e.stopPropagation()})),W.dc(16,"div",9),W.dc(17,"h4"),W.cd(18),W.qc(19,"translate"),W.cc(),W.dc(20,"mat-form-field",10),W.dc(21,"input",11),W.lc("ngModelChange",(function(e){return t.subjectSearch=e})),W.qc(22,"translate"),W.cc(),W.ad(23,Ot,3,0,"button",12),W.cc(),W.dc(24,"div",13),W.ad(25,Ft,2,1,"mat-checkbox",14),W.qc(26,"filter"),W.cc(),W.cc(),W.Yb(27,"div",15),W.dc(28,"div",16),W.dc(29,"h4"),W.cd(30),W.qc(31,"translate"),W.cc(),W.dc(32,"mat-form-field",10),W.dc(33,"input",11),W.lc("ngModelChange",(function(e){return t.classSearch=e})),W.qc(34,"translate"),W.cc(),W.ad(35,qt,3,0,"button",12),W.cc(),W.dc(36,"div",13),W.ad(37,Gt,2,1,"mat-checkbox",17),W.qc(38,"filter"),W.cc(),W.cc(),W.dc(39,"div",16),W.dc(40,"h4"),W.cd(41),W.qc(42,"translate"),W.cc(),W.dc(43,"mat-form-field",10),W.dc(44,"input",11),W.lc("ngModelChange",(function(e){return t.sectionSearch=e})),W.qc(45,"translate"),W.cc(),W.ad(46,It,3,0,"button",12),W.cc(),W.dc(47,"div",13),W.ad(48,St,2,1,"mat-checkbox",17),W.qc(49,"filter"),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(50,"div",1),W.dc(51,"mat-form-field",18),W.dc(52,"input",19,20),W.lc("ngModelChange",(function(e){return t.value=e})),W.qc(54,"translate"),W.cc(),W.ad(55,Mt,3,0,"button",12),W.cc(),W.dc(56,"i",21),W.cd(57," search "),W.cc(),W.cc(),W.cc(),W.dc(58,"div",22),W.dc(59,"div",23),W.dc(60,"table",24),W.lc("matSortChange",(function(e){return t.sortData(e)})),W.bc(61,25),W.ad(62,Pt,2,2,"th",26),W.ad(63,Qt,2,1,"td",27),W.ac(),W.bc(64,28),W.ad(65,Nt,4,3,"th",29),W.ad(66,At,3,3,"td",30),W.ac(),W.bc(67,31),W.ad(68,Dt,4,3,"th",32),W.ad(69,Tt,2,1,"td",33),W.ac(),W.bc(70,34),W.ad(71,jt,4,3,"th",35),W.ad(72,Lt,2,1,"td",30),W.ac(),W.bc(73,36),W.ad(74,Et,4,3,"th",37),W.ad(75,zt,2,1,"td",30),W.ac(),W.bc(76,38),W.ad(77,Yt,4,3,"th",39),W.ad(78,Xt,2,1,"td",33),W.ac(),W.bc(79,40),W.ad(80,Ht,4,3,"th",41),W.ad(81,Rt,2,1,"td",33),W.ac(),W.bc(82,42),W.ad(83,Bt,4,3,"th",43),W.ad(84,$t,2,1,"td",33),W.ac(),W.bc(85,44),W.ad(86,Vt,4,3,"th",45),W.ad(87,Ut,2,1,"td",30),W.ac(),W.bc(88,46),W.ad(89,Jt,54,25,"th",47),W.ad(90,tc,5,4,"td",30),W.ac(),W.ad(91,cc,1,0,"tr",48),W.ad(92,nc,1,0,"tr",49),W.cc(),W.ad(93,ac,4,0,"ng-container",50),W.dc(94,"mat-paginator",51),W.lc("page",(function(e){return t.onPaginateChange(e)})),W.cc(),W.cc(),W.cc()),2&e){var c=W.Oc(14);W.Gb(4),W.ed(" ",W.rc(5,33,"homework.list.button.create")," "),W.Gb(2),W.yc("routerLink","/teacher/online-exam/favourite/list"),W.Gb(2),W.yc("matMenuTriggerFor",c),W.Gb(3),W.ed(" ",W.rc(12,35,"homework.list.button.filter")," "),W.Gb(4),W.yc("ngStyle",W.Ec(60,oc)),W.Gb(3),W.dd(W.rc(19,37,"homework.list.columName.subject")),W.Gb(3),W.zc("placeholder",W.rc(22,39,"homework.list.button.search")),W.yc("ngModel",t.subjectSearch),W.Gb(2),W.yc("ngIf",t.subjectSearch),W.Gb(1),W.yc("ngStyle",W.Ec(61,rc)),W.Gb(1),W.yc("ngForOf",W.sc(26,41,t.subjects,t.subjectSearch)),W.Gb(5),W.dd(W.rc(31,44,"homework.list.columName.classes")),W.Gb(3),W.zc("placeholder",W.rc(34,46,"homework.list.button.search")),W.yc("ngModel",t.classSearch),W.Gb(2),W.yc("ngIf",t.classSearch),W.Gb(1),W.yc("ngStyle",W.Ec(62,rc)),W.Gb(1),W.yc("ngForOf",W.sc(38,48,t.classes,t.classSearch)),W.Gb(4),W.dd(W.rc(42,51,"homework.list.columName.section")),W.Gb(3),W.zc("placeholder",W.rc(45,53,"homework.list.button.search")),W.yc("ngModel",t.sectionSearch),W.Gb(2),W.yc("ngIf",t.sectionSearch),W.Gb(1),W.yc("ngStyle",W.Ec(63,rc)),W.Gb(1),W.yc("ngForOf",W.sc(49,55,t.sections,t.sectionSearch)),W.Gb(4),W.zc("placeholder",W.rc(54,58,"homework.list.button.search")),W.yc("ngModel",t.value),W.Gb(3),W.yc("ngIf",t.value),W.Gb(5),W.yc("dataSource",t.dataSource),W.Gb(31),W.yc("matHeaderRowDef",t.displayedColumns),W.Gb(1),W.yc("matRowDefColumns",t.displayedColumns),W.Gb(1),W.yc("ngIf",0===t.dataSource.filteredData.length||0===t.dataSource.data.length),W.Gb(1),W.yc("length",t.paginationDTO.totalSize)("pageSize",t.paginationDTO.limit)("pageSizeOptions",t.pageSizeOptions)}},directives:[xe.c,xe.a,b.a,h.h,G.d,G.e,f.p,_t.b,ye.b,_.b,g.c,g.t,g.w,f.o,f.n,T.n,D.a,T.c,T.i,T.b,T.k,T.m,N.a,ye.f,w.a,v.a,T.h,T.a,D.b,G.b,T.j,T.l],pipes:[we.c,z.a,he.a],styles:[".text-center[_ngcontent-%COMP%]{text-align:center!important}.filter-menu[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{display:block!important}.mat-orange[_ngcontent-%COMP%]{padding:2px 4px!important;border-radius:0!important;font-size:11px!important;background:orange!important;color:#fff!important;line-height:16px}label.mat-chip.mat-primary.approve[_ngcontent-%COMP%]{background-color:#31a929!important}"]}),ic),lc=c("k9Bo");function dc(e,t){if(1&e&&(W.dc(0,"span"),W.cd(1),W.cc()),2&e){var c=t.$implicit,n=t.last;W.Gb(1),W.fd(" ",c.sectionName,"",n?"":", ","")}}function uc(e,t){1&e&&(W.dc(0,"mat-error"),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.Gb(1),W.ed(" ",W.rc(2,1,"homework.question.error.startDate")," "))}function mc(e,t){1&e&&(W.dc(0,"mat-error"),W.cd(1," Please provide the time "),W.cc())}function pc(e,t){1&e&&(W.dc(0,"mat-error"),W.cd(1," Please provide the time "),W.cc())}function hc(e,t){1&e&&(W.dc(0,"mat-error"),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.Gb(1),W.ed(" ",W.rc(2,1,"homework.question.error.lastSubmission")," "))}function fc(e,t){1&e&&(W.dc(0,"mat-error"),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.Gb(1),W.ed(" ",W.rc(2,1,"homework.question.error.lastSubmissionTime")," "))}function gc(e,t){1&e&&(W.dc(0,"mat-error"),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.Gb(1),W.ed(" ",W.rc(2,1,"homework.question.error.title")," "))}function bc(e,t){if(1&e){var c=W.ec();W.dc(0,"span",73),W.lc("click",(function(e){W.Sc(c);var t=W.pc().index;return W.pc().removeRow(t)})),W.dc(1,"i",74),W.cd(2,"delete"),W.cc(),W.cc()}}function xc(e,t){if(1&e&&(W.dc(0,"mat-option",75),W.cd(1),W.cc()),2&e){var c=t.$implicit;W.yc("value",c),W.Gb(1),W.ed(" ",c.group_name," ")}}function vc(e,t){if(1&e){var c=W.ec();W.dc(0,"button",76),W.lc("click",(function(e){W.Sc(c);var t=W.pc().index;return W.pc().addOption(t)})),W.dc(1,"mat-icon",77),W.cd(2,"add"),W.cc(),W.cc()}}function yc(e,t){1&e&&(W.dc(0,"mat-error"),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.Gb(1),W.ed(" ",W.rc(2,1,"homework.question.error.groupName")," "))}function kc(e,t){1&e&&(W.dc(0,"mat-error"),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.Gb(1),W.ed(" ",W.rc(2,1,"homework.question.error.Noof")," "))}function wc(e,t){1&e&&(W.dc(0,"mat-error"),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.Gb(1),W.ed(" ",W.rc(2,1,"homework.question.error.number")," "))}function _c(e,t){1&e&&(W.dc(0,"mat-error"),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.Gb(1),W.ed(" ",W.rc(2,1,"homework.question.error.Marks")," "))}function Cc(e,t){1&e&&(W.dc(0,"mat-error"),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.Gb(1),W.ed(" ",W.rc(2,1,"homework.question.error.number")," "))}function Oc(e,t){if(1&e){var c=W.ec();W.dc(0,"tr",57),W.dc(1,"td",58),W.ad(2,bc,3,0,"span",59),W.cc(),W.dc(3,"td",58),W.dc(4,"mat-form-field",31),W.Yb(5,"input",60),W.dc(6,"mat-autocomplete",61,62),W.ad(8,xc,2,2,"mat-option",63),W.qc(9,"async"),W.cc(),W.ad(10,vc,3,0,"button",64),W.ad(11,yc,3,3,"mat-error",28),W.cc(),W.cc(),W.dc(12,"td",58),W.dc(13,"mat-form-field",65),W.dc(14,"input",66),W.lc("keyup",(function(e){W.Sc(c);var n=t.index;return W.pc().valueChange(n)})),W.cc(),W.ad(15,kc,3,3,"mat-error",28),W.ad(16,wc,3,3,"mat-error",28),W.cc(),W.cc(),W.dc(17,"td",58),W.dc(18,"mat-form-field",65),W.dc(19,"input",67),W.lc("keyup",(function(e){W.Sc(c);var n=t.index;return W.pc().valueChange(n)})),W.cc(),W.ad(20,_c,3,3,"mat-error",28),W.ad(21,Cc,3,3,"mat-error",28),W.cc(),W.cc(),W.dc(22,"td",68),W.dc(23,"mat-form-field",65),W.Yb(24,"input",69),W.cc(),W.cc(),W.dc(25,"td",70),W.Yb(26,"mat-checkbox",71),W.Yb(27,"input",72),W.cc(),W.cc()}if(2&e){var n=t.$implicit,a=t.index,i=W.Oc(7),o=W.pc();W.yc("formGroupName",a),W.Gb(2),W.yc("ngIf",o.questionForm.controls.groupQuestion.controls.length>1),W.Gb(3),W.yc("matAutocomplete",i),W.Gb(1),W.yc("displayWith",o.displayFn),W.Gb(2),W.yc("ngForOf",W.rc(9,11,o.filteredOptions[a])),W.Gb(2),W.yc("ngIf",o.showAddButtonArray[a]&&o.checkValue(n.controls.group_name.value)),W.Gb(1),W.yc("ngIf",(null==n.controls.group_name.errors?null:n.controls.group_name.errors.required)&&n.controls.group_name.touched),W.Gb(4),W.yc("ngIf",(null==n.controls.no_of_questions.errors?null:n.controls.no_of_questions.errors.required)&&n.controls.no_of_questions.touched),W.Gb(1),W.yc("ngIf",(null==n.controls.no_of_questions.errors?null:n.controls.no_of_questions.errors.pattern)&&n.controls.no_of_questions.touched),W.Gb(4),W.yc("ngIf",(null==n.controls.marks.errors?null:n.controls.marks.errors.required)&&n.controls.marks.touched),W.Gb(1),W.yc("ngIf",(null==n.controls.marks.errors?null:n.controls.marks.errors.pattern)&&n.controls.marks.touched)}}var Fc,qc=((Fc=function(){return _createClass((function e(t,c,n,a,i,o,r,s,l,d,u,m,p){_classCallCheck(this,e),this.modelService=t,this.academicService=c,this.batchService=n,this.classService=a,this.sectionService=i,this.router=o,this.loader=r,this.toaster=s,this.subjectSer=l,this.formBuilder=d,this.severdatePipe=u,this.activateRoute=m,this.config=p,this.console=console,this.sesctionIds=[],this.deletedIds=[],this.sum=0,this.options=[],this.filteredOptions=[],this.showAddButtonArray=[!1],this.timeFormat=Number(this.config.timeFormat),this.questionId=this.activateRoute.snapshot.params.id,this.getGroupDetails()}),[{key:"getGroupDetails",value:function(){var e=this;this.loader.open(),this.modelService.getOnlineExamGroupList().subscribe((function(t){"success"==t.keyword?(e.options=t.data.filter((function(e){return 1==e.status})),e.form(),e.filterEachGroup(0),e.loader.close()):(e.options=[],e.form(),e.filterEachGroup(0),e.loader.close(),e.toaster.present(t.message))}))}},{key:"ngOnInit",value:function(){this.form(),this.getOne(),this.isTimeValidate()}},{key:"form",value:function(){this.questionForm=this.formBuilder.group({title:new g.g("",[g.B.required]),lastSubmission:new g.g("",[g.B.required]),startDate:new g.g("",[g.B.required]),startTime:new g.g("",[g.B.required]),endTime:new g.g("",[g.B.required]),lastSubmissionTime:new g.g("",[g.B.required]),groupQuestion:new g.d([this.getGroup([])])}),this.filterEachGroup(0)}},{key:"getGroup",value:function(e){return this.formBuilder.group({group_name:[e.groupName,[g.B.required,(t=this.options,function(e){return t.findIndex((function(t){return ge.isEqual(t,e.value)}))<0?{forbiddenNames:{value:e.value}}:null})]],no_of_questions:[e.noOfQus,[g.B.required,g.B.pattern("[+-]?[0-9]+(.[0-9]+)?([Ee][+-]?[0-9]+)?")]],marks:[e.marks,[g.B.required,g.B.pattern("[+-]?[0-9]+(.[0-9]+)?([Ee][+-]?[0-9]+)?")]],answer_option:["1"==e.answerOption],onlineexam_question_group_id:[e.questionGroupId],each_mark:[e.eachMark]});var t}},{key:"control",get:function(){return this.questionForm.controls}},{key:"isTimeValidate",value:function(){var e;""!=(null===(e=this.control)||void 0===e?void 0:e.startDate.value)&&(this.questionForm.get("startTime").setValidators(g.B.required),this.questionForm.get("endTime").setValidators(g.B.required),this.questionForm.get("startTime").updateValueAndValidity(),this.questionForm.get("endTime").updateValueAndValidity())}},{key:"valueChange",value:function(e){var t,c=this.getgroupContol();this.noOf=""!=c.controls[e].get("no_of_questions").value?c.controls[e].get("no_of_questions").value:"0",this.mark=""!=c.controls[e].get("marks").value?c.controls[e].get("marks").value:"0",console.log(this.noOf,this.mark),this.sum="0"!=this.noOf&&"0"!=this.mark&&null!=(t=Number(this.mark/this.noOf))?t:0,console.log(this.sum,"sum"),c.controls[e].patchValue({each_mark:this.sum})}},{key:"getgroupContol",value:function(){return this.questionForm.controls.groupQuestion}},{key:"getOne",value:function(){var e=this;this.loader.dialogRef&&this.loader.close(),this.loader.open(),this.modelService.getquestion(this.questionId).subscribe((function(t){"success"==t.keyword?(e.questionGroup=t.onlineexams[0],console.log(e.questionGroup,"12345678"),localStorage.setItem("quesTranLang",e.questionGroup.language),e.setValues(e.questionGroup),e.populateParticulars(e.questionGroup.group),e.loader.close()):(e.loader.close(),e.toaster.present(t.message,""))}))}},{key:"setValues",value:function(e){var t=this;e.sections.forEach((function(e){t.sesctionIds.push(e.sectionId)})),this.questionForm.patchValue({title:e.title,startDate:e.startDate,startTime:e.startTime,endTime:e.endTime,lastSubmissionTime:e.submissionTime,lastSubmission:e.submissionDate})}},{key:"populateParticulars",value:function(e){var t=this,c=this.questionForm.get("groupQuestion");c.clear(),e.forEach((function(e){var n=t.options.find((function(t){return t.group_name===e.groupName}));e.groupName=null!=n?n:"",c.push(t.getGroup(e)),t.filterEachGroup(c.length-1)}))}},{key:"addRow",value:function(){var e=this.questionForm.controls.groupQuestion;e.push(this.getGroup([])),this.filterEachGroup(e.length-1)}},{key:"filterEachGroup",value:function(e){var t=this,c=this.questionForm.get("groupQuestion");this.filteredOptions[e]=c.at(e).get("group_name").valueChanges.pipe(Object(be.a)(""),Object($.a)((function(e){return"string"==typeof e?e:e.group_name})),Object($.a)((function(c){return c?t._filter(c,e):t.options.slice()})))}},{key:"_filter",value:function(e,t){var c=e.toLowerCase(),n=this.options.filter((function(e){return 0===e.group_name.toLowerCase().indexOf(c)}));return this.showAddButtonArray[t]=0===n.length,this.options.filter((function(e){return 0===e.group_name.toLowerCase().indexOf(c)}))}},{key:"removeRow",value:function(e){var t=this.questionForm.controls.groupQuestion;this.deletedIds.push(t.value[e].question_group_id),t.removeAt(e),this.filteredOptions.splice(e,1),this.showAddButtonArray.splice(e,1)}},{key:"displayFn",value:function(e){return e?e.group_name:void 0}},{key:"addOption",value:function(e){var t=this.questionForm.get("groupQuestion"),c=t.at(e).get("group_name").value;this.options.some((function(e){return e.group_name===c}))||this.addNewOptionToGroup(t,e,c)}},{key:"addNewOptionToGroup",value:function(e,t,c){var n=this;this.loader.open();var a=new FormData;a.append("group_name",c),this.modelService.addOnlineExamGroup(a).subscribe((function(c){var a,i,o;if("success"==c.keyword){var r={onlineexam_group_id:(a=c.data[0].onlineexam_group_id,null!=a?a:""),group_name:(i=c.data[0].group_name,null!=i?i:""),status:(o=c.data[0].status,null!=o?o:"")},s=n.options.push(r)-1;e.at(t).get("group_name").setValue(n.options[s]),n.loader.close()}else n.toaster.present(c.message),n.loader.close()}))}},{key:"checkValue",value:function(e){return!!e}},{key:"changeObj",value:function(e){var t=Object(ge.cloneDeep)(e);return t.filter((function(e){e.group_name=e.group_name?e.group_name.group_name:""})),t}},{key:"findInvalidControls",value:function(){var e=[],t=this.questionForm.controls;for(var c in t)t[c].invalid&&e.push(c);return console.log(e,"invalid"),e}},{key:"update",value:function(){var e,t,c,n,a,i,o,r=this;this.findInvalidControls();var s=this.questionForm.value,l=this.severdatePipe.transform(s.lastSubmission),d=this.severdatePipe.transform(s.startDate);if(this.questionForm.valid){this.loader.open();var u=this.changeObj(s.groupQuestion),m=new FormData;m.append("id",this.questionId),m.append("academic_year_id",null===(e=this.questionGroup)||void 0===e?void 0:e.academicYearId),m.append("batch_id",null===(t=this.questionGroup)||void 0===t?void 0:t.batchId),m.append("class_id",null===(c=this.questionGroup)||void 0===c?void 0:c.classId),m.append("subject_id",null===(n=this.questionGroup)||void 0===n?void 0:n.subjectId),m.append("description",null!=(a=s.description)?a:""),m.append("title",s.title),m.append("language_type",null!=(o=null===(i=this.questionGroup)||void 0===i?void 0:i.language)?o:""),m.append("start_date",d),m.append("start_time",s.startTime),m.append("end_time",s.endTime),m.append("last_submission_time",s.lastSubmissionTime),m.append("last_submission_date",l),m.append("section_id",JSON.stringify(this.sesctionIds)),m.append("groups",JSON.stringify(u)),m.append("delete_id",JSON.stringify(this.deletedIds)),this.modelService.Question(m,"update").subscribe((function(e){"success"==e.keyword?(r.submitButton.disabled=!1,localStorage.setItem("parentPageId","2"),r.loader.close(),r.router.navigate(["/teacher/online-exam/onlineexam/".concat(e.onlineexams[0].onlineexamId)]),r.toaster.present(e.message,"")):(r.loader.close(),r.submitButton.disabled=!1,r.toaster.present(e.message))}))}}}])}()).\u0275fac=function(e){return new(e||Fc)(W.Xb(le),W.Xb(ht.a),W.Xb(ft.a),W.Xb(lc.a),W.Xb(st.a),W.Xb(h.g),W.Xb(de.a),W.Xb(ue.a),W.Xb(fe.a),W.Xb(g.f),W.Xb(he.d),W.Xb(h.a),W.Xb(me.a))},Fc.\u0275cmp=W.Rb({type:Fc,selectors:[["app-edit"]],viewQuery:function(e,t){var c;1&e&&W.md(b.a,!0),2&e&&W.Nc(c=W.mc())&&(t.submitButton=c.first)},inputs:{checked:"checked"},features:[W.Fb([{provide:y.c,useClass:pe.b},{provide:y.f,useValue:pe.a},he.d])],decls:154,vars:63,consts:[[1,"create_btn","pb-0"],["fxLayout","row wrap",1,"mb-12"],["fxFlex","100","fxFlex.gt-xs","35"],["mat-raised-button","","color","primary",1,"btn-primary-bg",3,"click"],["href","#",1,"pl-12","primary-txt-color",3,"routerLink"],["fxFlex","100","fxFlex.gt-xs","65",1,"mt-8"],["fxLayout","row wrap",1,""],["fxFlex","100","fxFlex.gt-xs","100",1,""],["fxFlex","100","fxFlex.gt-xs","25",1,"mr-4"],[1,"ml-8"],["fxFlex","100","fxFlex.gt-xs","25"],[4,"ngFor","ngForOf"],[1,"form_bg","create_student"],[1,"p-0","pagewrap"],[3,"formGroup"],[1,""],[1,"card-title-text"],[1,"float-right"],["fxLayout","row wrap",1,"mt-16","grey-100","px-8","border"],["fxFlex","100","fxFlex.gt-xs","6",1,"pt-12"],[1,"red_color"],["fxFlex","100","fxFlex.gt-xs","10",1,""],["appearance","fill",1,"full-width"],["tabindex","4","matInput","","formControlName","startDate",3,"matDatepicker","focus","dateChange","click"],["input",""],["matSuffix","",3,"for"],[3,"closed"],["picker1",""],[4,"ngIf"],["fxFlex","100","fxFlex.gt-xs","8",1,"pt-12","pl-12"],["fxFlex","100","fxFlex.gt-xs","10",1,"pt-12"],["appearance","fill"],["type","text","formControlName","startTime","name","startTime","matInput","","value","",3,"ngxTimepicker","format"],[1,"homework_time"],["timePickerFrom",""],["fxFlex","100","fxFlex.gt-xs","8",1,"pl-24","pt-12"],["type","text","formControlName","endTime","name","endTime","matInput","",3,"min","ngxTimepicker","format"],["timePickerrr",""],["fxFlex","100","fxFlex.gt-xs","10"],["fxFlex","100","fxFlex.gt-xs","13",1,"pt-12","pl-12"],["tabindex","4","matInput","","formControlName","lastSubmission",3,"min","matDatepicker","focus","click"],["picker2",""],["fxFlex","100","fxFlex.gt-xs","5",1,"pt-12","pl-12"],["type","text","formControlName","lastSubmissionTime","name","lastSubmissionTime","matInput","",3,"ngxTimepicker","format"],["timePickerTIme",""],["fxLayout","row wrap",1,"mt-24"],["matInput","","name","title","formControlName","title","value","Sample Homework Title",1,"f18",3,"placeholder"],[1,"table_container"],["formArrayName","groupQuestion",1,"mat-table"],[1,"mat-header-row"],[1,"mat-header-cell",2,"width","5%"],[1,"mat-header-cell"],[1,"mat-header-cell",2,"width","10%"],[1,"mat-header-cell",2,"width","12%"],["class","mat-row",3,"formGroupName",4,"ngFor","ngForOf"],["mat-raised-button","","type","button",1,"icon-white-bg","mt-8",3,"disabled","click"],["_ngcontent-qyx-c19","",1,"material-icons","icon-image-preview"],[1,"mat-row",3,"formGroupName"],[1,"mat-cell"],["class","icon-red-bg mt-8",3,"click",4,"ngIf"],["matInput","","name","group_name","formControlName","group_name","placeholder","","value","",3,"matAutocomplete"],[3,"displayWith"],["auto","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],["matSuffix","","mat-button","","mat-icon-button","",3,"click",4,"ngIf"],["appearance","fill",2,"width","120px"],["matInput","","name","no_of_question","formControlName","no_of_questions","placeholder","","value","",3,"keyup"],["matInput","","name","marks","formControlName","marks","placeholder","","value","",3,"keyup"],[1,"mat-cell","pt-16"],["matInput","","name","eachmark","formControlName","each_mark","placeholder","","value",""],[1,"mat-cell","pt-4","text-center","pr-32"],["formControlName","answer_option"],["formControlName","onlineexam_question_group_id","readonly","",2,"display","none"],[1,"icon-red-bg","mt-8",3,"click"],["_ngcontent-qyx-c19","",1,"material-icons","icon-image-preview",2,"cursor","pointer"],[3,"value"],["matSuffix","","mat-button","","mat-icon-button","",3,"click"],["matTooltip","Add Group"]],template:function(e,t){if(1&e){var c=W.ec();W.dc(0,"div",0),W.dc(1,"div",1),W.dc(2,"div",2),W.dc(3,"button",3),W.lc("click",(function(e){return t.update()})),W.cd(4),W.qc(5,"translate"),W.cc(),W.dc(6,"a",4),W.cd(7),W.qc(8,"translate"),W.cc(),W.cc(),W.dc(9,"div",5),W.dc(10,"div",6),W.dc(11,"div",7),W.dc(12,"div",8),W.dc(13,"label"),W.dc(14,"strong"),W.cd(15,"Academic Year"),W.cc(),W.cc(),W.dc(16,"label",9),W.cd(17),W.cc(),W.cc(),W.dc(18,"div",8),W.dc(19,"label"),W.dc(20,"strong"),W.cd(21,"Batch"),W.cc(),W.cc(),W.dc(22,"label",9),W.cd(23),W.cc(),W.cc(),W.dc(24,"div",8),W.dc(25,"label"),W.dc(26,"strong"),W.cd(27,"Class"),W.cc(),W.cc(),W.dc(28,"label",9),W.cd(29),W.cc(),W.cc(),W.dc(30,"div",10),W.dc(31,"label"),W.dc(32,"strong"),W.cd(33,"Section"),W.cc(),W.cc(),W.dc(34,"label",9),W.ad(35,dc,2,2,"span",11),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(36,"div",12),W.dc(37,"mat-card",13),W.dc(38,"form",14),W.dc(39,"mat-card-title",15),W.dc(40,"div",16),W.cd(41,"Update Online Exam "),W.dc(42,"span",17),W.cd(43),W.cc(),W.cc(),W.Yb(44,"mat-divider"),W.cc(),W.dc(45,"mat-card-content"),W.dc(46,"div",18),W.dc(47,"div",19),W.dc(48,"label"),W.dc(49,"strong"),W.cd(50),W.qc(51,"translate"),W.cc(),W.dc(52,"span",20),W.cd(53,"*"),W.cc(),W.cc(),W.cc(),W.dc(54,"div",21),W.dc(55,"mat-form-field",22),W.dc(56,"input",23,24),W.lc("focus",(function(e){return W.Sc(c),W.Oc(60).open()}))("dateChange",(function(e){return t.isTimeValidate()}))("click",(function(e){return W.Sc(c),W.Oc(60).open()})),W.cc(),W.Yb(58,"mat-datepicker-toggle",25),W.dc(59,"mat-datepicker",26,27),W.lc("closed",(function(e){return W.Sc(c),W.Oc(57).blur()})),W.cc(),W.ad(61,uc,3,3,"mat-error",28),W.cc(),W.cc(),W.dc(62,"div",29),W.dc(63,"label"),W.dc(64,"strong"),W.cd(65),W.qc(66,"translate"),W.cc(),W.dc(67,"span",20),W.cd(68,"*"),W.cc(),W.cc(),W.cc(),W.dc(69,"div",30),W.dc(70,"mat-form-field",31),W.Yb(71,"input",32),W.Yb(72,"ngx-material-timepicker",33,34),W.ad(74,mc,2,0,"mat-error",28),W.cc(),W.cc(),W.dc(75,"div",35),W.dc(76,"label"),W.dc(77,"strong"),W.cd(78),W.qc(79,"translate"),W.cc(),W.dc(80,"span",20),W.cd(81,"*"),W.cc(),W.cc(),W.cc(),W.dc(82,"div",30),W.dc(83,"mat-form-field",31),W.Yb(84,"input",36),W.Yb(85,"ngx-material-timepicker",null,37),W.ad(87,pc,2,0,"mat-error",28),W.cc(),W.cc(),W.Yb(88,"div",38),W.dc(89,"div",39),W.dc(90,"label"),W.dc(91,"strong"),W.cd(92),W.qc(93,"translate"),W.cc(),W.dc(94,"span",20),W.cd(95,"*"),W.cc(),W.cc(),W.cc(),W.dc(96,"div",21),W.dc(97,"mat-form-field",22),W.dc(98,"input",40,24),W.lc("focus",(function(e){return W.Sc(c),W.Oc(102).open()}))("click",(function(e){return W.Sc(c),W.Oc(102).open()})),W.cc(),W.Yb(100,"mat-datepicker-toggle",25),W.dc(101,"mat-datepicker",26,41),W.lc("closed",(function(e){return W.Sc(c),W.Oc(57).blur()})),W.cc(),W.ad(103,hc,3,3,"mat-error",28),W.cc(),W.cc(),W.dc(104,"div",42),W.dc(105,"label"),W.dc(106,"strong"),W.cd(107,"Time"),W.cc(),W.dc(108,"span",20),W.cd(109,"*"),W.cc(),W.cc(),W.cc(),W.dc(110,"div",30),W.dc(111,"mat-form-field",31),W.Yb(112,"input",43),W.Yb(113,"ngx-material-timepicker",33,44),W.ad(115,fc,3,3,"mat-error",28),W.cc(),W.cc(),W.cc(),W.dc(116,"div",45),W.dc(117,"div",7),W.dc(118,"div",15),W.dc(119,"mat-form-field",22),W.Yb(120,"input",46),W.qc(121,"translate"),W.ad(122,gc,3,3,"mat-error",28),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(123,"div",47),W.dc(124,"table",48),W.dc(125,"tr",49),W.Yb(126,"th",50),W.dc(127,"th",51),W.cd(128),W.qc(129,"translate"),W.dc(130,"span",20),W.cd(131,"*"),W.cc(),W.cc(),W.dc(132,"th",52),W.cd(133),W.qc(134,"translate"),W.dc(135,"span",20),W.cd(136,"*"),W.cc(),W.cc(),W.dc(137,"th",52),W.cd(138),W.qc(139,"translate"),W.dc(140,"span",20),W.cd(141,"*"),W.cc(),W.cc(),W.dc(142,"th",53),W.cd(143),W.qc(144,"translate"),W.dc(145,"span",20),W.cd(146,"*"),W.cc(),W.cc(),W.dc(147,"th",53),W.cd(148),W.qc(149,"translate"),W.cc(),W.cc(),W.ad(150,Oc,28,13,"tr",54),W.cc(),W.cc(),W.dc(151,"button",55),W.lc("click",(function(e){return t.addRow()})),W.dc(152,"i",56),W.cd(153,"add"),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.cc()}if(2&e){var n=W.Oc(60),a=W.Oc(73),i=W.Oc(86),o=W.Oc(102),r=W.Oc(114);W.Gb(4),W.ed(" ",W.rc(5,39,"homework.question.button.updatecontinue")," "),W.Gb(2),W.yc("routerLink","/teacher/online-exam/list"),W.Gb(1),W.dd(W.rc(8,41,"homework.question.button.discard")),W.Gb(10),W.dd(null==t.questionGroup?null:t.questionGroup.academicYearName),W.Gb(6),W.ed("",null==t.questionGroup?null:t.questionGroup.batchName," "),W.Gb(6),W.ed("",null==t.questionGroup?null:t.questionGroup.className," "),W.Gb(6),W.yc("ngForOf",null==t.questionGroup?null:t.questionGroup.sections),W.Gb(3),W.yc("formGroup",t.questionForm),W.Gb(5),W.dd(null==t.questionGroup?null:t.questionGroup.subjectName),W.Gb(7),W.dd(W.rc(51,43,"homework.question.lable.startDate")),W.Gb(6),W.yc("matDatepicker",n),W.Gb(2),W.yc("for",n),W.Gb(3),W.yc("ngIf",null==t.questionForm.controls.startDate.errors?null:t.questionForm.controls.startDate.errors.required),W.Gb(4),W.dd(W.rc(66,45,"homework.question.lable.startTime")),W.Gb(6),W.yc("ngxTimepicker",a)("format",t.timeFormat),W.Gb(3),W.yc("ngIf",null==t.control?null:null==t.control.startTime?null:null==t.control.startTime.errors?null:t.control.startTime.errors.required),W.Gb(4),W.dd(W.rc(79,47,"homework.question.lable.endTime")),W.Gb(6),W.yc("min",t.questionForm.controls.startTime.value?t.questionForm.controls.startTime.value:12)("ngxTimepicker",i)("format",t.timeFormat),W.Gb(3),W.yc("ngIf",null==t.control?null:null==t.control.endTime?null:null==t.control.endTime.errors?null:t.control.endTime.errors.required),W.Gb(5),W.dd(W.rc(93,49,"homework.assignment.label.LastSubmissionDate")),W.Gb(6),W.yc("min",t.questionForm.controls.startDate.value)("matDatepicker",o),W.Gb(2),W.yc("for",o),W.Gb(3),W.yc("ngIf",null==t.questionForm.controls.lastSubmission.errors?null:t.questionForm.controls.lastSubmission.errors.required),W.Gb(9),W.yc("ngxTimepicker",r)("format",t.timeFormat),W.Gb(3),W.yc("ngIf",null==t.questionForm.controls.lastSubmissionTime.errors?null:t.questionForm.controls.lastSubmissionTime.errors.required),W.Gb(5),W.zc("placeholder",W.rc(121,51,"homework.question.lable.Title")),W.Gb(2),W.yc("ngIf",null==t.questionForm.controls.title.errors?null:t.questionForm.controls.title.errors.required),W.Gb(6),W.ed("",W.rc(129,53,"homework.question.lable.Group")," "),W.Gb(5),W.ed("",W.rc(134,55,"homework.question.lable.Noof")," "),W.Gb(5),W.ed("",W.rc(139,57,"homework.question.lable.Marks")," "),W.Gb(5),W.ed("",W.rc(144,59,"homework.question.lable.eachQmark")," "),W.Gb(5),W.ed("",W.rc(149,61,"homework.question.lable.Isanswer")," "),W.Gb(2),W.yc("ngForOf",t.questionForm.get("groupQuestion").controls),W.Gb(1),W.yc("disabled",t.questionForm.get("groupQuestion").invalid)}},directives:[xe.c,xe.a,b.a,h.j,f.n,x.a,g.D,g.u,g.k,x.f,ve.a,x.c,ye.b,_.b,g.c,k.b,g.t,g.i,k.d,ye.f,k.a,f.o,Y.d,Y.a,g.e,ye.a,g.l,ke.c,ke.a,v.a,y.p,w.a,A.a],pipes:[we.c,f.b],styles:[".searc-icon[_ngcontent-%COMP%]{position:absolute;top:112px;right:27px;font-size:18px}.mr-10[_ngcontent-%COMP%]{margin-right:10px}.mt-10[_ngcontent-%COMP%]{margin-top:10px}.ml-10[_ngcontent-%COMP%]{margin-left:10px}table[_ngcontent-%COMP%]{width:100%}td.mat-cell[_ngcontent-%COMP%]{padding-top:12px}.minheight[_ngcontent-%COMP%]{margin-bottom:-20px}.mt-minus-15[_ngcontent-%COMP%]{margin-top:-15px}.dateshow[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{display:block!important}.label[_ngcontent-%COMP%]{margin-top:10px}.mat-tab[_ngcontent-%COMP%]{font-size:14px;text-transform:uppercase}.f24[_ngcontent-%COMP%]{font-size:24px}.assign-btn[_ngcontent-%COMP%]{background:#019fa2!important;color:#fff!important;border-radius:0!important;border:1px solid #019fa2!important;line-height:17px!important;padding:0 10px!important}.danger-txt-color[_ngcontent-%COMP%]{color:red}.text-right[_ngcontent-%COMP%]{text-align:right}.remove_btn[_ngcontent-%COMP%]{background:red;color:#fff;padding:0 2px;min-width:26px;line-height:11px}.remove_btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{padding-top:3px;font-size:22px}.mat-bg-warn[_ngcontent-%COMP%]{min-width:5px;line-height:23px;padding:0 1px}table.mat-table.cdk-table.relationship[_ngcontent-%COMP%] .full-width[_ngcontent-%COMP%]{width:98%!important}.preview_image[_ngcontent-%COMP%]{background-repeat:no-repeat!important;margin:8px 0 0 120px!important;max-width:100px!important;height:100px}image-cropper[_ngcontent-%COMP%]{width:300px!important;height:130px!important}.mt-20[_ngcontent-%COMP%]{margin-top:20px!important}mat-header-row.mat-header-row.cdk-header-row.ng-tns-c375-2.ng-star-inserted[_ngcontent-%COMP%]{display:none}mat-form-field.mat-form-field[_ngcontent-%COMP%]{width:100%}.image[_ngcontent-%COMP%]{margin-top:-35px}table[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:95%}@media only screen and (max-width:375px){.form_bg.create_student[_ngcontent-%COMP%]{width:375px!important}}@media (max-width:414px){.lastname[_ngcontent-%COMP%]{padding-left:0!important}}.preview-btn[_ngcontent-%COMP%]{border:1px solid #01a39d!important;color:#01a39d!important;background:#fff!important;line-height:25px!important;border-radius:0}.f14[_ngcontent-%COMP%]{font-size:14px}.f16[_ngcontent-%COMP%]{font-size:16px}.f18[_ngcontent-%COMP%]{font-size:18px}.group_based[_ngcontent-%COMP%]{border:1px solid hsla(0,0%,50.2%,.30980392156862746)}.attachment[_ngcontent-%COMP%]{font-size:18px;margin-left:-9px;padding-top:5px}img[_ngcontent-%COMP%]{margin-right:4px}.card-title-text[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{background:#734f96;color:#fff;font-size:14px;padding:2px 13px}.card-title-text[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:20px;color:#019fa2;margin-left:12px}"]}),Fc);function Gc(e,t){1&e&&(W.dc(0,"i",37),W.cd(1," favorite "),W.cc())}function Ic(e,t){1&e&&(W.dc(0,"i",37),W.cd(1," favorite_border "),W.cc())}function Sc(e,t){1&e&&(W.dc(0,"i",37),W.cd(1," favorite "),W.cc())}function Mc(e,t){1&e&&(W.dc(0,"i",37),W.cd(1," favorite_border "),W.cc())}function Pc(e,t){if(1&e&&(W.dc(0,"div",38),W.dc(1,"div",51),W.dc(2,"label"),W.dc(3,"strong"),W.cd(4," Answer Key"),W.cc(),W.cc(),W.cc(),W.dc(5,"div",52),W.dc(6,"div"),W.dc(7,"label",41),W.Yb(8,"span",53),W.qc(9,"safeHtml"),W.cc(),W.Yb(10,"br"),W.cc(),W.cc(),W.cc()),2&e){var c=W.pc().$implicit;W.Gb(8),W.yc("innerHtml",W.rc(9,1,null==c?null:c.answer),W.Tc)}}function Qc(e,t){if(1&e){var c=W.ec();W.dc(0,"div",58),W.Yb(1,"img",59),W.dc(2,"div",16),W.dc(3,"button",60),W.lc("click",(function(e){W.Sc(c);var n=t.$implicit;return W.pc(4).download(null==n?null:n.attachmentId,null==n?null:n.attachment)})),W.dc(4,"i",37),W.cd(5," cloud_download "),W.cc(),W.cc(),W.cc(),W.cc()}if(2&e){var n=t.$implicit;W.Gb(1),W.zc("src",null==n?null:n.attachment,W.Vc)}}function Nc(e,t){if(1&e&&(W.dc(0,"div",54),W.dc(1,"div",55),W.dc(2,"label"),W.Yb(3,"strong"),W.cc(),W.cc(),W.dc(4,"div",56),W.ad(5,Qc,6,1,"div",57),W.cc(),W.cc()),2&e){var c=W.pc().$implicit;W.Gb(5),W.yc("ngForOf",c.quesAttachment)}}function Ac(e,t){if(1&e&&(W.dc(0,"div"),W.dc(1,"label",41),W.dc(2,"span"),W.cd(3),W.cc(),W.Yb(4,"span",53),W.qc(5,"safeHtml"),W.cc(),W.Yb(6,"br"),W.cc()),2&e){var c=t.$implicit,n=t.index;W.Gb(3),W.ed("",n+1,"."),W.Gb(1),W.yc("innerHtml",W.rc(5,2,c.optionName),W.Tc)}}function Dc(e,t){if(1&e&&(W.dc(0,"div",38),W.dc(1,"div",51),W.dc(2,"label"),W.dc(3,"strong"),W.cd(4),W.qc(5,"translate"),W.cc(),W.cc(),W.cc(),W.dc(6,"div",61),W.ad(7,Ac,7,4,"div",26),W.cc(),W.cc()),2&e){var c=W.pc().$implicit;W.Gb(4),W.ed(" ",W.rc(5,2,"homework.question.lable.Option"),""),W.Gb(3),W.yc("ngForOf",c.quesOptions)}}function Tc(e,t){if(1&e){var c=W.ec();W.dc(0,"mat-card"),W.dc(1,"div",38),W.dc(2,"div",39),W.dc(3,"label"),W.dc(4,"strong"),W.cd(5),W.qc(6,"translate"),W.cc(),W.cc(),W.cc(),W.dc(7,"div",40),W.dc(8,"label",41),W.dc(9,"span"),W.cd(10),W.cc(),W.Yb(11,"span",42),W.qc(12,"safeHtml"),W.cc(),W.cc(),W.dc(13,"div",43),W.dc(14,"label"),W.dc(15,"strong"),W.cd(16),W.qc(17,"translate"),W.cc(),W.cc(),W.cc(),W.dc(18,"div",44),W.dc(19,"label"),W.dc(20,"strong"),W.cd(21),W.cc(),W.cc(),W.cc(),W.dc(22,"div",45),W.dc(23,"button",46),W.lc("click",(function(e){W.Sc(c);var n=t.$implicit;return W.pc(2).copy(null==n?null:n.questionName,n.quesOptions,null==n?null:n.answer)})),W.dc(24,"i",37),W.cd(25," content_copy "),W.cc(),W.cd(26,"Copy"),W.cc(),W.cc(),W.dc(27,"div",45),W.dc(28,"button",47),W.lc("click",(function(e){return W.Sc(c),W.Oc(33).click()})),W.ad(29,Sc,2,0,"i",34),W.ad(30,Mc,2,0,"i",34),W.cd(31," Favourite"),W.cc(),W.dc(32,"input",35,48),W.lc("change",(function(e){W.Sc(c);var n=t.$implicit,a=t.index,i=W.pc().index;return W.pc().addToFav(e,null==n?null:n.questionId,a,i)})),W.cc(),W.cc(),W.cc(),W.ad(34,Pc,11,3,"div",49),W.ad(35,Nc,6,1,"div",50),W.ad(36,Dc,8,4,"div",49),W.cc()}if(2&e){var n=t.$implicit,a=t.index,i=W.pc().$implicit;W.Gb(5),W.dd(W.rc(6,11,"homework.question.lable.Questionname")),W.Gb(5),W.ed("",a+1,"."),W.Gb(1),W.yc("innerHtml",W.rc(12,13,null==n?null:n.questionName),W.Tc),W.Gb(5),W.ed(" ",W.rc(17,15,"homework.question.lable.Marks"),""),W.Gb(5),W.dd(null==i?null:i.eachMark),W.Gb(8),W.yc("ngIf",1==(null==n?null:n.isFavorite)),W.Gb(1),W.yc("ngIf",0==(null==n?null:n.isFavorite)),W.Gb(2),W.yc("checked",1==(null==n?null:n.isFavorite)),W.Gb(2),W.yc("ngIf","non-objective"==(null==n?null:n.type)),W.Gb(1),W.yc("ngIf",0!=n.quesAttachment.length),W.Gb(1),W.yc("ngIf",0!=n.quesOptions.length)}}function jc(e,t){if(1&e){var c=W.ec();W.dc(0,"div"),W.dc(1,"div",27),W.dc(2,"div",28),W.dc(3,"p",29),W.dc(4,"strong"),W.cd(5),W.cc(),W.cc(),W.cc(),W.dc(6,"div",30),W.dc(7,"label",31),W.dc(8,"strong"),W.cd(9),W.qc(10,"translate"),W.cc(),W.cc(),W.cc(),W.dc(11,"div",32),W.dc(12,"label",31),W.dc(13,"strong"),W.cd(14),W.cc(),W.cc(),W.cc(),W.dc(15,"div",10),W.dc(16,"button",33),W.lc("click",(function(e){return W.Sc(c),W.Oc(21).click()})),W.ad(17,Gc,2,0,"i",34),W.ad(18,Ic,2,0,"i",34),W.cd(19,"Favourite"),W.cc(),W.dc(20,"input",35,36),W.lc("change",(function(e){W.Sc(c);var n=t.$implicit,a=t.index;return W.pc().addToFavQuestions(e,null==n?null:n.questions,a)})),W.cc(),W.cc(),W.cc(),W.ad(22,Tc,37,17,"mat-card",26),W.cc()}if(2&e){var n=t.$implicit,a=t.index,i=W.pc();W.Gb(5),W.dd(null==n?null:n.groupName),W.Gb(4),W.dd(W.rc(10,7,"homework.question.lable.Marks")),W.Gb(5),W.dd(null==n?null:n.marks),W.Gb(3),W.yc("ngIf",1==i.isGrpChecked(null==n?null:n.questions,a)),W.Gb(1),W.yc("ngIf",0==i.isGrpChecked(null==n?null:n.questions,a)),W.Gb(2),W.yc("checked",i.isGrpChecked(null==n?null:n.questions,a)),W.Gb(2),W.yc("ngForOf",n.questions)}}var Lc,Ec=((Lc=function(){return _createClass((function e(t,c,n,a,i,o,r,s,l){_classCallCheck(this,e),this.translate=t,this.modelService=c,this.activateRoute=n,this.toaster=a,this.loader=i,this.router=o,this.apiService=r,this.dialog=s,this.permission=l,this.selectedSectionIds=[],this.translate.setDefaultLang("en"),this.onlineexamId=this.activateRoute.snapshot.params.id}),[{key:"ngOnInit",value:function(){this.getPreview()}},{key:"openClick",value:function(){this.dialog.open(rt,{width:"40%"}).afterClosed().subscribe((function(e){console.log("The dialog was closed")}))}},{key:"openClick1",value:function(){var e;this.dialog.open(pt,{width:"40%",data:{onlineexamId:this.onlineexamId,className:null===(e=this.onlineexam)||void 0===e?void 0:e.className}})}},{key:"getPreview",value:function(){var e=this;this.loader.open(),this.modelService.getPreview(this.onlineexamId).subscribe((function(t){if("success"==t.keyword){e.onlineexam=t.onlineexams[0],console.log(e.onlineexam,"this.onlineexam"),e.onlineexam.sections.forEach((function(t){e.selectedSectionIds.push(t.sectionName)}));var c=[];e.onlineexam.group.forEach((function(e){c.push(e.marks)})),e.totalMarks=c.reduce((function(e,t){return Number(e)+Number(t)||0}),0),e.loader.close(),e.toaster.present(t.message,"")}}))}},{key:"action",value:function(e){"update"==e?this.router.navigate(["/teacher/online-exam/edit",this.onlineexamId]):"evaluate"==e&&this.router.navigate(["/teacher/online-exam/student-list",this.onlineexamId])}},{key:"download",value:function(e,t){var c=this;this.apiService.downloadFile("onlineexam/downloadQuesAttachment/".concat(e),{fileName:t}).subscribe((function(e){switch(e.type){case B.d.DownloadProgress:break;case B.d.Response:console.log(e);var c=new Blob([e.body],{type:e.body.type}),n=document.createElement("a");n.setAttribute("style","display:none;"),document.body.appendChild(n),n.download=t,n.href=URL.createObjectURL(c),n.target="_blank",n.click(),document.body.removeChild(n)}}),(function(e){c.toaster.present("could not download")}))}},{key:"addToFav",value:function(e,t,c,n){var a,i=this,o=new FormData,r=null===(a=this.onlineexam.group[n])||void 0===a?void 0:a.questions.filter((function(e){return e.questionId==t}));1==e.target.checked?(r.forEach((function(e){e.isFavorite=1})),o.append("onlineexam_question_id",JSON.stringify([t])),o.append("remove_id",JSON.stringify([]))):(o.append("onlineexam_question_id",JSON.stringify([])),o.append("remove_id",JSON.stringify([t])),r.forEach((function(e){e.isFavorite=0}))),this.modelService.addToFav(o).subscribe((function(e){console.log(e),i.toaster.present(e.message,"")}))}},{key:"isGrpChecked",value:function(e,t){var c,n,a;return(null===(c=e.filter((function(e){return 1==e.isFavorite})))||void 0===c?void 0:c.length)==(null===(a=null===(n=this.onlineexam.group[t])||void 0===n?void 0:n.questions)||void 0===a?void 0:a.length)}},{key:"addToFavQuestions",value:function(e,t,c){var n,a,i=this,o=[];t.forEach((function(e){o.push(e.questionId)}));var r=new FormData;1==e.target.checked?(null===(n=this.onlineexam.group[c])||void 0===n||n.questions.forEach((function(e){e.isFavorite=1})),r.append("onlineexam_question_id",JSON.stringify(o)),r.append("remove_id",JSON.stringify([]))):(r.append("onlineexam_question_id",JSON.stringify([])),r.append("remove_id",JSON.stringify(o)),null===(a=this.onlineexam.group[c])||void 0===a||a.questions.forEach((function(e){e.isFavorite=0}))),this.modelService.addToFav(r).subscribe((function(e){console.log(e),i.toaster.present(e.message,"")}))}},{key:"copy",value:function(e,t,c){console.log(e,"questionName"),console.log(t,"options");var n,a="",i=_createForOfIteratorHelper(t);try{for(i.s();!(n=i.n()).done;){var o=n.value;a=a.concat(this.stripHtml(o.optionName).toString()+"\n")}}catch(s){i.e(s)}finally{i.f()}console.log(a,"optionName");var r=document.createElement("textarea");r.value=this.stripHtml(e)+"\n"+a+"\n"+this.stripHtml(c),r.setAttribute("readonly",""),r.style.position="absolute",r.style.left="-9999px",document.body.appendChild(r),r.select(),document.execCommand("copy"),document.body.removeChild(r),this.toaster.present("Copied successfully")}},{key:"stripHtml",value:function(e){var t=document.createElement("P");t.innerHTML=e;var c=t.innerText;return t=null,c}}])}()).\u0275fac=function(e){return new(e||Lc)(W.Xb(we.d),W.Xb(le),W.Xb(h.a),W.Xb(ue.a),W.Xb(de.a),W.Xb(h.g),W.Xb(R.a),W.Xb(Ke.b),W.Xb($e.a))},Lc.\u0275cmp=W.Rb({type:Lc,selectors:[["app-create"]],decls:99,vars:41,consts:[["fxLayout","row wrap ",1,"create_btn"],["fxFlex","100","fxFlex.gt-xs","35",1,"pr-1"],["mat-raised-button","","color","primary",1,"btn-primary-bg",3,"disabled","click"],["mat-raised-button","","color","primary",1,"btn-primary-bg",3,"click"],["mat-raised-button","","color","primary",1,"btn-white-bg",3,"disabled","click"],["href","#",1,"pl-8","primary-txt-color",3,"routerLink"],["fxFlex","100","fxFlex.gt-xs","65",1,"mt-4"],["fxLayout","row wrap",1,"pl-16"],["fxFlex","100","fxFlex.gt-xs","13",1,""],["fxFlex","100","fxFlex.gt-xs","10",1,""],["fxFlex","100","fxFlex.gt-xs","6",1,""],["fxFlex","100","fxFlex.gt-xs","16",1,""],["fxFlex","100","fxFlex.gt-xs","16",1,"mr-12"],[1,"border-top"],[1,"p-16"],[1,"text-center","font20","mb-0"],[1,"text-center"],["fxLayout","row wrap",1,"mt-8","mb-8","p-4","pl-16","grey-100","border"],["fxFlex","100","fxFlex.gt-xs","14",1,""],[1,"ml-8"],["fxFlex","100","fxFlex.gt-xs","30",1,""],["fxFlex","100","fxFlex.gt-xs","20",1,""],["fxFlex","100","fxFlex.gt-xs","11",1,"text-right"],["fxLayout","row wrap"],["fxFlex","100","fxFlex.gt-xs","95",1,"text-right"],["fxFlex","100","fxFlex.gt-xs","5",1,"text-right","pr-16"],[4,"ngFor","ngForOf"],["fxLayout","row wrap",1,"mt-12"],["fxFlex","100","fxFlex.gt-xs","79",1,""],[1,"f15"],["fxFlex","100","fxFlex.gt-xs","6",1,"text-right"],[1,""],["fxFlex","100","fxFlex.gt-xs","7.5",1,"text-center"],["mat-raised-button","","color","primary",1,"favourite-btn",3,"click"],["class","material-icons",4,"ngIf"],["type","checkbox","value","",2,"display","none",3,"checked","change"],["filee",""],[1,"material-icons"],["fxLayout","row wrap",1,"mt-0"],["fxFlex","100","fxFlex.gt-xs","11",1,"mt-12"],["fxFlex","100","fxFlex.gt-xs","64.3",1,"mt-12","sun-editor-custom-style"],[2,"display","flex"],[3,"innerHtml"],["fxFlex","100","fxFlex.gt-xs","6",1,"mt-12","text-center"],["fxFlex","100","fxFlex.gt-xs","6",1,"text-center","mt-12","mr-8"],["fxFlex","100","fxFlex.gt-xs","6",1,"mt-12"],["mat-raised-button","","color","primary",1,"copy-fav-btn",3,"click"],["type","button","mat-raised-button","","color","primary",1,"favourite-btn",3,"click"],["file",""],["fxLayout","row wrap","class","mt-0",4,"ngIf"],["fxLayout","row wrap","class","mt-8",4,"ngIf"],["fxFlex","100","fxFlex.gt-xs","11",1,"mt-16"],["fxFlex","100","fxFlex.gt-xs","75",1,"mr-12","mt-12","sun-editor-custom-style"],[1,"mr-4",3,"innerHtml"],["fxLayout","row wrap",1,"mt-8"],["fxFlex","100","fxFlex.gt-xs","11",1,"mt-8"],["fxFlex","100","fxFlex.gt-xs","88",1,"mt-8"],["fxFlex","100","fxFlex.gt-xs","10","class","mt-12 mr-8 attachment-img",4,"ngFor","ngForOf"],["fxFlex","100","fxFlex.gt-xs","10",1,"mt-12","mr-8","attachment-img"],["height","68",1,"caption-figure","overlay-figure",3,"src"],["mat-button","","color","primary",1,"bg-download","mb-4","ml-0",3,"click"],["fxFlex","100","fxFlex.gt-xs","75",1,"mr-12","mt-16","sun-editor-custom-style"]],template:function(e,t){1&e&&(W.dc(0,"div",0),W.dc(1,"div",1),W.dc(2,"button",2),W.lc("click",(function(e){return t.action("update")})),W.cd(3,"Edit"),W.cc(),W.dc(4,"button",3),W.lc("click",(function(e){return t.openClick()})),W.cd(5,"Create"),W.cc(),W.dc(6,"button",4),W.lc("click",(function(e){return t.openClick1()})),W.cd(7,"Evaluate"),W.cc(),W.dc(8,"a",5),W.cd(9,"Discard"),W.cc(),W.cc(),W.dc(10,"div",6),W.dc(11,"div",7),W.dc(12,"div",8),W.dc(13,"label"),W.dc(14,"strong"),W.cd(15),W.qc(16,"translate"),W.cc(),W.cc(),W.cc(),W.dc(17,"div",9),W.cd(18),W.cc(),W.dc(19,"div",10),W.dc(20,"label"),W.dc(21,"strong"),W.cd(22),W.qc(23,"translate"),W.cc(),W.cc(),W.cc(),W.dc(24,"div",11),W.dc(25,"label"),W.cd(26),W.cc(),W.cc(),W.dc(27,"div",10),W.dc(28,"label"),W.dc(29,"strong"),W.cd(30),W.qc(31,"translate"),W.cc(),W.cc(),W.cc(),W.dc(32,"div",11),W.dc(33,"label"),W.cd(34),W.cc(),W.cc(),W.dc(35,"div",10),W.dc(36,"label"),W.dc(37,"strong"),W.cd(38),W.qc(39,"translate"),W.cc(),W.cc(),W.cc(),W.dc(40,"div",12),W.dc(41,"label"),W.cd(42),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.Yb(43,"div",13),W.dc(44,"div",14),W.dc(45,"p",15),W.dc(46,"strong"),W.cd(47),W.cc(),W.cc(),W.dc(48,"h3",16),W.dc(49,"strong"),W.cd(50),W.cc(),W.cc(),W.dc(51,"div",17),W.dc(52,"div",18),W.dc(53,"label"),W.dc(54,"strong"),W.cd(55,"Start Date "),W.cc(),W.dc(56,"span",19),W.cd(57),W.qc(58,"displayDate"),W.cc(),W.cc(),W.cc(),W.dc(59,"div",18),W.dc(60,"label"),W.dc(61,"strong"),W.cd(62,"Start Time "),W.cc(),W.dc(63,"span",19),W.cd(64),W.qc(65,"displayTime"),W.cc(),W.cc(),W.cc(),W.dc(66,"div",9),W.dc(67,"label"),W.dc(68,"strong"),W.cd(69,"End Time "),W.cc(),W.dc(70,"span",19),W.cd(71),W.qc(72,"displayTime"),W.cc(),W.cc(),W.cc(),W.Yb(73,"div",20),W.dc(74,"div",21),W.dc(75,"label"),W.dc(76,"strong"),W.cd(77,"Last Submission Date "),W.cc(),W.dc(78,"span",19),W.cd(79),W.qc(80,"displayDate"),W.cc(),W.cc(),W.cc(),W.dc(81,"div",22),W.dc(82,"label"),W.dc(83,"strong"),W.cd(84,"Time "),W.cc(),W.dc(85,"span",19),W.cd(86),W.qc(87,"displayTime"),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(88,"div",23),W.dc(89,"div",24),W.dc(90,"label"),W.dc(91,"strong"),W.cd(92),W.qc(93,"translate"),W.cc(),W.cc(),W.cc(),W.dc(94,"div",25),W.dc(95,"label"),W.dc(96,"strong"),W.cd(97),W.cc(),W.cc(),W.cc(),W.cc(),W.ad(98,jc,23,9,"div",26),W.cc()),2&e&&(W.Gb(2),W.yc("disabled","4"==(null==t.onlineexam?null:t.onlineexam.status)),W.Gb(4),W.yc("disabled","4"!=(null==t.onlineexam?null:t.onlineexam.status)),W.Gb(2),W.yc("routerLink","/teacher/online-exam/list"),W.Gb(7),W.dd(W.rc(16,21,"homework.question.lable.Academic")),W.Gb(3),W.ed(" ",null==t.onlineexam?null:t.onlineexam.academicYearName," "),W.Gb(4),W.dd(W.rc(23,23,"homework.question.lable.Batch")),W.Gb(4),W.dd(null==t.onlineexam?null:t.onlineexam.batchName),W.Gb(4),W.dd(W.rc(31,25,"homework.question.lable.Class")),W.Gb(4),W.dd(null==t.onlineexam?null:t.onlineexam.className),W.Gb(4),W.dd(W.rc(39,27,"homework.question.lable.Section")),W.Gb(4),W.dd(t.selectedSectionIds.join()),W.Gb(5),W.dd(null==t.onlineexam?null:t.onlineexam.title),W.Gb(3),W.dd(null==t.onlineexam?null:t.onlineexam.subjectName),W.Gb(7),W.ed(" ",W.rc(58,29,null==t.onlineexam?null:t.onlineexam.startDate),""),W.Gb(7),W.dd(W.rc(65,31,null==t.onlineexam?null:t.onlineexam.startTime)),W.Gb(7),W.dd(W.rc(72,33,null==t.onlineexam?null:t.onlineexam.endTime)),W.Gb(8),W.dd(W.rc(80,35,null==t.onlineexam?null:t.onlineexam.submissionDate)),W.Gb(7),W.dd(W.rc(87,37,null==t.onlineexam?null:t.onlineexam.submissionTime)),W.Gb(6),W.ed(" ",W.rc(93,39,"homework.question.lable.Total"),""),W.Gb(5),W.dd(t.totalMarks),W.Gb(1),W.yc("ngForOf",null==t.onlineexam?null:t.onlineexam.group))},directives:[xe.c,xe.a,b.a,h.j,f.n,f.o,x.a],pipes:[we.c,he.a,he.c,he.h],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.row[_ngcontent-%COMP%]{margin-top:-10px}.f24[_ngcontent-%COMP%]{font-size:24px;margin-left:-10px}.text-center[_ngcontent-%COMP%]{text-align:center!important}.text-right[_ngcontent-%COMP%]{text-align:right!important}.font20[_ngcontent-%COMP%]{font-size:27px}.font16[_ngcontent-%COMP%]{font-size:16px}mat-card.mat-card[_ngcontent-%COMP%]{border:1px solid hsla(0,0%,50.2%,.47843137254901963)}.f15[_ngcontent-%COMP%]{font-size:15px;margin-left:8px;margin-bottom:0}.copy-fav-btn[_ngcontent-%COMP%]{line-height:20px!important;padding:0 6px!important;background:#019fa2!important;color:#fff!important;border-radius:0!important;border:1px solid #019fa2!important;font-size:8px}.favourite-btn[_ngcontent-%COMP%]{color:#01a39d!important;border-radius:0!important;border:1px solid #019fa2!important}.checked-favourite-btn[_ngcontent-%COMP%], .favourite-btn[_ngcontent-%COMP%]{background:#fff!important;line-height:20px!important;padding:0 5px!important;min-width:38px!important}.checked-favourite-btn[_ngcontent-%COMP%]{color:#019fa2!important;border-radius:0!important;border:1px solid #01a39d!important}.copy-fav-btn[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%], .favourite-btn[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{font-size:15px;margin-right:4px}.attachment-img[_ngcontent-%COMP%] .bg-download[_ngcontent-%COMP%]{background:#fff!important;color:#01a39d!important;min-width:35px;line-height:20px!important;padding:0 5px!important}.attachment-img[_ngcontent-%COMP%] .bg-download[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{font-size:18px}.checked[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#01a39d!important}"]}),Lc);function zc(e,t){if(1&e&&(W.dc(0,"div",38),W.dc(1,"div",39),W.dc(2,"label"),W.dc(3,"strong"),W.cd(4,"Answer Key"),W.cc(),W.cc(),W.cc(),W.dc(5,"div",40),W.dc(6,"div",41),W.dc(7,"div"),W.dc(8,"label",33),W.Yb(9,"span",42),W.qc(10,"safeHtml"),W.cc(),W.Yb(11,"br"),W.cc(),W.cc(),W.cc(),W.cc()),2&e){var c=W.pc().$implicit;W.Gb(9),W.yc("innerHtml",W.rc(10,1,null==c?null:c.answer),W.Tc)}}function Yc(e,t){if(1&e){var c=W.ec();W.dc(0,"div",46),W.Yb(1,"img",47),W.dc(2,"div",14),W.dc(3,"button",48),W.lc("click",(function(e){W.Sc(c);var n=t.$implicit;return W.pc(4).download(null==n?null:n.attachmentId,null==n?null:n.attachment)})),W.dc(4,"i",49),W.cd(5," cloud_download "),W.cc(),W.cc(),W.cc(),W.cc()}if(2&e){var n=t.$implicit;W.Gb(1),W.zc("src",null==n?null:n.attachment,W.Vc)}}function Xc(e,t){if(1&e&&(W.dc(0,"div",38),W.dc(1,"div",43),W.dc(2,"label"),W.Yb(3,"strong"),W.cc(),W.cc(),W.dc(4,"div",44),W.ad(5,Yc,6,1,"div",45),W.cc(),W.cc()),2&e){var c=W.pc().$implicit;W.Gb(5),W.yc("ngForOf",c.quesAttachment)}}function Hc(e,t){if(1&e&&(W.dc(0,"div"),W.dc(1,"label",33),W.dc(2,"span"),W.cd(3),W.cc(),W.Yb(4,"span",42),W.qc(5,"safeHtml"),W.cc(),W.Yb(6,"br"),W.cc()),2&e){var c=t.$implicit,n=t.index;W.Gb(3),W.ed("",n+1,"."),W.Gb(1),W.yc("innerHtml",W.rc(5,2,c.optionName),W.Tc)}}function Rc(e,t){if(1&e&&(W.dc(0,"div",25),W.dc(1,"div",31),W.dc(2,"label"),W.dc(3,"strong"),W.cd(4),W.qc(5,"translate"),W.cc(),W.cc(),W.cc(),W.dc(6,"div",50),W.dc(7,"div",41),W.ad(8,Hc,7,4,"div",24),W.cc(),W.cc(),W.cc()),2&e){var c=W.pc().$implicit;W.Gb(4),W.ed(" ",W.rc(5,2,"homework.question.lable.Option"),""),W.Gb(4),W.yc("ngForOf",c.quesOptions)}}function Bc(e,t){if(1&e&&(W.dc(0,"mat-card"),W.dc(1,"div",25),W.dc(2,"div",31),W.dc(3,"label"),W.dc(4,"strong"),W.cd(5),W.qc(6,"translate"),W.cc(),W.cc(),W.cc(),W.dc(7,"div",32),W.dc(8,"label",33),W.dc(9,"span"),W.cd(10),W.cc(),W.Yb(11,"span",34),W.qc(12,"safeHtml"),W.cc(),W.cc(),W.dc(13,"div",35),W.dc(14,"label"),W.dc(15,"strong"),W.cd(16),W.cc(),W.cc(),W.cc(),W.cc(),W.ad(17,zc,12,3,"div",36),W.ad(18,Xc,6,1,"div",36),W.ad(19,Rc,9,4,"div",37),W.cc()),2&e){var c=t.$implicit,n=t.index,a=W.pc().$implicit;W.Gb(5),W.dd(W.rc(6,7,"homework.question.lable.Questionname")),W.Gb(5),W.ed("",n+1,"."),W.Gb(1),W.yc("innerHtml",W.rc(12,9,null==c?null:c.questionName),W.Tc),W.Gb(5),W.dd(null==a?null:a.eachMark),W.Gb(1),W.yc("ngIf",0==c.quesOptions.length),W.Gb(1),W.yc("ngIf",0!=c.quesAttachment.length),W.Gb(1),W.yc("ngIf",0!=c.quesOptions.length)}}function $c(e,t){if(1&e&&(W.dc(0,"div"),W.dc(1,"div",25),W.dc(2,"div",26),W.dc(3,"p",27),W.dc(4,"strong"),W.cd(5),W.cc(),W.cc(),W.cc(),W.dc(6,"div",28),W.dc(7,"label",29),W.dc(8,"strong"),W.cd(9),W.qc(10,"translate"),W.cc(),W.cc(),W.cc(),W.dc(11,"div",30),W.dc(12,"label",29),W.dc(13,"strong"),W.cd(14),W.cc(),W.cc(),W.cc(),W.cc(),W.ad(15,Bc,20,11,"mat-card",24),W.cc()),2&e){var c=t.$implicit;W.Gb(5),W.dd(null==c?null:c.groupName),W.Gb(4),W.dd(W.rc(10,4,"homework.question.lable.Marks")),W.Gb(5),W.dd(null==c?null:c.marks),W.Gb(1),W.yc("ngForOf",c.questions)}}var Vc,Uc=((Vc=function(){return _createClass((function e(t,c,n,a,i,o,r,s){_classCallCheck(this,e),this.translate=t,this.modelService=c,this.activateRoute=n,this.toaster=a,this.loader=i,this.router=o,this.apiService=r,this.location=s,this.selectedSectionIds=[],this.translate.setDefaultLang("en"),this.onlineexamId=this.activateRoute.snapshot.params.id}),[{key:"ngOnInit",value:function(){this.getPreview()}},{key:"getPreview",value:function(){var e=this;this.loader.open(),this.modelService.getPreview(this.onlineexamId).subscribe((function(t){if("success"==t.keyword){console.log(t.onlineexams),e.onlineexam=t.onlineexams[0],e.onlineexam.sections.forEach((function(t){e.selectedSectionIds.push(t.sectionName)}));var c=[];e.onlineexam.group.forEach((function(e){c.push(e.marks)})),e.totalMarks=c.reduce((function(e,t){return Number(e)+Number(t)||0}),0),console.log(e.totalMarks,"this.totalMarks"),e.loader.close(),e.toaster.present(t.message,"")}}))}},{key:"download",value:function(e,t){var c=this;this.apiService.downloadFile("onlineexam/downloadQuesAttachment/".concat(e),{fileName:t}).subscribe((function(e){switch(e.type){case B.d.DownloadProgress:break;case B.d.Response:console.log(e);var c=new Blob([e.body],{type:e.body.type}),n=document.createElement("a");n.setAttribute("style","display:none;"),document.body.appendChild(n),n.download=t,n.href=URL.createObjectURL(c),n.target="_blank",n.click(),document.body.removeChild(n)}}),(function(e){c.toaster.present("could not download")}))}},{key:"back",value:function(){this.location.back()}}])}()).\u0275fac=function(e){return new(e||Vc)(W.Xb(we.d),W.Xb(le),W.Xb(h.a),W.Xb(ue.a),W.Xb(de.a),W.Xb(h.g),W.Xb(R.a),W.Xb(f.k))},Vc.\u0275cmp=W.Rb({type:Vc,selectors:[["app-create"]],decls:95,vars:41,consts:[["fxLayout","row wrap ",1,"create_btn"],["fxFlex","100","fxFlex.gt-xs","35",1,"pr-1"],[1,"example-button-row","mt-10","mb-8"],["mat-flat-button","",1,"btn-primary-bg",3,"click"],["fxFlex","100","fxFlex.gt-xs","65",1,"mt-4"],["fxLayout","row wrap",1,"pl-16"],["fxFlex","100","fxFlex.gt-xs","13",1,""],["fxFlex","100","fxFlex.gt-xs","10",1,""],["fxFlex","100","fxFlex.gt-xs","6",1,""],["fxFlex","100","fxFlex.gt-xs","16",1,""],["fxFlex","100","fxFlex.gt-xs","16",1,"mr-12"],[1,"border-top"],[1,"p-16"],[1,"text-center","font20","mb-0"],[1,"text-center"],["fxLayout","row wrap",1,"mt-8","mb-8","p-4","pl-16","grey-100","border"],["fxFlex","100","fxFlex.gt-xs","14",1,""],[1,"ml-8"],["fxFlex","100","fxFlex.gt-xs","30",1,""],["fxFlex","100","fxFlex.gt-xs","20",1,""],["fxFlex","100","fxFlex.gt-xs","11",1,"text-right"],["fxLayout","row wrap"],["fxFlex","100","fxFlex.gt-xs","95",1,"text-right"],["fxFlex","100","fxFlex.gt-xs","5",1,"text-right","pr-16"],[4,"ngFor","ngForOf"],["fxLayout","row wrap",1,"mt-0"],["fxFlex","100","fxFlex.gt-xs","80",1,"mt-12"],[1,"f15"],["fxFlex","100","fxFlex.gt-xs","15",1,"mt-12","text-right"],[1,""],["fxFlex","100","fxFlex.gt-xs","5",1,"mt-12","text-center"],["fxFlex","100","fxFlex.gt-xs","11",1,"mt-12"],["fxFlex","100","fxFlex.gt-xs","77",1,"mr-12","mt-12","sun-editor-custom-style"],[2,"display","flex"],[3,"innerHtml"],["fxFlex","100","fxFlex.gt-xs","10",1,"text-right","mt-12"],["fxLayout","row wrap","class","mt-8",4,"ngIf"],["fxLayout","row wrap","class","mt-0",4,"ngIf"],["fxLayout","row wrap",1,"mt-8"],["fxFlex","100","fxFlex.gt-xs","11",1,"mt-16"],["fxFlex","100","fxFlex.gt-xs","75",1,"mr-12","mt-12",2,"display","inline-flex !important"],["fxFlex","100","fxFlex.gt-xs","75",1,"mr-12","mt-16","sun-editor-custom-style"],[1,"mr-4",3,"innerHtml"],["fxFlex","100","fxFlex.gt-xs","11",1,"mt-8"],["fxFlex","100","fxFlex.gt-xs","88",1,"mt-8"],["fxFlex","100","fxFlex.gt-xs","10","class","mt-12 mr-8 attachment-img",4,"ngFor","ngForOf"],["fxFlex","100","fxFlex.gt-xs","10",1,"mt-12","mr-8","attachment-img"],["height","68",1,"caption-figure","overlay-figure",3,"src"],["mat-button","","color","primary",1,"bg-download","mb-4","ml-0",3,"click"],[1,"material-icons"],["fxFlex","100","fxFlex.gt-xs","75",1,"mr-16","mt-12",2,"display","inline-flex !important"]],template:function(e,t){1&e&&(W.dc(0,"div",0),W.dc(1,"div",1),W.dc(2,"div",2),W.dc(3,"button",3),W.lc("click",(function(e){return t.back()})),W.cd(4),W.qc(5,"translate"),W.cc(),W.cc(),W.cc(),W.dc(6,"div",4),W.dc(7,"div",5),W.dc(8,"div",6),W.dc(9,"label"),W.dc(10,"strong"),W.cd(11),W.qc(12,"translate"),W.cc(),W.cc(),W.cc(),W.dc(13,"div",7),W.cd(14),W.cc(),W.dc(15,"div",8),W.dc(16,"label"),W.dc(17,"strong"),W.cd(18),W.qc(19,"translate"),W.cc(),W.cc(),W.cc(),W.dc(20,"div",9),W.dc(21,"label"),W.cd(22),W.cc(),W.cc(),W.dc(23,"div",8),W.dc(24,"label"),W.dc(25,"strong"),W.cd(26),W.qc(27,"translate"),W.cc(),W.cc(),W.cc(),W.dc(28,"div",9),W.dc(29,"label"),W.cd(30),W.cc(),W.cc(),W.dc(31,"div",8),W.dc(32,"label"),W.dc(33,"strong"),W.cd(34),W.qc(35,"translate"),W.cc(),W.cc(),W.cc(),W.dc(36,"div",10),W.dc(37,"label"),W.cd(38),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.Yb(39,"div",11),W.dc(40,"div",12),W.dc(41,"p",13),W.dc(42,"strong"),W.cd(43),W.cc(),W.cc(),W.dc(44,"h3",14),W.dc(45,"strong"),W.cd(46),W.cc(),W.cc(),W.dc(47,"div",15),W.dc(48,"div",16),W.dc(49,"label"),W.dc(50,"strong"),W.cd(51,"Start Date "),W.cc(),W.dc(52,"span",17),W.cd(53),W.qc(54,"displayDate"),W.cc(),W.cc(),W.cc(),W.dc(55,"div",16),W.dc(56,"label"),W.dc(57,"strong"),W.cd(58,"Start Time "),W.cc(),W.dc(59,"span",17),W.cd(60),W.qc(61,"displayTime"),W.cc(),W.cc(),W.cc(),W.dc(62,"div",7),W.dc(63,"label"),W.dc(64,"strong"),W.cd(65,"End Time "),W.cc(),W.dc(66,"span",17),W.cd(67),W.qc(68,"displayTime"),W.cc(),W.cc(),W.cc(),W.Yb(69,"div",18),W.dc(70,"div",19),W.dc(71,"label"),W.dc(72,"strong"),W.cd(73,"Last Submission Date "),W.cc(),W.dc(74,"span",17),W.cd(75),W.qc(76,"displayDate"),W.cc(),W.cc(),W.cc(),W.dc(77,"div",20),W.dc(78,"label"),W.dc(79,"strong"),W.cd(80,"Time "),W.cc(),W.dc(81,"span",17),W.cd(82),W.qc(83,"displayTime"),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(84,"div",21),W.dc(85,"div",22),W.dc(86,"label"),W.dc(87,"strong"),W.cd(88),W.qc(89,"translate"),W.cc(),W.cc(),W.cc(),W.dc(90,"div",23),W.dc(91,"label"),W.dc(92,"strong"),W.cd(93),W.cc(),W.cc(),W.cc(),W.cc(),W.ad(94,$c,16,6,"div",24),W.cc()),2&e&&(W.Gb(4),W.ed(" ",W.rc(5,19,"homework.question.button.back")," "),W.Gb(7),W.dd(W.rc(12,21,"homework.question.lable.Academic")),W.Gb(3),W.ed(" ",null==t.onlineexam?null:t.onlineexam.academicYearName," "),W.Gb(4),W.dd(W.rc(19,23,"homework.question.lable.Batch")),W.Gb(4),W.dd(null==t.onlineexam?null:t.onlineexam.batchName),W.Gb(4),W.dd(W.rc(27,25,"homework.question.lable.Class")),W.Gb(4),W.dd(null==t.onlineexam?null:t.onlineexam.className),W.Gb(4),W.dd(W.rc(35,27,"homework.question.lable.Section")),W.Gb(4),W.dd(t.selectedSectionIds.join()),W.Gb(5),W.dd(null==t.onlineexam?null:t.onlineexam.title),W.Gb(3),W.dd(null==t.onlineexam?null:t.onlineexam.subjectName),W.Gb(7),W.ed(" ",W.rc(54,29,null==t.onlineexam?null:t.onlineexam.startDate),""),W.Gb(7),W.dd(W.rc(61,31,null==t.onlineexam?null:t.onlineexam.startTime)),W.Gb(7),W.dd(W.rc(68,33,null==t.onlineexam?null:t.onlineexam.endTime)),W.Gb(8),W.dd(W.rc(76,35,null==t.onlineexam?null:t.onlineexam.submissionDate)),W.Gb(7),W.dd(W.rc(83,37,null==t.onlineexam?null:t.onlineexam.submissionTime)),W.Gb(6),W.ed(" ",W.rc(89,39,"homework.question.lable.Total"),""),W.Gb(5),W.dd(t.totalMarks),W.Gb(1),W.yc("ngForOf",null==t.onlineexam?null:t.onlineexam.group))},directives:[xe.c,xe.a,b.a,f.n,x.a,f.o],pipes:[we.c,he.a,he.c,he.h],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.row[_ngcontent-%COMP%]{margin-top:-10px}.f24[_ngcontent-%COMP%]{font-size:24px;margin-left:-10px}.text-center[_ngcontent-%COMP%]{text-align:center!important}.text-right[_ngcontent-%COMP%]{text-align:right!important}.font20[_ngcontent-%COMP%]{font-size:27px}.font16[_ngcontent-%COMP%]{font-size:16px}mat-card.mat-card[_ngcontent-%COMP%]{border:1px solid hsla(0,0%,50.2%,.47843137254901963)}.f15[_ngcontent-%COMP%]{font-size:15px;margin-left:8px;margin-bottom:0}.copy-fav-btn[_ngcontent-%COMP%]{padding:0 6px!important;background:#019fa2!important;color:#fff!important;font-size:8px}.copy-fav-btn[_ngcontent-%COMP%], .favourite-btn[_ngcontent-%COMP%]{line-height:20px!important;border-radius:0!important;border:1px solid #019fa2!important}.favourite-btn[_ngcontent-%COMP%]{color:#01a39d!important;background:#fff!important;padding:0 5px!important;min-width:38px!important}.copy-fav-btn[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%], .favourite-btn[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{font-size:15px;margin-right:4px}.attachment-img[_ngcontent-%COMP%] .bg-download[_ngcontent-%COMP%]{background:#fff!important;color:#01a39d!important;min-width:35px;line-height:20px!important;padding:0 5px!important}.attachment-img[_ngcontent-%COMP%] .bg-download[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{font-size:18px}"]}),Vc);function Jc(e,t){if(1&e){var c=W.ec();W.dc(0,"div",40),W.Yb(1,"img",41),W.dc(2,"div",42),W.dc(3,"button",43),W.lc("click",(function(e){W.Sc(c);var n=t.$implicit;return W.pc(4).download(null==n?null:n.attachmentId,null==n?null:n.attachment)})),W.dc(4,"i",44),W.cd(5," cloud_download "),W.cc(),W.cc(),W.cc(),W.cc()}if(2&e){var n=t.$implicit;W.Gb(1),W.zc("src",null==n?null:n.attachment,W.Vc)}}function Wc(e,t){if(1&e&&(W.dc(0,"div",38),W.ad(1,Jc,6,1,"div",39),W.cc()),2&e){var c=W.pc().$implicit;W.Gb(1),W.yc("ngForOf",c.quesAttachment)}}function Kc(e,t){if(1&e&&(W.dc(0,"div"),W.dc(1,"label",30),W.dc(2,"span"),W.cd(3),W.cc(),W.Yb(4,"span",46),W.qc(5,"safeHtml"),W.cc(),W.Yb(6,"br"),W.cc()),2&e){var c=t.$implicit,n=t.index;W.Gb(3),W.ed("",n+1,"."),W.Gb(1),W.yc("innerHtml",W.rc(5,2,c.optionName),W.Tc)}}function Zc(e,t){if(1&e&&(W.dc(0,"div",14),W.dc(1,"div",28),W.dc(2,"label"),W.dc(3,"strong"),W.cd(4),W.qc(5,"translate"),W.cc(),W.cc(),W.cc(),W.dc(6,"div",45),W.ad(7,Kc,7,4,"div",22),W.cc(),W.cc()),2&e){var c=W.pc().$implicit;W.Gb(4),W.ed(" ",W.rc(5,2,"homework.question.lable.Option"),""),W.Gb(3),W.yc("ngForOf",c.quesOptions)}}function en(e,t){if(1&e&&(W.dc(0,"mat-card"),W.dc(1,"div",14),W.dc(2,"div",28),W.dc(3,"label"),W.dc(4,"strong"),W.cd(5),W.qc(6,"translate"),W.cc(),W.cc(),W.cc(),W.dc(7,"div",29),W.dc(8,"label",30),W.dc(9,"span"),W.cd(10),W.cc(),W.Yb(11,"span",31),W.qc(12,"safeHtml"),W.cc(),W.cc(),W.dc(13,"div",32),W.dc(14,"label"),W.dc(15,"strong"),W.cd(16),W.qc(17,"translate"),W.cc(),W.cc(),W.cc(),W.dc(18,"div",33),W.dc(19,"label"),W.dc(20,"strong"),W.cd(21),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(22,"div",34),W.dc(23,"div",35),W.dc(24,"label"),W.Yb(25,"strong"),W.cc(),W.cc(),W.ad(26,Wc,2,1,"div",36),W.cc(),W.ad(27,Zc,8,4,"div",37),W.cc()),2&e){var c=t.$implicit,n=t.index,a=W.pc().$implicit;W.Gb(5),W.dd(W.rc(6,7,"homework.question.lable.Questionname")),W.Gb(5),W.ed("",n+1,"."),W.Gb(1),W.yc("innerHtml",W.rc(12,9,null==c?null:c.questionName),W.Tc),W.Gb(5),W.ed(" ",W.rc(17,11,"homework.question.lable.Marks"),""),W.Gb(5),W.dd(null==a?null:a.eachMark),W.Gb(5),W.yc("ngIf",0!=c.quesAttachment.length),W.Gb(1),W.yc("ngIf",0!=c.quesOptions.length)}}function tn(e,t){if(1&e&&(W.dc(0,"div"),W.dc(1,"div",14),W.dc(2,"div",23),W.dc(3,"p",24),W.dc(4,"strong"),W.cd(5),W.cc(),W.cc(),W.cc(),W.dc(6,"div",25),W.dc(7,"label",26),W.dc(8,"strong"),W.cd(9),W.qc(10,"translate"),W.cc(),W.cc(),W.cc(),W.dc(11,"div",27),W.dc(12,"label",26),W.dc(13,"strong"),W.cd(14),W.cc(),W.cc(),W.cc(),W.cc(),W.ad(15,en,28,13,"mat-card",22),W.cc()),2&e){var c=t.$implicit;W.Gb(5),W.dd(null==c?null:c.groupName),W.Gb(4),W.dd(W.rc(10,4,"homework.question.lable.Marks")),W.Gb(5),W.dd(null==c?null:c.marks),W.Gb(1),W.yc("ngForOf",c.questions)}}var cn,nn=((cn=function(){return _createClass((function e(t,c,n,a,i,o,r){_classCallCheck(this,e),this.translate=t,this.modelService=c,this.activateRoute=n,this.toaster=a,this.loader=i,this.router=o,this.apiService=r,this.selectedSectionIds=[],this.translate.setDefaultLang("en"),this.onlineexamId=this.activateRoute.snapshot.params.id}),[{key:"ngOnInit",value:function(){this.getPreview()}},{key:"getPreview",value:function(){var e=this;this.loader.open(),this.modelService.getPreview(this.onlineexamId).subscribe((function(t){if("success"==t.keyword){console.log(t.onlineexams),e.onlineexam=t.onlineexams[0],e.onlineexam.sections.forEach((function(t){e.selectedSectionIds.push(t.sectionName)}));var c=[];e.onlineexam.group.forEach((function(e){c.push(e.marks)})),e.totalMarks=c.reduce((function(e,t){return Number(e)+Number(t)||0}),0),console.log(e.totalMarks,"this.totalMarks"),e.loader.close(),e.toaster.present(t.message,"")}}))}},{key:"approve",value:function(){var e=this;this.loader.open();var t=new FormData;t.append("id",this.onlineexamId),this.modelService.approve(t).subscribe((function(t){"success"==t.keyword&&(e.loader.close(),e.router.navigate(["/teacher/online-exam/list"]),e.toaster.present(t.message,""))}))}},{key:"download",value:function(e,t){var c=this;this.apiService.downloadFile("onlineexam/downloadQuesAttachment/".concat(e),{fileName:t}).subscribe((function(e){switch(e.type){case B.d.DownloadProgress:break;case B.d.Response:console.log(e);var c=new Blob([e.body],{type:e.body.type}),n=document.createElement("a");n.setAttribute("style","display:none;"),document.body.appendChild(n),n.download=t,n.href=URL.createObjectURL(c),n.target="_blank",n.click(),document.body.removeChild(n)}}),(function(e){c.toaster.present("could not download")}))}}])}()).\u0275fac=function(e){return new(e||cn)(W.Xb(we.d),W.Xb(le),W.Xb(h.a),W.Xb(ue.a),W.Xb(de.a),W.Xb(h.g),W.Xb(R.a))},cn.\u0275cmp=W.Rb({type:cn,selectors:[["app-approve"]],decls:61,vars:24,consts:[["fxLayout","row wrap ",1,"create_btn"],["fxFlex","100","fxFlex.gt-xs","35",1,"pr-1"],["mat-raised-button","","color","primary",1,"btn-primary-bg",3,"click"],["href","#",1,"pl-8","primary-txt-color",3,"routerLink"],["fxFlex","100","fxFlex.gt-xs","65",1,"mt-4"],["fxLayout","row wrap",1,"pl-16"],["fxFlex","100","fxFlex.gt-xs","13",1,""],["fxFlex","100","fxFlex.gt-xs","10",1,""],["fxFlex","100","fxFlex.gt-xs","6",1,""],["fxFlex","100","fxFlex.gt-xs","16",1,""],["fxFlex","100","fxFlex.gt-xs","16",1,"mr-12"],[1,"border-top"],[1,"p-16"],[1,"text-center","font20","mb-0"],["fxLayout","row wrap",1,"mt-0"],["fxFlex","100","fxFlex.gt-xs","40",1,"mt-12"],["fxFlex","100","fxFlex.gt-xs","20",1,"mt-4","text-center"],[1,"font16"],["fxFlex","100","fxFlex.gt-xs","24.5",1,"mt-12"],["fxFlex","100","fxFlex.gt-xs","9",1,"mt-12"],[1,"pl-8"],["fxFlex","100","fxFlex.gt-xs","5",1,"mr-12","mt-12","pl-8"],[4,"ngFor","ngForOf"],["fxFlex","100","fxFlex.gt-xs","80",1,"mt-12"],[1,"f15"],["fxFlex","100","fxFlex.gt-xs","10",1,"mt-12","text-right"],[1,""],["fxFlex","100","fxFlex.gt-xs","10",1,"mt-12","text-center"],["fxFlex","100","fxFlex.gt-xs","11",1,"mt-12"],["fxFlex","100","fxFlex.gt-xs","77",1,"mr-12","mt-12","sun-editor-custom-style"],[2,"display","flex"],[3,"innerHtml"],["fxFlex","100","fxFlex.gt-xs","6",1,"mt-12"],["fxFlex","100","fxFlex.gt-xs","4",1,"text-center","mt-12"],["fxLayout","row wrap",1,"mt-8"],["fxFlex","100","fxFlex.gt-xs","11",1,"mt-8"],["fxFlex","100","fxFlex.gt-xs","88","class","mt-8",4,"ngIf"],["fxLayout","row wrap","class","mt-0",4,"ngIf"],["fxFlex","100","fxFlex.gt-xs","88",1,"mt-8"],["fxFlex","100","fxFlex.gt-xs","10","class","mt-12 mr-8 attachment-img",4,"ngFor","ngForOf"],["fxFlex","100","fxFlex.gt-xs","10",1,"mt-12","mr-8","attachment-img"],["height","68",1,"caption-figure","overlay-figure",3,"src"],[1,"text-center"],["mat-button","","color","primary",1,"bg-download","mb-4","ml-0",3,"click"],[1,"material-icons"],["fxFlex","100","fxFlex.gt-xs","75",1,"mr-12","mt-12","sun-editor-custom-style"],[1,"mr-4",3,"innerHtml"]],template:function(e,t){1&e&&(W.dc(0,"div",0),W.dc(1,"div",1),W.dc(2,"button",2),W.lc("click",(function(e){return t.approve()})),W.cd(3,"Approve"),W.cc(),W.dc(4,"a",3),W.cd(5,"Discard"),W.cc(),W.cc(),W.dc(6,"div",4),W.dc(7,"div",5),W.dc(8,"div",6),W.dc(9,"label"),W.dc(10,"strong"),W.cd(11),W.qc(12,"translate"),W.cc(),W.cc(),W.cc(),W.dc(13,"div",7),W.cd(14),W.cc(),W.dc(15,"div",8),W.dc(16,"label"),W.dc(17,"strong"),W.cd(18),W.qc(19,"translate"),W.cc(),W.cc(),W.cc(),W.dc(20,"div",9),W.dc(21,"label"),W.cd(22),W.cc(),W.cc(),W.dc(23,"div",8),W.dc(24,"label"),W.dc(25,"strong"),W.cd(26),W.qc(27,"translate"),W.cc(),W.cc(),W.cc(),W.dc(28,"div",9),W.dc(29,"label"),W.cd(30),W.cc(),W.cc(),W.dc(31,"div",8),W.dc(32,"label"),W.dc(33,"strong"),W.cd(34),W.qc(35,"translate"),W.cc(),W.cc(),W.cc(),W.dc(36,"div",10),W.dc(37,"label"),W.cd(38),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.Yb(39,"div",11),W.dc(40,"div",12),W.dc(41,"p",13),W.dc(42,"strong"),W.cd(43),W.cc(),W.cc(),W.dc(44,"div",14),W.Yb(45,"div",15),W.dc(46,"div",16),W.dc(47,"label",17),W.dc(48,"strong"),W.cd(49),W.cc(),W.cc(),W.cc(),W.Yb(50,"div",18),W.dc(51,"div",19),W.dc(52,"label",20),W.dc(53,"strong"),W.cd(54),W.qc(55,"translate"),W.cc(),W.cc(),W.cc(),W.dc(56,"div",21),W.dc(57,"label"),W.dc(58,"strong"),W.cd(59),W.cc(),W.cc(),W.cc(),W.cc(),W.ad(60,tn,16,6,"div",22),W.cc()),2&e&&(W.Gb(4),W.yc("routerLink","/teacher/online-exam/list"),W.Gb(7),W.dd(W.rc(12,14,"homework.question.lable.Academic")),W.Gb(3),W.ed(" ",null==t.onlineexam?null:t.onlineexam.academicYearName," "),W.Gb(4),W.dd(W.rc(19,16,"homework.question.lable.Batch")),W.Gb(4),W.dd(null==t.onlineexam?null:t.onlineexam.batchName),W.Gb(4),W.dd(W.rc(27,18,"homework.question.lable.Class")),W.Gb(4),W.dd(null==t.onlineexam?null:t.onlineexam.className),W.Gb(4),W.dd(W.rc(35,20,"homework.question.lable.Section")),W.Gb(4),W.dd(t.selectedSectionIds.join()),W.Gb(5),W.dd(null==t.onlineexam?null:t.onlineexam.title),W.Gb(6),W.dd(null==t.onlineexam?null:t.onlineexam.subjectName),W.Gb(5),W.ed(" ",W.rc(55,22,"homework.question.lable.Total"),""),W.Gb(5),W.dd(t.totalMarks),W.Gb(1),W.yc("ngForOf",null==t.onlineexam?null:t.onlineexam.group))},directives:[xe.c,xe.a,b.a,h.j,f.n,x.a,f.o],pipes:[we.c,he.h],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.f24[_ngcontent-%COMP%]{font-size:24px;margin-left:-10px}.text-center[_ngcontent-%COMP%]{text-align:center!important}.text-right[_ngcontent-%COMP%]{text-align:right!important}.font20[_ngcontent-%COMP%]{font-size:27px}.attachment-img[_ngcontent-%COMP%] .bg-download[_ngcontent-%COMP%]{background:#fff!important;color:#01a39d!important;min-width:35px;line-height:20px!important;padding:0 5px!important}.attachment-img[_ngcontent-%COMP%] .bg-download[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{font-size:18px}.font16[_ngcontent-%COMP%]{font-size:16px}mat-card.mat-card[_ngcontent-%COMP%]{border:1px solid hsla(0,0%,50.2%,.47843137254901963)}.f15[_ngcontent-%COMP%]{font-size:15px;margin-left:8px;margin-bottom:0}"]}),cn);function an(e,t){1&e&&W.Yb(0,"th",41)}var on=function(){return{width:"2%"}};function rn(e,t){if(1&e){var c=W.ec();W.dc(0,"td",42),W.dc(1,"mat-checkbox",43),W.lc("click",(function(e){return W.Sc(c),e.stopPropagation()}))("change",(function(e){W.Sc(c);var n=t.$implicit,a=W.pc();return e?a.selection.toggle(n):null})),W.cc(),W.cc()}if(2&e){var n=t.$implicit,a=W.pc();W.yc("ngStyle",W.Ec(3,on)),W.Gb(1),W.yc("disabled",n.noOfQus==n.noOfPreparedQus)("checked",a.selection.isSelected(n))}}function sn(e,t){1&e&&(W.dc(0,"th",44),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.Gb(1),W.ed(" ",W.rc(2,1,"homework.question.newcreateDetail.lable.Group")," "))}function ln(e,t){1&e&&(W.dc(0,"span"),W.dc(1,"mat-icon",48),W.cd(2,"check"),W.cc(),W.cc())}function dn(e,t){if(1&e){var c=W.ec();W.dc(0,"a",49),W.lc("click",(function(e){W.Sc(c);var t=W.pc().$implicit;return W.pc().edit(t.questionGroupId)})),W.dc(1,"mat-icon",48),W.cd(2,"edit"),W.cc(),W.cc()}}function un(e,t){if(1&e&&(W.dc(0,"td",45),W.cd(1),W.ad(2,ln,3,0,"span",46),W.ad(3,dn,3,0,"a",47),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.ed(" ",c.groupName," "),W.Gb(1),W.yc("ngIf",c.noOfQus==c.noOfPreparedQus),W.Gb(1),W.yc("ngIf",0!=c.noOfPreparedQus)}}var mn=function(){return{width:"4%"}};function pn(e,t){1&e&&(W.dc(0,"th",50),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.yc("ngStyle",W.Ec(4,mn)),W.Gb(1),W.ed(" ",W.rc(2,2,"homework.question.newcreateDetail.lable.Noof"),""))}function hn(e,t){if(1&e&&(W.dc(0,"td",51),W.cd(1),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.ed(" ",c.noOfQus," ")}}var fn=function(){return{width:"8%"}};function gn(e,t){1&e&&(W.dc(0,"th",50),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.yc("ngStyle",W.Ec(4,fn)),W.Gb(1),W.ed(" ",W.rc(2,2,"homework.question.newcreateDetail.lable.preparedQuestions"),""))}function bn(e,t){if(1&e&&(W.dc(0,"td",51),W.cd(1),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.ed(" ",c.noOfPreparedQus," ")}}var xn=function(){return{width:"1%"}};function vn(e,t){1&e&&(W.dc(0,"th",50),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.yc("ngStyle",W.Ec(4,xn)),W.Gb(1),W.ed(" ",W.rc(2,2,"homework.question.newcreateDetail.lable.Marks")," "))}function yn(e,t){if(1&e&&(W.dc(0,"td",51),W.cd(1),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.ed(" ",c.marks," ")}}var kn=function(){return{width:"6%"}};function wn(e,t){1&e&&(W.dc(0,"th",50),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.yc("ngStyle",W.Ec(4,kn)),W.Gb(1),W.ed(" ",W.rc(2,2,"homework.question.newcreateDetail.lable.Isanswer")," "))}function _n(e,t){1&e&&(W.dc(0,"span"),W.Yb(1,"mat-checkbox",52),W.cc())}function Cn(e,t){1&e&&(W.dc(0,"span"),W.Yb(1,"mat-checkbox",53),W.cc()),2&e&&(W.Gb(1),W.yc("checked",!0))}function On(e,t){if(1&e&&(W.dc(0,"td",51),W.ad(1,_n,2,0,"span",46),W.ad(2,Cn,2,1,"span",46),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.yc("ngIf","0"==c.answerOption),W.Gb(1),W.yc("ngIf","1"==c.answerOption)}}function Fn(e,t){1&e&&W.Yb(0,"tr",54)}function qn(e,t){1&e&&W.Yb(0,"tr",55)}var Gn,In,Sn,Mn,Pn,Qn,Nn=function(){return{"font-size":"27px"}},An=((Qn=function(){return _createClass((function e(t,c,n,a,i,o){_classCallCheck(this,e),this.modelService=t,this.router=c,this.loader=n,this.toaster=a,this.activateRoute=i,this.translate=o,this.displayedColumns=["check","group_name","question_count","prepared_question_count","mark","answer"],this.dataSource=new T.o,this.selection=new ze.c(!0,[]),this.id=0,this.selectedSectionIds=[],this.noOfQuesArray=[],this.noOfPreQuesArray=[],o.setDefaultLang("en"),this.onlineexamId=this.activateRoute.snapshot.params.id}),[{key:"ngOnInit",value:function(){this.getOne()}},{key:"getOne",value:function(){var e=this;this.loader.open(),this.modelService.getQusGroupList(this.onlineexamId).subscribe((function(t){"success"==t.keyword?(e.onlineexam=t.onlineexams[0],console.log(e.onlineexam,"this.onlineexam"),e.onlineexam.sections.forEach((function(t){e.selectedSectionIds.push(t.sectionName)})),e.dataSource=new T.o(e.onlineexam.group),e.forEnableFn(),e.loader.close(),e.toaster.present(t.message)):(e.loader.close(),e.toaster.present(t.message))}))}},{key:"forEnableFn",value:function(){var e=this;this.dataSource.data.forEach((function(t){e.noOfQuesArray.push(t.noOfQus),e.noOfPreQuesArray.push(t.noOfPreparedQus)})),this.noOfQues=this.noOfQuesArray.reduce((function(e,t){return Number(e)+Number(t)||0}),0),this.noOfPreQues=this.noOfPreQuesArray.reduce((function(e,t){return Number(e)+Number(t)||0}),0),this.isEnable=this.noOfQues==this.noOfPreQues,console.log(this.isEnable,"isenable")}},{key:"getCheckedValue",value:function(){var e=this,t=[];return this.dataSource.connect().value.forEach((function(c){e.selection.isSelected(c)&&t.push(c)})),t}},{key:"action",value:function(){if(1==this.getCheckedValue().length){var e=this.getCheckedValue()[0].questionGroupId,t=this.getCheckedValue()[0].answerOption;if(console.log(t),"1"==t)var c="/teacher/online-exam/onlineexam-start/".concat(e);else"0"==t&&(c="/teacher/online-exam/onlineexam-start/non-objective/".concat(e));this.router.navigate([c])}else Xe.a.fire({icon:"error",title:"Question",text:"Please Select One Question Group!"})}},{key:"edit",value:function(e){this.router.navigate(["/teacher/online-exam/onlineexam/question-list",this.onlineexamId,e])}},{key:"preview",value:function(){this.router.navigate(["/teacher/online-exam/preview",this.onlineexamId])}},{key:"discard",value:function(){var e=localStorage.getItem("parentPageId");this.router.navigate(["1"==e?"/teacher/online-exam/create":"/teacher/online-exam/edit/".concat(this.onlineexamId)])}},{key:"finish",value:function(){var e=this;1==this.isEnable&&Xe.a.fire({icon:"success",title:"Question Group",text:"Questions created successfully !"}).then((function(t){t.value&&e.router.navigate(["/teacher/online-exam/list"])}))}}])}()).\u0275fac=function(e){return new(e||Qn)(W.Xb(le),W.Xb(h.g),W.Xb(de.a),W.Xb(ue.a),W.Xb(h.a),W.Xb(we.d))},Qn.\u0275cmp=W.Rb({type:Qn,selectors:[["app-create"]],viewQuery:function(e,t){var c;1&e&&W.Yc(N.a,!0),2&e&&W.Nc(c=W.mc())&&(t.paginator=c.first)},decls:115,vars:51,consts:[[1,"create_btn"],["fxLayout","row wrap",1,"mb-12"],["fxFlex","100","fxFlex.gt-xs","35"],["mat-raised-button","","color","primary",1,"btn-primary-bg",3,"disabled","click"],["mat-raised-button","","color","primary",1,"btn-white-bg",3,"disabled","click"],["href","#",1,"pl-12","primary-txt-color",3,"routerLink","click"],["fxFlex","100","fxFlex.gt-xs","65",1,"mt-4"],["fxLayout","row wrap",1,"pl-16"],["fxFlex","100","fxFlex.gt-xs","13",1,""],["fxFlex","100","fxFlex.gt-xs","10",1,""],["fxFlex","100","fxFlex.gt-xs","6",1,""],["fxFlex","100","fxFlex.gt-xs","16",1,""],["fxFlex","100","fxFlex.gt-xs","16",1,"mr-12"],[1,"border-top"],[1,"p-16"],[1,"text-center","font20","mb-0"],[1,"text-center"],["fxLayout","row wrap",1,"mt-8","mb-8","p-4","pl-16","grey-100","border"],["fxFlex","100","fxFlex.gt-xs","14",1,""],[1,"ml-8"],["fxFlex","100","fxFlex.gt-xs","30",1,""],["fxFlex","100","fxFlex.gt-xs","20",1,""],["fxFlex","100","fxFlex.gt-xs","11",1,"text-right"],[1,"table_container"],["mat-table","",1,"full-width",3,"dataSource"],["matColumnDef","check"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","","class","pt-0 pl-16 pr-16 text-center",3,"ngStyle",4,"matCellDef"],["matColumnDef","group_name"],["mat-header-cell","","style","width:25%;",4,"matHeaderCellDef"],["mat-cell","","class","pt-4",4,"matCellDef"],["matColumnDef","question_count"],["mat-header-cell","","class","text-center",3,"ngStyle",4,"matHeaderCellDef"],["mat-cell","","class","pt-4 text-center",4,"matCellDef"],["matColumnDef","prepared_question_count"],["matColumnDef","mark"],["matColumnDef","answer"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"text-center","mt-24",3,"hidden"],["type","button","mat-raised-button","","color","primary",1,"btn-primary-bg","start_btn","text-center",3,"ngStyle","click"],["mat-header-cell",""],["mat-cell","",1,"pt-0","pl-16","pr-16","text-center",3,"ngStyle"],[3,"disabled","checked","click","change"],["mat-header-cell","",2,"width","25%"],["mat-cell","",1,"pt-4"],[4,"ngIf"],["matTooltip","Edit",3,"click",4,"ngIf"],[1,"edit_btn"],["matTooltip","Edit",3,"click"],["mat-header-cell","",1,"text-center",3,"ngStyle"],["mat-cell","",1,"pt-4","text-center"],["disabled",""],["disabled","",3,"checked"],["mat-header-row",""],["mat-row",""]],template:function(e,t){1&e&&(W.dc(0,"div",0),W.dc(1,"div",1),W.dc(2,"div",2),W.dc(3,"button",3),W.lc("click",(function(e){return t.finish()})),W.cd(4),W.qc(5,"translate"),W.cc(),W.dc(6,"button",4),W.lc("click",(function(e){return t.preview()})),W.cd(7),W.qc(8,"translate"),W.cc(),W.dc(9,"a",5),W.lc("click",(function(e){return t.discard()})),W.cd(10),W.qc(11,"translate"),W.cc(),W.cc(),W.dc(12,"div",6),W.dc(13,"div",7),W.dc(14,"div",8),W.dc(15,"label"),W.dc(16,"strong"),W.cd(17),W.qc(18,"translate"),W.cc(),W.cc(),W.cc(),W.dc(19,"div",9),W.cd(20),W.cc(),W.dc(21,"div",10),W.dc(22,"label"),W.dc(23,"strong"),W.cd(24),W.qc(25,"translate"),W.cc(),W.cc(),W.cc(),W.dc(26,"div",11),W.dc(27,"label"),W.cd(28),W.cc(),W.cc(),W.dc(29,"div",10),W.dc(30,"label"),W.dc(31,"strong"),W.cd(32),W.qc(33,"translate"),W.cc(),W.cc(),W.cc(),W.dc(34,"div",11),W.dc(35,"label"),W.cd(36),W.cc(),W.cc(),W.dc(37,"div",10),W.dc(38,"label"),W.dc(39,"strong"),W.cd(40),W.qc(41,"translate"),W.cc(),W.cc(),W.cc(),W.dc(42,"div",12),W.dc(43,"label"),W.cd(44),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.Yb(45,"div",13),W.dc(46,"div",14),W.dc(47,"p",15),W.dc(48,"strong"),W.cd(49),W.cc(),W.cc(),W.dc(50,"h3",16),W.dc(51,"strong"),W.cd(52),W.cc(),W.cc(),W.dc(53,"div",17),W.dc(54,"div",18),W.dc(55,"label"),W.dc(56,"strong"),W.cd(57,"Start Date "),W.cc(),W.dc(58,"span",19),W.cd(59),W.qc(60,"displayDate"),W.cc(),W.cc(),W.cc(),W.dc(61,"div",18),W.dc(62,"label"),W.dc(63,"strong"),W.cd(64,"Start Time "),W.cc(),W.dc(65,"span",19),W.cd(66),W.qc(67,"displayTime"),W.cc(),W.cc(),W.cc(),W.dc(68,"div",9),W.dc(69,"label"),W.dc(70,"strong"),W.cd(71,"End Time "),W.cc(),W.dc(72,"span",19),W.cd(73),W.qc(74,"displayTime"),W.cc(),W.cc(),W.cc(),W.Yb(75,"div",20),W.dc(76,"div",21),W.dc(77,"label"),W.dc(78,"strong"),W.cd(79,"Last Submission Date "),W.cc(),W.dc(80,"span",19),W.cd(81),W.qc(82,"displayDate"),W.cc(),W.cc(),W.cc(),W.dc(83,"div",22),W.dc(84,"label"),W.dc(85,"strong"),W.cd(86,"Time "),W.cc(),W.dc(87,"span",19),W.cd(88),W.qc(89,"displayTime"),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(90,"div",23),W.dc(91,"table",24),W.bc(92,25),W.ad(93,an,1,0,"th",26),W.ad(94,rn,2,4,"td",27),W.ac(),W.bc(95,28),W.ad(96,sn,3,3,"th",29),W.ad(97,un,4,3,"td",30),W.ac(),W.bc(98,31),W.ad(99,pn,3,5,"th",32),W.ad(100,hn,2,1,"td",33),W.ac(),W.bc(101,34),W.ad(102,gn,3,5,"th",32),W.ad(103,bn,2,1,"td",33),W.ac(),W.bc(104,35),W.ad(105,vn,3,5,"th",32),W.ad(106,yn,2,1,"td",33),W.ac(),W.bc(107,36),W.ad(108,wn,3,5,"th",32),W.ad(109,On,3,2,"td",33),W.ac(),W.ad(110,Fn,1,0,"tr",37),W.ad(111,qn,1,0,"tr",38),W.cc(),W.cc(),W.dc(112,"div",39),W.dc(113,"button",40),W.lc("click",(function(e){return t.action()})),W.cd(114,"Start"),W.cc(),W.cc(),W.cc(),W.cc()),2&e&&(W.Gb(3),W.yc("disabled",!t.isEnable),W.Gb(1),W.ed(" ",W.rc(5,26,"homework.question.button.finish")," "),W.Gb(2),W.yc("disabled",0==t.noOfPreQues),W.Gb(1),W.ed(" ",W.rc(8,28,"homework.question.button.preview")," "),W.Gb(2),W.yc("routerLink","/teacher/online-exam/create"),W.Gb(1),W.dd(W.rc(11,30,"homework.question.button.discard")),W.Gb(7),W.dd(W.rc(18,32,"homework.question.newcreateDetail.lable.Academic")),W.Gb(3),W.ed(" ",null==t.onlineexam?null:t.onlineexam.academicYearName," "),W.Gb(4),W.dd(W.rc(25,34,"homework.question.newcreateDetail.lable.Batch")),W.Gb(4),W.dd(null==t.onlineexam?null:t.onlineexam.batchName),W.Gb(4),W.dd(W.rc(33,36,"homework.question.newcreateDetail.lable.Class")),W.Gb(4),W.dd(null==t.onlineexam?null:t.onlineexam.className),W.Gb(4),W.dd(W.rc(41,38,"homework.question.newcreateDetail.lable.Section")),W.Gb(4),W.dd(t.selectedSectionIds.join()),W.Gb(5),W.dd(null==t.onlineexam?null:t.onlineexam.title),W.Gb(3),W.dd(null==t.onlineexam?null:t.onlineexam.subjectName),W.Gb(7),W.ed(" ",W.rc(60,40,null==t.onlineexam?null:t.onlineexam.startDate),""),W.Gb(7),W.dd(W.rc(67,42,null==t.onlineexam?null:t.onlineexam.startTime)),W.Gb(7),W.dd(W.rc(74,44,null==t.onlineexam?null:t.onlineexam.endTime)),W.Gb(8),W.dd(W.rc(82,46,null==t.onlineexam?null:t.onlineexam.submissionDate)),W.Gb(7),W.dd(W.rc(89,48,null==t.onlineexam?null:t.onlineexam.submissionTime)),W.Gb(3),W.yc("dataSource",t.dataSource),W.Gb(19),W.yc("matHeaderRowDef",t.displayedColumns),W.Gb(1),W.yc("matRowDefColumns",t.displayedColumns),W.Gb(1),W.yc("hidden",1==t.isEnable),W.Gb(1),W.yc("ngStyle",W.Ec(50,Nn)))},directives:[xe.c,xe.a,b.a,h.j,T.n,T.c,T.i,T.b,T.k,T.m,f.p,_t.b,T.h,T.a,v.a,f.o,w.a,A.a,T.j,T.l],pipes:[we.c,he.a,he.c],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.row[_ngcontent-%COMP%]{margin-top:-10px}.f24[_ngcontent-%COMP%]{font-size:24px;margin-left:-10px}.text-center[_ngcontent-%COMP%]{text-align:center!important}.text-right[_ngcontent-%COMP%]{text-align:right!important}.font20[_ngcontent-%COMP%]{font-size:27px}.font16[_ngcontent-%COMP%]{font-size:16px}mat-card.mat-card[_ngcontent-%COMP%]{border:1px solid hsla(0,0%,50.2%,.47843137254901963)}.f15[_ngcontent-%COMP%]{font-size:15px;margin-left:8px;margin-bottom:0}.start_btn[_ngcontent-%COMP%]{line-height:30px!important;padding:5px 17px!important;min-width:120px!important;font-size:21px}.check_btn[_ngcontent-%COMP%]{color:green;top:4px;left:5px;font-size:21px;height:36px}.check_btn[_ngcontent-%COMP%], .edit_btn[_ngcontent-%COMP%]{position:relative;font-weight:700}.edit_btn[_ngcontent-%COMP%]{top:0;left:7px;font-size:11px;height:20px;width:20px;background:rgba(0,0,255,.8313725490196079);color:#fff;border-radius:50%;text-align:center;padding:0;line-height:19px;cursor:pointer;margin-right:2px}"]}),Qn),Dn=((Pn=function(){return _createClass((function e(t){_classCallCheck(this,e),this.adapterQuestions=t}),[{key:"adapt",value:function(e){var t,c,n,a,i,o,r,s=this,l=[];return e.questions&&(null===(t=e)||void 0===t||t.questions.forEach((function(e){l.push(s.adapterQuestions.adapt(e))}))),this.obj=new V.b,this.obj.questionGroupId=null!=(c=e.question_group_id)?c:"",this.obj.groupName=null!=(n=e.group_name)?n:"",this.obj.noOfQuestions=null!=(a=e.no_of_questions)?a:"",this.obj.marks=null!=(i=e.marks)?i:"",this.obj.eachMark=null!=(o=e.each_mark)?o:"",this.obj.answerOption=null!=(r=e.answer_option)?r:"",this.obj.questions=null!=l?l:[],this.obj}}])}()).\u0275fac=function(e){return new(e||Pn)(W.hc(ne))},Pn.\u0275prov=W.Tb({token:Pn,factory:Pn.\u0275fac,providedIn:"root"}),Pn),Tn=((Mn=function(){return _createClass((function e(t){_classCallCheck(this,e),this.adapter=t}),[{key:"adapt",value:function(e){var t,c,n,a,i,o,r,s,l,d,u,m,p,h,f=this;console.log(e,"respose");var g=[];return null===(n=null===(c=null===(t=e)||void 0===t?void 0:t.data)||void 0===c?void 0:c.onlineexam_question_group)||void 0===n||n.forEach((function(e){g.push(f.adapter.adapt(e))})),{keyword:(i=null===(a=e)||void 0===a?void 0:a.keyword,null!=i?i:0),message:(r=null===(o=e)||void 0===o?void 0:o.message,null!=r?r:""),quesans:g,subjectName:e.data.subject_name,title:e.data.title,studOnlineexamId:e.data.stud_onlineexam_id,studentName:(s=e.data.student_name,null!=s?s:""),className:(l=e.data.class_name,null!=l?l:""),sectionName:(d=e.data.section_name,null!=d?d:""),pageSize:(m=null===(u=e)||void 0===u?void 0:u.count,null!=m?m:0),page:(h=null===(p=e)||void 0===p?void 0:p.page,null!=h?h:0)}}}])}()).\u0275fac=function(e){return new(e||Mn)(W.hc(Dn))},Mn.\u0275prov=W.Tb({token:Mn,factory:Mn.\u0275fac,providedIn:"root"}),Mn),jn=((Sn=function(){return _createClass((function e(t,c){_classCallCheck(this,e),this.adapterQuesAttach=t,this.adapterStudAttach=c}),[{key:"adapt",value:function(e){var t,c,n,a,i,o,r,s,l,d,u,m,p,h=this,f=[];e.assignment_attachment&&(null===(t=e)||void 0===t||t.assignment_attachment.forEach((function(e){f.push(h.adapterQuesAttach.adapt(e))})));var g=[];return e.student_attachment&&(null===(c=e)||void 0===c||c.student_attachment.forEach((function(e){g.push(h.adapterStudAttach.adapt(e))}))),this.obj=new Z.a,this.obj.homeWorkResultId=e.homework_result_id,this.obj.description=null!=(n=e.description)?n:"",this.obj.answer=null!=(a=e.answer)?a:"",this.obj.mark=null!=(i=e.mark)?i:"",this.obj.subjectName=null!=(o=e.subject_name)?o:"",this.obj.title=null!=(r=e.title)?r:"",this.obj.studentName=null!=(s=e.student_name)?s:"",this.obj.className=null!=(l=e.class_name)?l:"",this.obj.sectionName=null!=(d=e.section_name)?d:"",this.obj.lastSubmissionDate=null!=(u=e.last_submission_date)?u:"",this.obj.studentHomeworkId=null!=(m=e.stud_homework_id)?m:"",this.obj.lastSubmittedDate=null!=(p=e.student_submitted_date)?p:"",this.obj.quesAttachment=f,this.obj.studAttachment=g,this.obj}}])}()).\u0275fac=function(e){return new(e||Sn)(W.hc(te),W.hc(ce))},Sn.\u0275prov=W.Tb({token:Sn,factory:Sn.\u0275fac,providedIn:"root"}),Sn),Ln=((In=function(){return _createClass((function e(t){_classCallCheck(this,e),this.adapter=t}),[{key:"adapt",value:function(e){var t,c,n,a,i,o,r,s,l=this,d=[];return e.data.forEach((function(e){d.push(l.adapter.adapt(e))})),{keyword:(c=null===(t=e)||void 0===t?void 0:t.keyword,null!=c?c:0),message:(a=null===(n=e)||void 0===n?void 0:n.message,null!=a?a:""),assignments:d,pageSize:(o=null===(i=e)||void 0===i?void 0:i.count,null!=o?o:0),page:(s=null===(r=e)||void 0===r?void 0:r.page,null!=s?s:0)}}}])}()).\u0275fac=function(e){return new(e||In)(W.hc(jn))},In.\u0275prov=W.Tb({token:In,factory:In.\u0275fac,providedIn:"root"}),In),En=((Gn=function(){return _createClass((function e(t,c,n){_classCallCheck(this,e),this.adapter=t,this.adapterAssignment=c,this.apiService=n}),[{key:"save",value:function(e){return this.apiService.post("onlineexam/save_result",e)}},{key:"saveAssignment",value:function(e){return this.apiService.post("onlineexam/saveResultAssignment",e)}},{key:"getEvaluate",value:function(e,t){var c=this;return this.apiService.get("onlineexamQn/test_list/".concat(e,"/").concat(t)).pipe(Object($.a)((function(e){return c.adapter.adapt(e)})))}},{key:"getAssignment",value:function(e,t){var c=this;return this.apiService.get("onlineexam/evaluateAssignment/".concat(e,"/").concat(t)).pipe(Object($.a)((function(e){return c.adapterAssignment.adapt(e)})))}},{key:"deleteEvaluatedAttach",value:function(e){return this.apiService.post("onlineexam/removeEvaluateAttach",e)}},{key:"getEvaluateAttach",value:function(e){return this.apiService.get("onlineexam/getEvaluateFile/".concat(e))}}])}()).\u0275fac=function(e){return new(e||Gn)(W.hc(Tn),W.hc(Ln),W.hc(R.a))},Gn.\u0275prov=W.Tb({token:Gn,factory:Gn.\u0275fac,providedIn:"root"}),Gn),zn=c("hVI1");function Yn(e,t){if(1&e&&(W.dc(0,"mat-radio-button",44),W.Yb(1,"p",45),W.qc(2,"safeHtml"),W.cc()),2&e){var c=t.$implicit,n=W.pc(2).$implicit,a=W.pc(3);W.zc("value",c.isAnswer),W.yc("checked",a.isChecked(n.studentOptionId,c)),W.Gb(1),W.yc("innerHtml",W.rc(2,3,c.optionName),W.Tc)}}function Xn(e,t){if(1&e&&(W.dc(0,"div",41),W.dc(1,"mat-radio-group",42),W.ad(2,Yn,3,5,"mat-radio-button",43),W.cc(),W.cc()),2&e){var c=W.pc().$implicit;W.Gb(2),W.yc("ngForOf",c.quesOptions)}}function Hn(e,t){1&e&&(W.dc(0,"div",46),W.dc(1,"label"),W.dc(2,"strong"),W.cd(3," Attachment"),W.cc(),W.cc(),W.cc())}function Rn(e,t){if(1&e){var c=W.ec();W.dc(0,"div",50),W.Yb(1,"img",51),W.dc(2,"div",52),W.dc(3,"button",53),W.lc("click",(function(e){W.Sc(c);var n=t.$implicit;return W.pc(5).download(null==n?null:n.attachmentId,null==n?null:n.attachment,"admin")})),W.dc(4,"i",54),W.cd(5," cloud_download "),W.cc(),W.cc(),W.cc(),W.cc()}if(2&e){var n=t.$implicit;W.Gb(1),W.zc("src",null==n?null:n.attachment,W.Vc)}}function Bn(e,t){if(1&e&&(W.dc(0,"div",47),W.dc(1,"div",48),W.ad(2,Rn,6,1,"div",49),W.cc(),W.cc()),2&e){var c=W.pc().$implicit;W.Gb(2),W.yc("ngForOf",null==c?null:c.quesAttachment)}}function $n(e,t){if(1&e&&(W.dc(0,"div",48),W.dc(1,"div",55),W.dc(2,"label"),W.dc(3,"strong"),W.cd(4,"Answer "),W.cc(),W.dc(5,"strong",56),W.cd(6,":"),W.cc(),W.cc(),W.cc(),W.Yb(7,"div",57),W.qc(8,"safeHtml"),W.cc()),2&e){var c=W.pc().$implicit,n=W.pc(3);W.Gb(7),W.yc("innerHtml",W.rc(8,1,n.getStudentAnswer(c.quesOptions)),W.Tc)}}function Vn(e,t){if(1&e&&(W.dc(0,"div",48),W.dc(1,"div",58),W.dc(2,"label"),W.dc(3,"strong"),W.cd(4,"Answer "),W.cc(),W.dc(5,"strong",59),W.cd(6,":"),W.cc(),W.cc(),W.cc(),W.Yb(7,"div",57),W.qc(8,"safeHtml"),W.cc()),2&e){var c=W.pc().$implicit;W.Gb(7),W.yc("innerHtml",W.rc(8,1,c.studentAnswer),W.Tc)}}function Un(e,t){if(1&e&&(W.dc(0,"div",48),W.dc(1,"div",58),W.dc(2,"label"),W.dc(3,"strong"),W.cd(4,"Answer Key "),W.cc(),W.dc(5,"strong",56),W.cd(6,":"),W.cc(),W.cc(),W.cc(),W.Yb(7,"div",57),W.qc(8,"safeHtml"),W.cc()),2&e){var c=W.pc().$implicit;W.Gb(7),W.yc("innerHtml",W.rc(8,1,c.answer),W.Tc)}}function Jn(e,t){1&e&&(W.dc(0,"div",60),W.dc(1,"label",61),W.dc(2,"strong"),W.cd(3,"Original Attachment"),W.cc(),W.cc(),W.cc())}function Wn(e,t){if(1&e){var c=W.ec();W.dc(0,"div",50),W.Yb(1,"img",64),W.dc(2,"div",65),W.dc(3,"button",53),W.lc("click",(function(e){W.Sc(c);var n=t.$implicit;return W.pc(5).download(null==n?null:n.studAssignmentId,null==n?null:n.attachment,"student")})),W.dc(4,"i",54),W.cd(5," cloud_download "),W.cc(),W.cc(),W.dc(6,"a",66),W.lc("click",(function(e){W.Sc(c);var n=t.$implicit,a=t.index,i=W.pc(2).index,o=W.pc().index;return W.pc(2).openClick(null==n?null:n.studAssignmentId,o,i,a)})),W.cd(7,"Evaluate"),W.cc(),W.cc(),W.cc()}if(2&e){var n=t.$implicit;W.Gb(1),W.zc("src",null==n?null:n.attachment,W.Vc)}}function Kn(e,t){if(1&e&&(W.dc(0,"div",62),W.ad(1,Wn,8,1,"div",63),W.cc()),2&e){var c=W.pc().$implicit;W.Gb(1),W.yc("ngForOf",null==c?null:c.studAttachment)}}function Zn(e,t){1&e&&(W.dc(0,"div",67),W.dc(1,"label",61),W.dc(2,"strong"),W.cd(3,"Evaluated Attachment"),W.cc(),W.cc(),W.cc())}function ea(e,t){if(1&e){var c=W.ec();W.dc(0,"a",65),W.dc(1,"mat-icon",71),W.lc("click",(function(e){W.Sc(c);var t=W.pc().$implicit,n=W.pc(2).$implicit;return W.pc(3).deleteEvaluatedAttach(n,null==t?null:t.studAssignmentId)})),W.cd(2,"close "),W.cc(),W.cc()}}function ta(e,t){if(1&e&&W.Yb(0,"img",64),2&e){var c=W.pc().$implicit;W.zc("src",null==c?null:c.evaluateAttachment,W.Vc)}}function ca(e,t){if(1&e){var c=W.ec();W.dc(0,"div",52),W.dc(1,"button",53),W.lc("click",(function(e){W.Sc(c);var t=W.pc().$implicit;return W.pc(5).download(null==t?null:t.studAssignmentId,null==t?null:t.evaluateAttachment,"evaluate")})),W.dc(2,"i",54),W.cd(3," cloud_download "),W.cc(),W.cc(),W.cc()}}function na(e,t){if(1&e&&(W.dc(0,"div",50),W.ad(1,ea,3,0,"a",68),W.ad(2,ta,1,1,"img",69),W.ad(3,ca,4,0,"div",70),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.yc("ngIf",""!=(null==c?null:c.evaluateAttachment)),W.Gb(1),W.yc("ngIf",""!=(null==c?null:c.evaluateAttachment)),W.Gb(1),W.yc("ngIf",""!=(null==c?null:c.evaluateAttachment))}}function aa(e,t){if(1&e&&(W.dc(0,"div",62),W.ad(1,na,4,3,"div",63),W.cc()),2&e){var c=W.pc().$implicit;W.Gb(1),W.yc("ngForOf",null==c?null:c.studAttachment)}}function ia(e,t){if(1&e){var c=W.ec();W.dc(0,"div",20),W.dc(1,"div",26),W.dc(2,"label"),W.dc(3,"strong",27),W.Yb(4,"span",28),W.cd(5,".\xa0"),W.Yb(6,"span",28),W.qc(7,"safeHtml"),W.cc(),W.cc(),W.cc(),W.dc(8,"div",29),W.dc(9,"label"),W.cd(10),W.cc(),W.cc(),W.dc(11,"div",30),W.dc(12,"mat-form-field",31),W.dc(13,"input",32),W.lc("click",(function(e){W.Sc(c);var n=t.$implicit;return W.pc(3).setQuesMark(n.questionMark)}))("keyup",(function(e){W.Sc(c);var n=t.index,a=W.pc().index;return W.pc(2).getmarks(e,n,a)})),W.cc(),W.cc(),W.cc(),W.ad(14,Xn,3,1,"div",33),W.ad(15,Hn,4,0,"div",34),W.ad(16,Bn,3,1,"div",35),W.dc(17,"div",36),W.ad(18,$n,9,3,"div",37),W.ad(19,Vn,9,3,"div",37),W.ad(20,Un,9,3,"div",37),W.cc(),W.ad(21,Jn,4,0,"div",38),W.ad(22,Kn,2,1,"div",39),W.ad(23,Zn,4,0,"div",40),W.ad(24,aa,2,1,"div",39),W.cc()}if(2&e){var n=t.$implicit,a=t.index;W.Gb(4),W.zc("innerHtml",a+1,W.Tc),W.Gb(2),W.yc("innerHtml",W.rc(7,15,n.questionName),W.Tc),W.Gb(4),W.ed("(",n.questionMark,")"),W.Gb(3),W.zc("value",""===(null==n?null:n.studMark)?"":"non-objective"==n.type&&0==(null==n?null:n.studMark)?"":null==n?null:n.studMark),W.yc("disabled","non-objective"!=n.type),W.Gb(1),W.yc("ngIf",0!=n.quesOptions.length),W.Gb(1),W.yc("ngIf",0!=(null==n?null:n.quesAttachment.length)),W.Gb(1),W.yc("ngIf",0!=(null==n?null:n.quesAttachment.length)),W.Gb(2),W.yc("ngIf","objective"==n.type),W.Gb(1),W.yc("ngIf","non-objective"==n.type),W.Gb(1),W.yc("ngIf","non-objective"==n.type),W.Gb(1),W.yc("ngIf",0!=(null==n?null:n.studAttachment.length)),W.Gb(1),W.yc("ngIf",0!=(null==n?null:n.studAttachment.length)),W.Gb(1),W.yc("ngIf",0!=(null==n?null:n.studAttachment.length)),W.Gb(1),W.yc("ngIf",0!=(null==n?null:n.studAttachment.length))}}function oa(e,t){if(1&e&&(W.dc(0,"div",19),W.dc(1,"div",20),W.dc(2,"div",21),W.dc(3,"label"),W.dc(4,"strong"),W.cd(5),W.cc(),W.cc(),W.cc(),W.dc(6,"div",22),W.dc(7,"label"),W.dc(8,"strong"),W.cd(9,"Marks"),W.cc(),W.cc(),W.cc(),W.dc(10,"div",23),W.dc(11,"label"),W.dc(12,"strong"),W.cd(13),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(14,"div"),W.dc(15,"mat-card",24),W.ad(16,ia,25,17,"div",25),W.cc(),W.cc(),W.cc()),2&e){var c=t.$implicit;W.Gb(5),W.dd(c.groupName),W.Gb(8),W.dd(c.marks),W.Gb(3),W.yc("ngForOf",c.questions)}}function ra(e,t){if(1&e&&(W.dc(0,"div",7),W.dc(1,"div",8),W.dc(2,"div",9),W.dc(3,"h2",10),W.dc(4,"strong"),W.cd(5),W.cc(),W.cc(),W.dc(6,"h4",11),W.dc(7,"strong"),W.cd(8),W.cc(),W.cc(),W.dc(9,"div",12),W.dc(10,"div",13),W.dc(11,"label"),W.dc(12,"strong"),W.cd(13," Total Marks : "),W.dc(14,"span"),W.cd(15),W.qc(16,"number"),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(17,"div",14),W.dc(18,"label",15),W.dc(19,"strong"),W.cd(20," Actual Marks : "),W.dc(21,"span",16),W.cd(22),W.qc(23,"number"),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.Yb(24,"div",17),W.ad(25,oa,17,3,"div",18),W.cc(),W.cc(),W.cc()),2&e){var c=W.pc();W.Gb(5),W.dd(c.title),W.Gb(3),W.dd(c.subjectName),W.Gb(7),W.dd(W.sc(16,5,c.sum,"1.2-2")),W.Gb(7),W.dd(W.sc(23,8,c.actualMarks,"1.2-2")),W.Gb(3),W.yc("ngForOf",c.evaluates)}}function sa(e,t){1&e&&(W.dc(0,"div"),W.dc(1,"p",52),W.dc(2,"b"),W.cd(3,"No Data Found..."),W.cc(),W.cc(),W.cc())}var la,da,ua=((da=function(){return _createClass((function e(t,c,n,a,i,o,r,s){_classCallCheck(this,e),this.modelService=t,this.activateRoute=c,this.toaster=n,this.loader=a,this.apiService=i,this.fb=o,this.router=r,this.dialog=s,this.evaluates=[],this.totalMarks=[],this.questionIds=[],this.obtainedMarks=[],this.actualMarks=0,this.questionOptions=[],this.homeWorkId=this.activateRoute.snapshot.params.onlineexamId,this.studentId=this.activateRoute.snapshot.params.studentId}),[{key:"ngOnInit",value:function(){this.getEvaluate(),this.form()}},{key:"form",value:function(){this.markForm=new g.j({})}},{key:"getEvaluate",value:function(){var e=this;this.loader.open(),this.modelService.getEvaluate(this.studentId,this.homeWorkId).subscribe((function(t){"success"==t.keyword?(e.evaluates=t.quesans,console.log(e.evaluates,"this.evaluates"),e.subjectName=t.subjectName,e.title=t.title,e.studOnlineexamId=t.studOnlineexamId,e.studentName=t.studentName,e.className=t.className,e.sectionName=t.sectionName,e.commonLoops(),e.sum=e.totalMarks.reduce((function(e,t){return Number(e)+Number(t)||0}),0),e.loader.close(),e.toaster.present(t.message,""),e.getObMarks()):(e.loader.close(),e.toaster.present(t.message,""))}))}},{key:"commonLoops",value:function(){var e=this;this.evaluates.forEach((function(t){e.totalMarks.push(t.marks),t.questions.forEach((function(t){e.questionIds.push(t.questionId),t.quesOptions.forEach((function(t){e.questionOptions.push(t)}))}))}))}},{key:"setQuesMark",value:function(e){this.questionMark=e}},{key:"getmarks",value:function(e,t,c){var n=this.evaluates[0].questions.length;0==c?(this.obtainedMarks[t]=e.target.value,this.validateMarks(e,t,c,this.obtainedMarks[t])):(this.obtainedMarks[t+n]=e.target.value,this.validateMarks(e,t,c,this.obtainedMarks[t+n])),this.actualMarks=this.obtainedMarks.reduce((function(e,t){return Number(e)+Number(t)||0}),0)}},{key:"validateMarks",value:function(e,t,c,n){if(console.log(n,this.questionMark),Number(n)<=this.questionMark){this.evaluates[c].questions[t].studMark=n;var a=this.evaluates[c].questions[t].studMark}else this.evaluates[c].questions[t].studMark=0,e.target.value="",console.log(this.evaluates[c].questions[t].studMark,"000"),a=this.evaluates[c].questions[t].studMark,e.preventDefault();var i=this.evaluates[0].questions.length;0==c?this.obtainedMarks[t]=a:this.obtainedMarks[t+i]=a,this.actualMarks=this.obtainedMarks.reduce((function(e,t){return Number(e)+Number(t)||0}),0)}},{key:"save",value:function(){var e=this;if(this.obtainedMarks.length==this.questionIds.length)if(this.actualMarks<=this.sum){this.loader.open();var t=new FormData;t.append("id",this.homeWorkId),t.append("stud_onlineexam_id",this.studOnlineexamId),t.append("question_id",JSON.stringify(this.questionIds)),t.append("obtained_mark",JSON.stringify(this.obtainedMarks)),t.append("actual_mark",JSON.stringify(this.actualMarks)),this.modelService.save(t).subscribe((function(t){"success"==t.keyword&&(e.router.navigate(["/teacher/online-exam/student-list",e.homeWorkId]),e.loader.close(),e.toaster.present(t.message,""))}))}else Xe.a.fire({icon:"error",title:"Evaluate",text:"The given mark is greater than total mark!"})}},{key:"isChecked",value:function(e,t){return t.optionId==e}},{key:"isDisabled",value:function(e){return!!this.questionOptions.find((function(t){return t.optionId==e&&"1"==t.isAnswer}))}},{key:"getStudentAnswer",value:function(e){var t;return null===(t=e.find((function(e){return"1"==e.isAnswer})))||void 0===t?void 0:t.optionName}},{key:"getObMarks",value:function(){var e=this;setTimeout((function(){var t=document.querySelectorAll(".eachMark");console.log(t,"markInputs"),t.forEach((function(t){e.obtainedMarks.push(t.value)})),e.actualMarks=e.obtainedMarks.reduce((function(e,t){return Number(e)+Number(t)||0}),0),console.log(e.obtainedMarks,"this.obtainedMarks")}),1e3)}},{key:"getValidMark",value:function(e,t){}},{key:"validateMark",value:function(e,t,c,n){Number(e.target.value)<=n?(this.evaluates[c].questions[t].studMark=e.target.value,console.log("blur")):(this.evaluates[c].questions[t].studMark=0,console.log("blur","1234"),console.log(this.evaluates[c].questions[t].studMark,"11"))}},{key:"discard",value:function(){this.router.navigate(["/teacher/online-exam/student-list/".concat(this.homeWorkId)])}},{key:"preventInput",value:function(e){var t=this.capacity;t>=5&&(e.preventDefault(),this.capacity=parseInt(t.toString().substring(0,2)))}},{key:"download",value:function(e,t,c){var n=this;if("admin"==c)var a="onlineexam/downloadQuesAttachment/";else"student"==c?a="onlineexamQn/downloadStudentAttach/":"evaluate"==c&&(a="onlineexam/DownloadResultQuestion/");this.apiService.downloadFile("".concat(a).concat(e),{fileName:t}).subscribe((function(e){switch(e.type){case B.d.DownloadProgress:break;case B.d.Response:console.log(e);var c=new Blob([e.body],{type:e.body.type}),n=document.createElement("a");n.setAttribute("style","display:none;"),document.body.appendChild(n),n.download=t,n.href=URL.createObjectURL(c),n.target="_blank",n.click(),document.body.removeChild(n)}}),(function(e){n.toaster.present("could not download")}))}},{key:"deleteEvaluatedAttach",value:function(e,t){var c=this;this.loader.open();var n=new FormData;n.append("onlineexam_result_attachment_id",t),this.modelService.deleteEvaluatedAttach(n).subscribe((function(n){"success"==n.keyword?(e.studAttachment.forEach((function(e){e.studAssignmentId==t&&(e.evaluateAttachment="")})),c.loader.close(),c.toaster.present(n.message,"")):(c.loader.close(),c.toaster.present(n.message,""))}))}},{key:"openClick",value:function(e,t,c,n){var a=this;console.log(e,"studAssignmentId"),localStorage.setItem("module","onlineexam"),this.dialog.open(zn.a,{width:"100%",data:e,disableClose:!0}).afterClosed().subscribe((function(i){a.modelService.getEvaluateAttach(e).subscribe((function(e){var i,o;console.log(null===(i=e.data)||void 0===i?void 0:i.evaluate_attach,"evalaute attach "),localStorage.removeItem("module"),a.evaluates[t].questions[c].studAttachment[n].evaluateAttachment=null===(o=e.data)||void 0===o?void 0:o.evaluate_attach,console.log(a.evaluates[t].questions[c],"this.evaluates[evindex].questions[i]")}))}))}}])}()).\u0275fac=function(e){return new(e||da)(W.Xb(En),W.Xb(h.a),W.Xb(ue.a),W.Xb(de.a),W.Xb(R.a),W.Xb(g.f),W.Xb(h.g),W.Xb(Ke.b))},da.\u0275cmp=W.Rb({type:da,selectors:[["app-create"]],viewQuery:function(e,t){var c;1&e&&W.Yc(N.a,!0),2&e&&W.Nc(c=W.mc())&&(t.paginator=c.first)},decls:12,vars:5,consts:[[1,"create_btn"],["mat-raised-button","","color","primary",1,"btn-primary-bg",3,"click"],[1,"pl-8","primary-txt-color",3,"click"],[1,"float-right","f15"],[1,"pl-28","pr-24"],["class","detail-view",4,"ngIf"],[4,"ngIf"],[1,"detail-view"],["fxLayout","row wrap",1,""],["fxFlex","100","fxFlex.gt-xs","100"],[1,"text-center","mt-8"],[1,"text-center","mb-4"],["fxLayout","row wrap",1,"mt-0","pt-0","pl-16"],["fxFlex","100","fxFlex.gt-xs","50",1,"mt-8"],["fxFlex","100","fxFlex.gt-xs","49",1,"mt-8","text-right"],[1,"f16"],["id","actualMark"],[1,"border-top"],["class","p-16 pt-0",4,"ngFor","ngForOf"],[1,"p-16","pt-0"],["fxLayout","row wrap",1,"mt-0"],["fxFlex","100","fxFlex.gt-xs","90",1,"mt-12"],["fxFlex","100","fxFlex.gt-xs","5",1,"mt-12","text-center"],["fxFlex","100","fxFlex.gt-xs","5",1,"mt-12","text-right"],[1,"m-0"],["fxLayout","row wrap","class","mt-0",4,"ngFor","ngForOf"],["fxFlex","100","fxFlex.gt-xs","90",1,"mt-12","sun-editor-custom-style"],[2,"display","flex"],[3,"innerHtml"],["fxFlex","100","fxFlex.gt-xs","5",1,"mt-12","text-center",2,"height","20px"],["fxFlex","100","fxFlex.gt-xs","5",1,"mt-12",2,"height","20px"],["appearance","fill",1,"full-width"],["type","text","matInput","","placeholder","",1,"text-right","eachMark",3,"disabled","value","click","keyup"],["fxFlex","100","fxFlex.gt-xs","100","class","sun-editor-custom-style",4,"ngIf"],["fxFlex","100","fxFlex.gt-xs","8","class","mt-4",4,"ngIf"],["fxFlex","100","fxFlex.gt-xs","80","class","",4,"ngIf"],["fxFlex","100","fxFlex.gt-xs","100",1,"mt-8","sun-editor-custom-style"],["fxLayout","row wrap",4,"ngIf"],["fxFlex","100","fxFlex.gt-xs","11","class","mt-12",4,"ngIf"],["fxFlex","100","fxFlex.gt-xs","88","class","mt-8",4,"ngIf"],["fxFlex","100","fxFlex.gt-xs","11","class","pt-28",4,"ngIf"],["fxFlex","100","fxFlex.gt-xs","100",1,"sun-editor-custom-style"],["disabled","",1,"ml-15","f14","custom-radio-button"],["class","mr-8",3,"checked","value",4,"ngFor","ngForOf"],[1,"mr-8",3,"checked","value"],[1,"pt-16",3,"innerHtml"],["fxFlex","100","fxFlex.gt-xs","8",1,"mt-4"],["fxFlex","100","fxFlex.gt-xs","80",1,""],["fxLayout","row wrap"],["class","mt-12 mr-8 attachment-img","fxFlex","100","fxFlex.gt-xs","10",4,"ngFor","ngForOf"],["fxFlex","100","fxFlex.gt-xs","10",1,"mt-12","mr-8","attachment-img"],["height","80","width","100",1,"caption-figure","overlay-figure",3,"src"],[1,"text-center"],["mat-button","","color","primary",1,"bg-download","mb-4","ml-0",3,"click"],[1,"material-icons"],["fxFlex","100","fxFlex.gt-xs","5",1,""],[1,"pl-4"],["fxFlex","100","fxFlex.gt-xs","90",1,"",3,"innerHtml"],["fxFlex","100","fxFlex.gt-xs","8",1,""],[1,"pl-16"],["fxFlex","100","fxFlex.gt-xs","11",1,"mt-12"],[2,"color","blue"],["fxFlex","100","fxFlex.gt-xs","88",1,"mt-8"],["fxFlex","100","fxFlex.gt-xs","10","class","mt-12 mr-8 attachment-img",4,"ngFor","ngForOf"],["height","80","width","100%",1,"caption-figure","overlay-figure",3,"src"],[1,""],[1,"evaluate",3,"click"],["fxFlex","100","fxFlex.gt-xs","11",1,"pt-28"],["class","",4,"ngIf"],["class","caption-figure overlay-figure","height","80","width","100%",3,"src",4,"ngIf"],["class","","class","text-center",4,"ngIf"],[1,"delete-icon",2,"position","relative","top","9px","float","right","left","18px",3,"click"]],template:function(e,t){1&e&&(W.dc(0,"div",0),W.dc(1,"button",1),W.lc("click",(function(e){return t.save()})),W.cd(2,"Save"),W.cc(),W.dc(3,"a",2),W.lc("click",(function(e){return t.discard()})),W.cd(4,"Discard"),W.cc(),W.dc(5,"label",3),W.dc(6,"strong"),W.cd(7),W.dc(8,"span",4),W.cd(9),W.cc(),W.cc(),W.cc(),W.cc(),W.ad(10,ra,26,11,"div",5),W.ad(11,sa,4,0,"div",6)),2&e&&(W.Gb(7),W.dd(t.studentName),W.Gb(2),W.fd("",t.className," - ",t.sectionName,""),W.Gb(1),W.yc("ngIf",t.evaluates),W.Gb(1),W.yc("ngIf",!t.evaluates))},directives:[b.a,f.o,xe.c,xe.a,f.n,x.a,ye.b,_.b,F.b,F.a,w.a],pipes:[f.f,he.h],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.row[_ngcontent-%COMP%]{margin-top:-10px}.f24[_ngcontent-%COMP%]{font-size:24px;margin-left:-10px}.text-center[_ngcontent-%COMP%]{text-align:center!important}.text-right[_ngcontent-%COMP%]{text-align:right!important}.f16[_ngcontent-%COMP%]{font-size:16px}.answer-block[_ngcontent-%COMP%]{margin-top:-12px!important}.f15[_ngcontent-%COMP%]{font-size:15px}.attachment-img[_ngcontent-%COMP%] .bg-download[_ngcontent-%COMP%]{background:#fff!important;color:#01a39d!important;min-width:35px;line-height:20px!important;padding:0 5px!important}.attachment-img[_ngcontent-%COMP%] .bg-download[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{font-size:18px}.approveicon[_ngcontent-%COMP%]{color:#fff!important;background:green!important;border-radius:50%;width:7px;height:7px;font-size:8px;text-align:center!important;line-height:7px!important;padding:5px!important}.hw-type[_ngcontent-%COMP%]{padding:2px 4px!important;border-radius:0!important;font-size:11px!important;background:#734f96!important;position:relative;bottom:4px}.evaluate[_ngcontent-%COMP%], .hw-type[_ngcontent-%COMP%]{color:#fff!important}.evaluate[_ngcontent-%COMP%]{padding:3px 10px!important;font-size:13px;background:#019fa2!important;border-radius:0!important;border:1px solid #019fa2!important}mat-card[_ngcontent-%COMP%]{border:1px solid hsla(0,0%,50.2%,.3686274509803922)}.mat-radio-button[_ngcontent-%COMP%]{display:list-item;list-style:none}"]}),da),ma=((la=function(){return _createClass((function e(t,c,n){_classCallCheck(this,e),this.adapter=t,this.evaluateAdapter=c,this.apiService=n}),[{key:"getEvaluateList",value:function(e,t,c){var n=this;return this.apiService.get("onlineexam/evaluate_list/".concat(e,"/").concat(t,"/").concat(c)).pipe(Object($.a)((function(e){return n.adapter.adapt(e)})))}},{key:"getQuestionGroup",value:function(e,t){return this.apiService.get("onlineexam/resultQuestionGroup/".concat(e,"/").concat(t))}},{key:"getQuesGrpOne",value:function(e,t,c){return this.apiService.get("onlineexam/resultQuestion/".concat(e,"/").concat(t,"/").concat(c))}}])}()).\u0275fac=function(e){return new(e||la)(W.hc(re),W.hc(Tn),W.hc(R.a))},la.\u0275prov=W.Tb({token:la,factory:la.\u0275fac,providedIn:"root"}),la);function pa(e,t){1&e&&(W.dc(0,"span"),W.dc(1,"mat-icon",41),W.cd(2,"check"),W.cc(),W.cc())}function ha(e,t){if(1&e){var c=W.ec();W.dc(0,"div",33),W.dc(1,"mat-card",34),W.lc("click",(function(e){W.Sc(c);var n=t.$implicit;return W.pc(2).evaluate(n.studentId)})),W.dc(2,"div",35),W.Yb(3,"img",36),W.cc(),W.dc(4,"div",37),W.dc(5,"h3",38),W.dc(6,"strong"),W.cd(7),W.cc(),W.ad(8,pa,3,0,"span",28),W.cc(),W.dc(9,"p",39),W.dc(10,"small",40),W.cd(11),W.cc(),W.cc(),W.cc(),W.cc(),W.cc()}if(2&e){var n=t.$implicit;W.Gb(3),W.zc("src",n.photo,W.Vc),W.Gb(4),W.dd(n.studentName),W.Gb(1),W.yc("ngIf","Done"==n.status),W.Gb(3),W.dd(n.rollNumber)}}function fa(e,t){1&e&&(W.dc(0,"mat-card"),W.dc(1,"p",42),W.dc(2,"b"),W.cd(3,"No Data Found..."),W.cc(),W.cc(),W.cc())}var ga=function(){return{"border-top":"1px solid #8080806e"}};function ba(e,t){if(1&e&&(W.dc(0,"div",29),W.dc(1,"div",30),W.ad(2,ha,12,4,"div",31),W.dc(3,"div",32),W.ad(4,fa,4,0,"mat-card",28),W.cc(),W.cc(),W.cc()),2&e){var c=W.pc();W.yc("ngStyle",W.Ec(3,ga)),W.Gb(2),W.yc("ngForOf",c.studentLists),W.Gb(2),W.yc("ngIf",0==c.studentLists.length)}}function xa(e,t){if(1&e){var c=W.ec();W.dc(0,"th",43),W.dc(1,"mat-checkbox",44),W.lc("change",(function(e){W.Sc(c);var t=W.pc();return e?t.masterToggle():null})),W.cc(),W.cc()}if(2&e){var n=W.pc();W.Gb(1),W.yc("checked",n.selection.hasValue()&&n.isAllSelected())("indeterminate",n.selection.hasValue()&&!n.isAllSelected())}}function va(e,t){if(1&e){var c=W.ec();W.dc(0,"td",45),W.dc(1,"mat-checkbox",46),W.lc("click",(function(e){return W.Sc(c),e.stopPropagation()}))("change",(function(e){W.Sc(c);var n=t.$implicit,a=W.pc();return e?a.selection.toggle(n):null})),W.cc(),W.cc()}if(2&e){var n=t.$implicit,a=W.pc();W.Gb(1),W.yc("checked",a.selection.isSelected(n))}}function ya(e,t){1&e&&(W.dc(0,"th",47),W.dc(1,"b"),W.cd(2," Last Submission Date "),W.cc(),W.cc())}function ka(e,t){if(1&e&&(W.dc(0,"td",48),W.cd(1),W.qc(2,"displayDate"),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.ed(" ",W.rc(2,1,c.lastSubmissionDate)," ")}}function wa(e,t){1&e&&(W.dc(0,"th",47),W.dc(1,"b"),W.cd(2,"Roll No"),W.cc(),W.cc())}function _a(e,t){if(1&e&&(W.dc(0,"td",48),W.cd(1),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.ed(" ",c.rollNumber," ")}}function Ca(e,t){1&e&&(W.dc(0,"th",47),W.dc(1,"b"),W.cd(2,"Student Name"),W.cc(),W.cc())}function Oa(e,t){if(1&e&&(W.dc(0,"td",48),W.cd(1),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.ed(" ",c.studentName," ")}}function Fa(e,t){if(1&e){var c=W.ec();W.dc(0,"th",47),W.cd(1," Status "),W.dc(2,"mat-icon",49),W.cd(3,"more_vert "),W.cc(),W.dc(4,"mat-menu",null,50),W.dc(6,"button",51),W.lc("click",(function(e){return W.Sc(c),W.pc().action()})),W.dc(7,"mat-icon",52),W.cd(8,"done_all"),W.cc(),W.dc(9,"span"),W.cd(10,"Evaluate"),W.cc(),W.cc(),W.dc(11,"button",51),W.lc("click",(function(e){return W.Sc(c),W.pc().viewResult()})),W.dc(12,"mat-icon",53),W.cd(13,"visibility"),W.cc(),W.dc(14,"span"),W.cd(15,"View Result"),W.cc(),W.cc(),W.cc(),W.cc()}if(2&e){var n=W.Oc(5);W.Gb(2),W.yc("matMenuTriggerFor",n)}}function qa(e,t){1&e&&(W.dc(0,"label",58),W.cd(1,"Evaluated"),W.cc())}function Ga(e,t){1&e&&(W.dc(0,"label",59),W.cd(1,"Missing"),W.cc())}function Ia(e,t){1&e&&(W.dc(0,"label",60),W.cd(1,"Submitted"),W.cc())}function Sa(e,t){1&e&&(W.dc(0,"label",61),W.cd(1,"Not Submitted"),W.cc())}function Ma(e,t){if(1&e&&(W.dc(0,"td",48),W.ad(1,qa,2,0,"label",54),W.ad(2,Ga,2,0,"label",55),W.ad(3,Ia,2,0,"label",56),W.ad(4,Sa,2,0,"label",57),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.yc("ngIf","Evaluated"==c.status),W.Gb(1),W.yc("ngIf","Missing"==c.status),W.Gb(1),W.yc("ngIf","Done"==c.status),W.Gb(1),W.yc("ngIf","Not done"==c.status)}}function Pa(e,t){1&e&&W.Yb(0,"tr",62)}function Qa(e,t){1&e&&W.Yb(0,"tr",63)}function Na(e,t){1&e&&(W.bc(0),W.dc(1,"p",42),W.dc(2,"b"),W.cd(3,"No Data Found..."),W.cc(),W.cc(),W.ac())}var Aa,Da=function(e){return{"list-view":e}},Ta=((Aa=function(){return _createClass((function e(t,c,n,a,i,o,r,s,l,d){_classCallCheck(this,e),this.translate=t,this.dialog=c,this.router=n,this.modelService=a,this.onlineexamService=i,this.toaster=o,this.loader=r,this.snack=s,this.activateRoute=l,this.permission=d,this.viewMode="list-view",this.displayedColumns=["select","rollno","studentname","date","status"],this.dataSource=new T.o,this.selection=new ze.c(!0,[]),this.pageSizeOptions=[],this.value="",this.totalList=0,this.doneCount=0,this.notDoneCount=0,t.setDefaultLang("en"),this.sections=JSON.parse(localStorage.getItem("sectionForEvaluate")),this.paginationDTO=new Ve.a,this.pageSizeOptions=Object(Ue.b)().app.table.filtering.pageSizeOptions,this.onlineexamId=this.activateRoute.snapshot.params.onlineexamId}),[{key:"isAllSelected",value:function(){return this.selection.selected.length===this.dataSource.data.length}},{key:"masterToggle",value:function(){var e=this;this.isAllSelected()?this.selection.clear():this.dataSource.data.forEach((function(t){return e.selection.select(t)}))}},{key:"getCheckedValue",value:function(){var e=this,t=[];return this.dataSource.connect().value.forEach((function(c){e.selection.isSelected(c)&&t.push(c)})),t}},{key:"isMultiStatus",value:function(e){return this.getCheckedValue().filter((function(t){if(t.status!=e)return t})).length>0}},{key:"ngOnInit",value:function(){this.getDetailsForEvaluate()}},{key:"getDetailsForEvaluate",value:function(){var e=this;this.onlineexamService.getQuestionsList(this.onlineexamId).subscribe((function(t){(t.keyword="success")&&(e.onlineexams=t.onlineexams,e.className=e.onlineexams[0].className,console.log(e.onlineexams,"onlineexams"),e.getEvaluateList())}))}},{key:"getEvaluateList",value:function(){var e=this;this.modelService.getEvaluateList(this.onlineexamId,this.onlineexams[0].classId,this.sections.sectionId).subscribe((function(t){e.studentLists=t.onlineexams[0].studentList,e.home=t.onlineexams[0],console.log(e.studentLists,"this.studentLists"),console.log(e.home,"this.home"),"success"==t.keyword?(e.dataSource=new T.o(t.onlineexams[0].studentList),e.studentLists=t.onlineexams[0].studentList,console.log(e.studentLists,"this.studentLists"),e.toaster.present(t.message,""),e.totalList=t.onlineexams[0].studentList.length,e.doneCount=t.onlineexams[0].studentList.filter((function(e){return"Done"==e.status})).length,e.notDoneCount=t.onlineexams[0].studentList.filter((function(e){return"Not done"==e.status})).length,e.evaluatedCount=t.onlineexams[0].studentList.filter((function(e){return"Evaluated"==e.status})).length,e.missedCount=t.onlineexams[0].studentList.filter((function(e){return"Missing"==e.status})).length,e.loader.close()):e.loader.close()}))}},{key:"action",value:function(){var e,t,c=this,n=null===(e=this.getCheckedValue()[0])||void 0===e?void 0:e.status;1==this.getCheckedValue().length&&"Done"==(null===(t=this.getCheckedValue()[0])||void 0===t?void 0:t.status)?(console.log(this.getCheckedValue()[0]),this.studentListId=this.getCheckedValue()[0].studentId,Xe.a.fire({title:"Confirm?",text:"Are you sure? You want to evaluate !",icon:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Yes, evaluate it!"}).then((function(e){e.value&&c.router.navigate(["/teacher/online-exam/evaluate/".concat(c.onlineexamId,"/").concat(c.studentListId)])}))):Xe.a.fire({icon:"error",title:"Evaluate Student",text:"Evaluated"==n?"Its already evaluated, so cannot evaluate again!":"Please select the student in submitted status!"})}},{key:"viewResult",value:function(){var e,t=this,c=null===(e=this.getCheckedValue()[0])||void 0===e?void 0:e.status;1==this.getCheckedValue().length&&"Evaluated"==c?(this.studentListId=this.getCheckedValue()[0].studentId,Xe.a.fire({title:"Confirm?",text:"Are you sure? You want to view !",icon:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Yes, view it!"}).then((function(e){t.router.navigate(["/teacher/online-exam/overall-result",t.onlineexamId,t.studentListId])}))):Xe.a.fire({icon:"error",title:"View Student Result",text:"Please select the student in evaluated status!"})}},{key:"evaluate",value:function(e){this.router.navigate(["/teacher/online-exam/evaluate",this.onlineexamId,e])}},{key:"view",value:function(){this.router.navigate(["/teacher/online-exam/list"])}}])}()).\u0275fac=function(e){return new(e||Aa)(W.Xb(we.d),W.Xb(Ke.b),W.Xb(h.g),W.Xb(ma),W.Xb(le),W.Xb(ue.a),W.Xb(de.a),W.Xb(wt.a),W.Xb(h.a),W.Xb($e.a))},Aa.\u0275cmp=W.Rb({type:Aa,selectors:[["app-student-evaluate"]],decls:80,vars:20,consts:[["fxLayout","row wrap",1,"pagewrap"],["fxFlex","100","fxFlex.gt-xs","50",1,"pr-1"],[1,"example-button-row","pb-8"],["mat-raised-button","","color","primary",1,"btn-primary-bg",3,"click"],[1,"student_list"],[1,"student_status_detail","text-center","mt-16","mb-16"],[1,"f14"],[1,"mb-0","mt-4","mr-4","text-right","givenby"],[1,"ml-12"],["fxLayout","row wrap",1,"p-8","grey-100"],["fxFlex","100","fxFlex.gt-xs","10"],[1,"mb-0","mt-4"],["fxFlex","100","fxFlex.gt-xs","12",1,"text-right"],["fxFlex","100","fxFlex.gt-xs","5"],["class","",3,"ngStyle",4,"ngIf"],[1,"table_container","pb-1",3,"ngClass","ngStyle"],["mat-table","",1,"",3,"dataSource"],["matColumnDef","select",1,"checkbox-field"],["style","width: 5%;\n text-align: center;","mat-header-cell","",4,"matHeaderCellDef"],["style","width: 5%;\n text-align: center;","mat-cell","",4,"matCellDef"],["matColumnDef","date"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","rollno"],["matColumnDef","studentname"],["matColumnDef","status"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[4,"ngIf"],[1,"",3,"ngStyle"],["fxLayout","row wrap"],["fxFlex","100","fxFlex.gt-xs","25",4,"ngFor","ngForOf"],["fxFlex","100","fxFlex.gt-xs","25",2,"justify-content","center"],["fxFlex","100","fxFlex.gt-xs","25"],[3,"click"],["fxFlex","100","fxFlex.gt-xs","20"],["alt","Employee Image",3,"src"],["fxFlex","100","fxFlex.gt-xs","80",1,"ml-8"],[1,"m-0","font-normal"],[1,"mb-0"],[1,""],[2,"color","green"],[1,"text-center"],["mat-header-cell","",2,"width","5%","text-align","center"],[3,"checked","indeterminate","change"],["mat-cell","",2,"width","5%","text-align","center"],[3,"checked","click","change"],["mat-header-cell",""],["mat-cell",""],[1,"action",3,"matMenuTriggerFor"],["menu","matMenu"],["mat-menu-item","",3,"click"],[2,"color","#07b9ef"],[2,"color","#3f51b5"],["class","mat-chip mat-darkblue mat-standard-chip ng-tns-c12-751 mat-chip-selected ng-star-inserted",4,"ngIf"],["class","mat-chip mat-marron mat-standard-chip ng-tns-c12-751 mat-chip-selected ng-star-inserted",4,"ngIf"],["class","mat-chip mat-success mat-standard-chip ng-tns-c12-751 mat-chip-selected ng-star-inserted",4,"ngIf"],["class","mat-chip mat-danger mat-standard-chip ng-tns-c12-751 mat-chip-selected ng-star-inserted",4,"ngIf"],[1,"mat-chip","mat-darkblue","mat-standard-chip","ng-tns-c12-751","mat-chip-selected","ng-star-inserted"],[1,"mat-chip","mat-marron","mat-standard-chip","ng-tns-c12-751","mat-chip-selected","ng-star-inserted"],[1,"mat-chip","mat-success","mat-standard-chip","ng-tns-c12-751","mat-chip-selected","ng-star-inserted"],[1,"mat-chip","mat-danger","mat-standard-chip","ng-tns-c12-751","mat-chip-selected","ng-star-inserted"],["mat-header-row",""],["mat-row",""]],template:function(e,t){1&e&&(W.dc(0,"div",0),W.dc(1,"div",1),W.dc(2,"div",2),W.dc(3,"button",3),W.lc("click",(function(e){return t.view()})),W.cd(4,"Back"),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(5,"div",4),W.dc(6,"div",5),W.dc(7,"h3"),W.dc(8,"strong"),W.cd(9),W.cc(),W.cc(),W.dc(10,"h3",6),W.dc(11,"strong"),W.cd(12),W.cc(),W.cc(),W.dc(13,"h4",7),W.cd(14,"Given By"),W.dc(15,"strong",8),W.cd(16),W.cc(),W.cc(),W.dc(17,"div",9),W.dc(18,"div",10),W.dc(19,"h3",11),W.dc(20,"strong"),W.cd(21),W.dc(22,"span"),W.cd(23),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(24,"div",12),W.dc(25,"h4",11),W.cd(26,"Total Student"),W.cc(),W.cc(),W.dc(27,"div",13),W.dc(28,"h4",11),W.dc(29,"strong"),W.cd(30),W.cc(),W.cc(),W.cc(),W.dc(31,"div",12),W.dc(32,"h4",11),W.cd(33," Submitted"),W.cc(),W.cc(),W.dc(34,"div",13),W.dc(35,"h4",11),W.dc(36,"strong"),W.cd(37),W.cc(),W.cc(),W.cc(),W.dc(38,"div",12),W.dc(39,"h4",11),W.cd(40,"Not Submitted"),W.cc(),W.cc(),W.dc(41,"div",13),W.dc(42,"h4",11),W.dc(43,"strong"),W.cd(44),W.cc(),W.cc(),W.cc(),W.dc(45,"div",12),W.dc(46,"h4",11),W.cd(47,"Evaluated"),W.cc(),W.cc(),W.dc(48,"div",13),W.dc(49,"h4",11),W.dc(50,"strong"),W.cd(51),W.cc(),W.cc(),W.cc(),W.dc(52,"div",12),W.dc(53,"h4",11),W.cd(54,"Missed"),W.cc(),W.cc(),W.dc(55,"div",13),W.dc(56,"h4",11),W.dc(57,"strong"),W.cd(58),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.ad(59,ba,5,4,"div",14),W.dc(60,"div",15),W.dc(61,"table",16),W.bc(62,17),W.ad(63,xa,2,2,"th",18),W.ad(64,va,2,1,"td",19),W.ac(),W.bc(65,20),W.ad(66,ya,3,0,"th",21),W.ad(67,ka,3,3,"td",22),W.ac(),W.bc(68,23),W.ad(69,wa,3,0,"th",21),W.ad(70,_a,2,1,"td",22),W.ac(),W.bc(71,24),W.ad(72,Ca,3,0,"th",21),W.ad(73,Oa,2,1,"td",22),W.ac(),W.bc(74,25),W.ad(75,Fa,16,1,"th",21),W.ad(76,Ma,5,4,"td",22),W.ac(),W.ad(77,Pa,1,0,"tr",26),W.ad(78,Qa,1,0,"tr",27),W.cc(),W.ad(79,Na,4,0,"ng-container",28),W.cc(),W.cc()),2&e&&(W.Gb(9),W.dd(null==t.home?null:t.home.title),W.Gb(3),W.dd(null==t.home?null:t.home.subjectName),W.Gb(4),W.dd(null==t.home?null:t.home.givenBy),W.Gb(5),W.ed("",null==t.home?null:t.home.className," ,"),W.Gb(2),W.ed(" ",null==t.home?null:t.home.sectionName,""),W.Gb(7),W.dd(t.totalList),W.Gb(7),W.dd(t.doneCount),W.Gb(7),W.dd(t.notDoneCount),W.Gb(7),W.dd(t.evaluatedCount),W.Gb(7),W.dd(t.missedCount),W.Gb(1),W.yc("ngIf","grid-view"===t.viewMode),W.Gb(1),W.yc("ngClass",W.Fc(17,Da,"list-view"===t.viewMode))("ngStyle",W.Ec(19,ga)),W.Gb(1),W.yc("dataSource",t.dataSource),W.Gb(16),W.yc("matHeaderRowDef",t.displayedColumns),W.Gb(1),W.yc("matRowDefColumns",t.displayedColumns),W.Gb(1),W.yc("ngIf",0===t.dataSource.filteredData.length||0===t.dataSource.data.length))},directives:[xe.c,xe.a,b.a,f.o,f.m,_t.a,f.p,_t.b,T.n,T.c,T.i,T.b,T.k,T.m,f.n,x.a,w.a,T.h,v.a,T.a,G.d,G.e,G.b,T.j,T.l],pipes:[he.a],styles:[".searc-icon[_ngcontent-%COMP%]{position:absolute;top:112px;right:27px;font-size:18px}.mr-10[_ngcontent-%COMP%]{margin-right:10px}.mt-10[_ngcontent-%COMP%]{margin-top:10px}.ml-10[_ngcontent-%COMP%]{margin-left:10px}table[_ngcontent-%COMP%]{width:100%}.checkbox-field[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{width:6%;text-align:center}.circle[_ngcontent-%COMP%]{border:1px solid green;border-radius:50%;background:green;padding:5px}.waring-block[_ngcontent-%COMP%]{display:contents}.waring-block[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{color:red;font-size:15px}.hw-type[_ngcontent-%COMP%]{padding:2px 4px!important;border-radius:0!important;font-size:11px!important;background:#734f96!important;color:#fff!important}.mat-red[_ngcontent-%COMP%]{padding:4px!important;background:#f44336!important}.mat-green[_ngcontent-%COMP%], .mat-red[_ngcontent-%COMP%]{border-radius:0!important;font-size:11px!important;color:#fff}.mat-green[_ngcontent-%COMP%]{display:inline-block;padding:2px 6px 1px!important;position:relative;overflow:hidden;background:green!important}.txt-white[_ngcontent-%COMP%]{color:#fff!important}.txt-green[_ngcontent-%COMP%]{color:green}.txt-red[_ngcontent-%COMP%]{color:#f44336}.text-right[_ngcontent-%COMP%]{text-align:right!important}.f14[_ngcontent-%COMP%]{font-size:14px}.pt-0[_ngcontent-%COMP%]{padding-top:0!important}.mat-card[_ngcontent-%COMP%]{padding:5px}th[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{float:right}.mat-chip[_ngcontent-%COMP%]{padding:2px 4px;border-radius:4px}.gridview-right[_ngcontent-%COMP%]{display:block;text-align:right}.mat-tab-group[_ngcontent-%COMP%]{flex-direction:row}.mat-tab-label-container[_ngcontent-%COMP%]{display:flex;flex-direction:row}.bg-white[_ngcontent-%COMP%]{background:#fff}.egret-navy[_ngcontent-%COMP%] .mat-tab-group.mat-primary[_ngcontent-%COMP%] .mat-ink-bar[_ngcontent-%COMP%], .egret-navy[_ngcontent-%COMP%] .mat-tab-nav-bar.mat-primary[_ngcontent-%COMP%] .mat-ink-bar[_ngcontent-%COMP%]{background-color:hsla(0,0%,50.2%,.2784313725490196)!important}.table_container.pb-1.list-view[_ngcontent-%COMP%]{display:block}.table_container.pb-1[_ngcontent-%COMP%]{display:none}small[_ngcontent-%COMP%]{font-size:13.4px!important}mat-card[_ngcontent-%COMP%]{cursor:pointer!important}.text-center[_ngcontent-%COMP%]{text-align:center!important}.count[_ngcontent-%COMP%]{margin:0 100px}.academic_detail[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:97%!important}.mat-success[_ngcontent-%COMP%]{background:#07ab07!important;color:#fff!important}.not_done[_ngcontent-%COMP%]{background:#ff9800!important;color:#fff!important}img[_ngcontent-%COMP%]{max-width:70%!important}mat-card[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{float:right}mat-card[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] span[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-weight:800;font-size:16px}.mat-menu-panel[_ngcontent-%COMP%]{min-height:32px!important}@media(max-width:360px){table[_ngcontent-%COMP%]{width:411px}}.mat-darkblue[_ngcontent-%COMP%]{background:#003c93!important}.mat-darkblue[_ngcontent-%COMP%], .mat-marron[_ngcontent-%COMP%]{padding:4px 5px 3px!important;border-radius:0!important;font-size:11px!important;color:#fff!important;min-height:12px}.mat-marron[_ngcontent-%COMP%]{background:rgba(166,28,29,.7019607843137254)!important}.givenby[_ngcontent-%COMP%]{position:relative;bottom:20px}"]}),Aa),ja=c("XhcP"),La=c("7EHt"),Ea=c("ER3k"),za=["sidenav"];function Ya(e,t){if(1&e){var c=W.ec();W.dc(0,"mat-option",51),W.lc("click",(function(e){W.Sc(c);var n=t.$implicit;return W.pc(2).getImportQuestions(n.id)})),W.cd(1),W.cc()}if(2&e){var n=t.$implicit;W.yc("value",n.id),W.Gb(1),W.ed(" ",n.title," ")}}function Xa(e,t){if(1&e){var c=W.ec();W.dc(0,"div",46),W.dc(1,"mat-form-field",47),W.Yb(2,"mat-label"),W.dc(3,"mat-select",48),W.lc("ngModelChange",(function(e){return W.Sc(c),W.pc().dropDown=e})),W.dc(4,"mat-option",49),W.cd(5,"Select"),W.cc(),W.ad(6,Ya,2,2,"mat-option",50),W.cc(),W.cc(),W.cc()}if(2&e){var n=W.pc();W.Gb(3),W.yc("ngModel",n.dropDown),W.Gb(3),W.yc("ngForOf",n.onlineexams)}}function Ha(e,t){if(1&e){var c=W.ec();W.dc(0,"li",55),W.dc(1,"mat-checkbox",56),W.lc("change",(function(e){W.Sc(c);var n=t.$implicit,a=t.index;return W.pc(2).checkimportEvent(e.checked,n,a)}))("ngModelChange",(function(e){return W.Sc(c),t.$implicit.checked=e})),W.Yb(2,"span",57),W.qc(3,"safeHtml"),W.cc(),W.cc()}if(2&e){var n=t.$implicit;W.Gb(1),W.yc("disabled",n.isDisabled)("ngModel",n.checked),W.Gb(1),W.yc("innerHtml",W.rc(3,3,n.questionName),W.Tc)}}function Ra(e,t){if(1&e&&(W.dc(0,"div",52),W.dc(1,"ul",53),W.ad(2,Ha,4,5,"li",54),W.cc(),W.cc()),2&e){var c=W.pc();W.Gb(2),W.yc("ngForOf",c.importQuesAns)}}function Ba(e,t){1&e&&(W.dc(0,"div",52),W.dc(1,"ul",53),W.dc(2,"li",55),W.cd(3," No Data Found "),W.cc(),W.cc(),W.cc())}function $a(e,t){if(1&e){var c=W.ec();W.dc(0,"div",58),W.dc(1,"button",59),W.lc("click",(function(e){return W.Sc(c),W.pc().selectedQues()})),W.cd(2),W.cc(),W.cc()}if(2&e){var n=W.pc();W.Gb(2),W.ed(" Import Questions (",n.selectedQuesCount,") ")}}function Va(e,t){if(1&e&&W.Yb(0,"img",94),2&e){var c=W.pc().$implicit;W.yc("src",c.attachment,W.Vc)}}function Ua(e,t){if(1&e){var c=W.ec();W.dc(0,"a",95),W.lc("click",(function(e){W.Sc(c);var t=W.pc(),n=t.$implicit,a=t.index,i=W.pc().index;return W.pc().deletePic(n,i,a)})),W.dc(1,"mat-icon",65),W.cd(2,"close"),W.cc(),W.cc()}}function Ja(e,t){if(1&e&&(W.dc(0,"span",91),W.ad(1,Va,1,1,"img",92),W.ad(2,Ua,3,0,"a",93),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.yc("ngIf",c.attachment),W.Gb(1),W.yc("ngIf",c.attachment)}}function Wa(e,t){1&e&&(W.dc(0,"p",96),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.Gb(1),W.ed(" ",W.rc(2,1,"homework.assignment.error.fileSize"),""))}function Ka(e,t){1&e&&(W.dc(0,"p",96),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.Gb(1),W.ed(" ",W.rc(2,1,"homework.assignment.error.maxFileCount"),""))}function Za(e,t){if(1&e){var c=W.ec();W.dc(0,"mat-expansion-panel",60),W.lc("closed",(function(e){W.Sc(c);var n=t.index;return W.pc().closedPanel(n)}))("click",(function(e){W.Sc(c);var n=t.index;return W.pc().click(n)}))("opened",(function(e){W.Sc(c);var n=t.index;return W.pc().setStep(n)})),W.dc(1,"mat-expansion-panel-header"),W.dc(2,"mat-panel-title",61),W.dc(3,"div",62),W.dc(4,"div",38),W.dc(5,"div",55),W.dc(6,"span"),W.cd(7),W.cc(),W.Yb(8,"span",63),W.qc(9,"safeHtml"),W.cc(),W.cc(),W.dc(10,"div",40),W.dc(11,"span",64),W.dc(12,"mat-icon",65),W.cd(13,"edit"),W.cc(),W.cc(),W.dc(14,"span",66),W.lc("click",(function(e){W.Sc(c);var n=t.index;return W.pc().removePanel(n)})),W.dc(15,"mat-icon",65),W.cd(16,"close"),W.cc(),W.cc(),W.dc(17,"span",67),W.cd(18),W.cc(),W.dc(19,"span",68),W.dc(20,"mat-icon"),W.cd(21),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(22,"mat-card"),W.dc(23,"div",69),W.dc(24,"div",70),W.dc(25,"div",71),W.dc(26,"label"),W.dc(27,"strong"),W.cd(28," Question Name"),W.cc(),W.cc(),W.cc(),W.Yb(29,"tgss-editor",72),W.cc(),W.cc(),W.dc(30,"div",69),W.dc(31,"div",73),W.dc(32,"label"),W.dc(33,"strong"),W.cd(34,"Answer Key"),W.cc(),W.cc(),W.cc(),W.dc(35,"div",74),W.Yb(36,"tgss-editor",75),W.cc(),W.cc(),W.dc(37,"div",76),W.dc(38,"div",77),W.Yb(39,"mat-checkbox",78),W.dc(40,"label",79),W.dc(41,"strong"),W.cd(42),W.qc(43,"translate"),W.cc(),W.cc(),W.cc(),W.Yb(44,"div",80),W.cc(),W.dc(45,"div",81),W.dc(46,"div",82),W.dc(47,"label"),W.dc(48,"strong"),W.cd(49,"Attachment"),W.cc(),W.cc(),W.cc(),W.dc(50,"div",83),W.ad(51,Ja,3,2,"span",84),W.dc(52,"input",85,86),W.lc("change",(function(e){W.Sc(c);var n=t.index;return W.pc().onSelectedFile(e,n)})),W.cc(),W.dc(54,"img",87),W.lc("click",(function(e){return W.Sc(c),W.Oc(53).click()})),W.cc(),W.dc(55,"div",88),W.ad(56,Wa,3,3,"p",89),W.ad(57,Ka,3,3,"p",89),W.dc(58,"span"),W.cd(59,"Note : Only images can upload"),W.cc(),W.Yb(60,"br"),W.dc(61,"span"),W.cd(62,"Format : JPG, JPEG, PNG, BMP"),W.cc(),W.Yb(63,"br"),W.dc(64,"span"),W.cd(65,"File Size : Maximum 2MB"),W.cc(),W.Yb(66,"br"),W.cc(),W.cc(),W.cc(),W.dc(67,"button",90),W.lc("click",(function(e){W.Sc(c);var n=t.index;return W.pc().nextStep(n)})),W.cd(68," Done "),W.cc(),W.cc(),W.cc()}if(2&e){var n=t.$implicit,a=t.index,i=W.pc();W.yc("formGroupName",a)("expanded",i.indexExpanded==a),W.Gb(7),W.ed("",a+1," ."),W.Gb(1),W.yc("innerHtml",W.rc(9,14,n.controls.questionName.value),W.Tc),W.Gb(9),W.Nb("saved",null==i.checkedQues[a]?null:i.checkedQues[a].isUpdated),W.Gb(1),W.dd(null!=i.checkedQues[a]&&i.checkedQues[a].isUpdated?"Saved":"Unsaved"),W.Gb(3),W.ed("",1==i.icon[a]?"keyboard_arrow_down":"keyboard_arrow_up"," "),W.Gb(8),W.yc("transliterate",i.transLang),W.Gb(7),W.yc("transliterate",i.transLang),W.Gb(6),W.ed(" ",W.rc(43,16,"homework.question.lable.isUploadPerm")," "),W.Gb(9),W.yc("ngForOf",null==i.checkedQues[a]?null:i.checkedQues[a].quesAttachment),W.Gb(5),W.yc("ngIf",i.isFileImportAttachSizeTooHigh[a]),W.Gb(1),W.yc("ngIf",i.isMaxFileImportAttachCountExceed[a])}}var ei,ti=((ei=function(){return _createClass((function e(t,c,n,a,i,o,r,s){_classCallCheck(this,e),this.modelService=t,this.router=c,this.loader=n,this.toaster=a,this.activateRoute=i,this.translate=o,this.cdr=r,this.fb=s,this.id=0,this.selectedSectionIds=[],this.eachMark=0,this.uploads=[],this.MaxFileCount=5,this.editorInstances=[],this.noOfPreparedQus=0,this.icon=[],this.selectedImportType="",this.selectedQuesCount=0,this.checkedQues=[],this.questions=[],this.checkedQuesLength=0,this.quesLang="",this.showQues=!1,this.dropDown="",this.importQuesAns=[],this.isFileImportAttachSizeTooHigh=[!1],this.isMaxFileImportAttachCountExceed=[!1],this.indexExpanded=-1,this.translate.setDefaultLang("en"),this.qusGrpId=this.activateRoute.snapshot.params.qusGrpId,this.language=localStorage.getItem("quesTranLang"),this.setTransLang(this.language);for(var l=0;l<=200;l++)this.icon.push(!1)}),[{key:"ngOnInit",value:function(){this.getOne(),this.buildForm(),this.buildImportForm(!0),this.addImportQuestion()}},{key:"buildForm",value:function(){this.questionForm=new g.j({question:new g.g("",[g.B.required]),anskey:new g.g("",[g.B.required]),isUploadPerm:new g.g(""),language:new g.g(this.language)})}},{key:"setTransLang",value:function(e){console.log(e,"language"),"english"==e?(this.transLang="en",this.quesLang="english"):"tamil"==e?(this.transLang="ta",this.quesLang="tamil"):"hindi"==e?(this.transLang="hi",this.quesLang="hindi"):"french"==e&&(this.transLang="fr",this.quesLang="french")}},{key:"getOne",value:function(){var e=this;this.modelService.getQusGroupOne(this.qusGrpId).subscribe((function(t){"success"==t.keyword?(e.onlineexam=t.onlineexams[0],e.onlineexamId=e.onlineexam.onlineexamId,e.onlineexam.sections.forEach((function(t){e.selectedSectionIds.push(t.sectionName)})),e.group=e.onlineexam.group[0],e.noOfPreparedQus=e.group.noOfPreparedQus,e.noOfQus=e.group.noOfQus,e.remainQues=e.noOfQus-e.noOfPreparedQus,console.log(e.onlineexam),e.toaster.present(t.message)):(e.loader.close(),e.toaster.present(t.message))}))}},{key:"create",value:function(){var e=this,t=this.questionForm.value;if(this.questionForm.valid&&this.onlineexamId&&this.qusGrpId){this.loader.open();var c=new FormData;c.append("onlineexam_question_group_id",this.qusGrpId),c.append("onlineexam_id",this.onlineexamId),c.append("type","non-objective"),c.append("question_name",t.question),c.append("answer",t.anskey),c.append("question_mark",this.eachMark<0?0:this.eachMark),c.append("is_permission_upload","1"==t.isUploadPerm?"1":"0"),this.uploads.forEach((function(e){c.append("attachment[]",e)})),this.modelService.saveQuestion(c,"create").subscribe((function(t){"success"==t.keyword?(e.submitButton.disabled=!1,e.noOfPreparedQus=e.noOfPreparedQus+1,e.loader.close(),e.noOfPreparedQus!=e.noOfQus?(e.questionForm.patchValue({question:"",anskey:"",isUploadPerm:""}),e.uploads=[]):e.noOfPreparedQus==e.group.noOfQus&&e.router.navigate(["/teacher/online-exam/onlineexam/",e.onlineexamId]),e.toaster.present(t.message,"")):(e.loader.close(),e.submitButton.disabled=!1,e.toaster.present(t.message))}))}}},{key:"onSelectFile",value:function(e){if(this.uploads=[],this.isFileSizeTooHigh=!1,this.isMaxFileCountExceed=!1,e.target.files.length>5)this.isMaxFileCountExceed=!0;else if(e.target.files&&e.target.files[0]){for(var t=e.target.files.length,c=0;c<t;c++)if(e.target.files[c].size>2e6){this.isFileSizeTooHigh=!0;break}if(!this.isFileSizeTooHigh&&!this.isMaxFileCountExceed)for(var n=0;n<t;n++)this.uploads.push(e.target.files[n])}}},{key:"clearFiles",value:function(){this.uploads=[],this.isFileSizeTooHigh=!1,this.isMaxFileCountExceed=!1}},{key:"discard",value:function(){console.log(this.onlineexamId,"this.onlineexamId"),this.router.navigate(["/teacher/online-exam/onlineexam/",this.onlineexamId])}},{key:"preview",value:function(){var e=this;this.router.navigate([]).then((function(t){window.open("/teacher/online-exam/preview/".concat(e.onlineexamId),"_blank")}))}},{key:"getHomeworks",value:function(e){var t=this;this.modelService.getHomeworks(this.onlineexam.classId,this.onlineexam.subjectId,e,this.onlineexamId,this.quesLang).subscribe((function(e){"success"==e.keyword?(console.log("IMPORT HOMEWORK =>>>> ",e.data),t.onlineexams=e.data,t.dropDown="",t.showQues=!1,t.importQuesAns=[]):(t.onlineexams=[],t.dropDown="",t.showQues=!1,t.importQuesAns=[])}))}},{key:"resetImport",value:function(){this.importQuesAns=[],this.onlineexams=[],this.selectedImportType="",this.selectedQuesCount=0,this.dropDown="",this.showQues=!1}},{key:"click",value:function(e){this.icon[e]=!this.icon[e]}},{key:"getImportQuestions",value:function(e){var t=this;this.modelService.getImportQuestions(e,"1"==this.selectedImportType?"onlineexam":"online_exam",0).subscribe((function(e){"success"==e.keyword?(console.log("IMPORT QUES =>>>> ",e.questions),t.importQuesAns=e.questions,t.showQues=!0):(t.importQuesAns=[],t.showQues=!0)}))}},{key:"buildImportForm",value:function(e){this.importForm=new g.j({language:new g.g(this.language),questions:new g.d([this.getQuestions([])])}),e&&this.importForm.get("questions").removeAt(0)}},{key:"getQuestions",value:function(e){var t,c,n;return this.fb.group({questionName:new g.g(null===(t=e)||void 0===t?void 0:t.questionName,[g.B.required]),isUploadPerm:new g.g(null===(c=e)||void 0===c?void 0:c.isPermissionUpload),anskey:new g.g(null===(n=e)||void 0===n?void 0:n.answer,[g.B.required]),attachment:new g.d([this.getImportAttachment([])])})}},{key:"getImportAttachment",value:function(e){var t,c,n;return new g.j({attachment_id:new g.g(null===(t=e)||void 0===t?void 0:t.attachmentId),attachment_name:new g.g(null===(c=e)||void 0===c?void 0:c.attachmentName),attachment:new g.g(null===(n=e)||void 0===n?void 0:n.attachment)})}},{key:"addImportQuestion",value:function(){var e=this.importForm.get("questions");e.push(this.getQuestions([])),this.indexExpanded=e.length-1,this.icon[e.length-1]=!this.icon[e.length-1];var t=this.setQuestion();t.isDisabled=!1,t.isUpdated=!1,t.checked=!1,t.customQues=!0,this.checkedQues.push(t)}},{key:"setQuestion",value:function(){var e=new V.e;return e.type="non-objective",e.questionId="",e.questionName="",e.studentAnswer="",e.studentOptionId="",e.isPermissionUpload="",e.questionMark="",e.obtainedMark="",e.quesOptions=[],e.quesAnswer=[],e.answer="",e.quesAttachment=[],e.studAttachment=[],e.isFavorite=0,e}},{key:"populateAttachment",value:function(e,t){var c=this,n=this.importForm.get("questions").controls[t].get("attachment");n.clear(),e.forEach((function(e){n.push(c.getImportAttachment(e))}))}},{key:"populateQuestions",value:function(e){var t=this,c=this.importForm.get("questions");c.clear(),e.forEach((function(e,n){var a;c.push(t.getQuestions(e)),t.populateAttachment(null===(a=e)||void 0===a?void 0:a.quesAttachment,n)})),this.sideNav.toggle(),this.cdr.detectChanges()}},{key:"console",value:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){console.log(this.importForm.value.questions.length,"length"),this.noOfPreparedQus==this.group.noOfQus?this.router.navigate(["/teacher/online-exam/onlineexam/",this.onlineexamId]):Xe.a.fire({title:"Create Question",text:"The created question and saved question mismatched",icon:"warning"})}))},{key:"checkimportEvent",value:function(e,t,c){var n=this.importQuesAns.filter((function(e){return!0===e.checked}));this.selectedQuesCount=n.length,this.importQuesAns[c].isUpdated=!1}},{key:"selectAllImport",value:function(e){if(e.checked){var t=this.importQuesAns.length;this.importQuesAns.forEach((function(e){e.checked=!0,e.isUpdated=!1})),this.selectedQuesCount=t}else this.importQuesAns.forEach((function(e){e.checked=!1,e.isUpdated=!1})),this.selectedQuesCount=0}},{key:"setPatchValues",value:function(e){return t=this,n=_regenerator().m((function t(){var c,n,a,i,o,r;return _regenerator().w((function(t){for(;;)switch(t.p=t.n){case 0:c=_createForOfIteratorHelper(e.entries()),t.p=1,c.s();case 2:if((n=c.n()).done){t.n=5;break}return a=_slicedToArray(n.value,2),i=a[0],o=a[1],this.checkedQues[i].questionName=o.questionName,this.checkedQues[i].answer=o.anskey,t.n=3,this.setPatchAttachment(o.attachment);case 3:this.checkedQues[i].quesAttachment=t.v,this.checkedQues[i].isPermissionUpload=o.isUploadPerm;case 4:t.n=2;break;case 5:t.n=7;break;case 6:t.p=6,r=t.v,c.e(r);case 7:return t.p=7,c.f(),t.f(7);case 8:return t.a(2)}}),t,this,[[1,6,7,8]])})),new((c=void 0)||(c=Promise))((function(e,a){function i(e){try{r(n.next(e))}catch(t){a(t)}}function o(e){try{r(n.throw(e))}catch(t){a(t)}}function r(t){var n;t.done?e(t.value):(n=t.value,n instanceof c?n:new c((function(e){e(n)}))).then(i,o)}r((n=n.apply(t,[])).next())}));var t,c,n}},{key:"setPatchOptions",value:function(e){var t=[];return e.forEach((function(e){e.option_name&&t.push({isAnswer:e.is_answer,optionId:e.option_id,optionName:e.option_name})})),t}},{key:"setPatchAttachment",value:function(e){var t=[];return e.forEach((function(e){e.attachment&&t.push({attachment:e.attachment,attachmentId:e.attachment_id,attachmentName:e.attachment_name})})),t}},{key:"selectedQues",value:function(){var e,t,c=this;if(this.selectedQuesCount>0){var n=this.importQuesAns.filter((function(e){return!0===e.checked})).filter((function(e){return!c.checkedQues.some((function(t){return e.questionId===t.questionId}))}));this.remainQues=this.noOfQus-this.noOfPreparedQus,console.log(null===(e=n)||void 0===e?void 0:e.length,this.remainQues),(null===(t=n)||void 0===t?void 0:t.length)+(this.importForm.value.questions.length-this.checkedQuesLength)>this.remainQues?(Xe.a.fire({title:"Import Question",text:"The created question and imported question mismatched",icon:"warning"}),n.forEach((function(e){var t=c.importQuesAns.findIndex((function(t){return e.questionId==t.questionId}));c.importQuesAns[t].checked=!1})),this.selectedQuesCount=0):(this.importQuesAns.forEach((function(e){e.checked&&(e.isDisabled=!0)})),this.setPatchValues(this.importForm.value.questions),this.checkedQues=[].concat(_toConsumableArray(this.checkedQues),_toConsumableArray(n)),this.populateQuestions(this.checkedQues),this.indexExpanded=-1,this.toaster.present("Imported Successfully"))}else this.sideNav.toggle(),this.cdr.detectChanges()}},{key:"deletePic",value:function(e,t,c){var n=this;if(e.attachmentId)this.importForm.get("questions").controls[t].get("attachment").removeAt(c),this.checkedQues[t].quesAttachment.splice(c,1);else{var a=new FormData;a.append("attachment",e.attachment_name),this.modelService.deleteImportAttach(a).subscribe((function(e){"success"==e.keyword?(n.importForm.get("questions").controls[t].get("attachment").removeAt(c),n.checkedQues[t].quesAttachment.splice(c,1),n.toaster.present(e.message,"")):n.toaster.present(e.message)}))}}},{key:"onSelectedFile",value:function(e,t){var c=this;if(this.isFileImportAttachSizeTooHigh[t]=!1,this.isMaxFileImportAttachCountExceed[t]=!1,e.target.files.length>5)this.isMaxFileImportAttachCountExceed[t]=!0;else if(e.target.files&&e.target.files[0]){for(var n=e.target.files.length,a=0;a<n;a++)if(e.target.files[a].size>2e6){this.isFileImportAttachSizeTooHigh[t]=!0;break}if(!this.isFileImportAttachSizeTooHigh[t]&&!this.isMaxFileImportAttachCountExceed[t])for(var i=0;i<n;i++){var o=new FormData;o.append("attachment",e.target.files[i]),this.modelService.uploadImportAttach(o).subscribe((function(e){var n;if("success"==e.keyword){var a=e.data,i=c.importForm.get("questions").controls[t].get("attachment"),o={attachmentId:"",attachmentName:a.attachment,attachment:a.attachment_url};i.push(c.getImportAttachment(o)),null===(n=c.checkedQues[t])||void 0===n||n.quesAttachment.push(o),c.toaster.present(e.message,"")}else c.toaster.present(e.message)}))}}}},{key:"setStep",value:function(e){this.checkedQues[e]&&(this.checkedQues[e].isUpdated=!1),this.indexExpanded=e}},{key:"closedPanel",value:function(e){}},{key:"nextStep",value:function(e){this.saveImportQuestion(e)}},{key:"setCustomQuesValue",value:function(e,t){e.questionId=t.question_id,e.questionName=t.question_name,e.questionMark=t.question_mark,e.answer=t.answer,e.quesAttachment=t.ques_attachment}},{key:"saveImportQuestion",value:function(e){var t,c,n,a,i,o=this,r=this.importForm.get("questions").controls[e],s=r.value;console.log(r.value,r.valid);var l=[],d=[],u=[];if(null===(t=s)||void 0===t||t.attachment.forEach((function(e){""==e.attachment_id?u.push(e.attachment_name):d.push(e.attachment_name)})),r.valid&&this.onlineexamId&&this.qusGrpId)if(this.checkedQues[e].isUpdatedId){l=[{onlineexam_question_id:this.checkedQues[e].isUpdatedId,onlineexam_question_group_id:this.qusGrpId,onlineexam_id:this.onlineexamId,type:"non-objective",question_name:null===(c=s)||void 0===c?void 0:c.questionName,answer:null===(n=s)||void 0===n?void 0:n.anskey,is_permission_upload:"1"==s.isUploadPerm?"1":"0",question_mark:this.eachMark<0?0:this.eachMark,old_attachment:JSON.stringify(d),new_attachment:JSON.stringify(u)}],console.log(l,"questions"),this.loader.open();var m=new FormData;m.append("import_type","online_exam"),m.append("onlineexam_id",this.onlineexamId),m.append("question_data",JSON.stringify(l)),this.modelService.updateImportQuestion(m).subscribe((function(t){"success"==t.keyword?(console.log(t.data[0]),o.checkedQues[e].customQues&&o.setCustomQuesValue(o.checkedQues[e],t.data[0]),o.checkedQues[e].isUpdatedId=t.data[0].onlineexam_question_id,o.loader.close(),o.noOfPreparedQus!=o.noOfQus?(o.checkedQues[e].isUpdated=!0,o.indexExpanded=e==o.indexExpanded?-1:e):o.noOfPreparedQus==o.group.noOfQus&&o.router.navigate(["/teacher/online-exam/onlineexam/",o.onlineexamId]),o.toaster.present(t.message,"")):(o.loader.close(),o.toaster.present(t.message))}))}else{l=[{onlineexam_question_group_id:this.qusGrpId,type:"non-objective",question_name:null===(a=s)||void 0===a?void 0:a.questionName,answer:null===(i=s)||void 0===i?void 0:i.anskey,is_permission_upload:"1"==s.isUploadPerm?"1":"0",question_mark:this.eachMark<0?0:this.eachMark,old_attachment:JSON.stringify(d),new_attachment:JSON.stringify(u)}],console.log(l,"questions"),this.loader.open();var p=new FormData;p.append("import_type","online_exam"),p.append("onlineexam_id",this.onlineexamId),p.append("question_data",JSON.stringify(l)),this.modelService.saveImportQuestion(p).subscribe((function(t){"success"==t.keyword?(console.log(t.data[0]),o.checkedQues[e].customQues&&o.setCustomQuesValue(o.checkedQues[e],t.data[0]),o.checkedQues[e].isUpdatedId=t.data[0].onlineexam_question_id,o.noOfPreparedQus=o.noOfPreparedQus+1,o.remainQues=o.noOfQus-o.noOfPreparedQus,o.loader.close(),o.noOfPreparedQus!=o.noOfQus?(o.checkedQues[e].isUpdated=!0,o.checkedQuesLength=o.checkedQues.filter((function(e){return 1==e.isUpdated})).length,o.indexExpanded=e==o.indexExpanded?-1:e):o.noOfPreparedQus==o.group.noOfQus&&o.router.navigate(["/teacher/online-exam/onlineexam/",o.onlineexamId]),o.toaster.present(t.message,"")):(o.loader.close(),o.toaster.present(t.message))}))}else Xe.a.fire({title:"Check Required",text:"Fill Mandatory Fields",icon:"warning"})}},{key:"removePanel",value:function(e){var t=this;if(console.log(this.checkedQues),this.checkedQues[e].isUpdatedId){var c=new FormData;c.append("import_type","online_exam"),c.append("id",this.checkedQues[e].isUpdatedId),this.modelService.deleteQuestion(c).subscribe((function(c){if("success"==c.keyword){t.noOfPreparedQus=t.noOfPreparedQus-1,t.importForm.get("questions").removeAt(e);var n=t.checkedQues.splice(e,1),a=t.importQuesAns.findIndex((function(e){return e.questionId==n[0].questionId}));t.selectedQuesCount=t.selectedQuesCount>0?t.selectedQuesCount-1:0,-1!==a&&(t.importQuesAns[a].checked=!1,t.importQuesAns[a].isDisabled=!1),t.toaster.present(c.message)}else t.toaster.present(c.message)}))}else{var n=this.importForm.get("questions");console.log(n),n.removeAt(e);var a=this.checkedQues.splice(e,1),i=this.importQuesAns.findIndex((function(e){return e.questionId==a[0].questionId}));this.selectedQuesCount=this.selectedQuesCount>0?this.selectedQuesCount-1:0,-1!==i&&(this.importQuesAns[i].checked=!1,this.importQuesAns[i].isDisabled=!1)}}}])}()).\u0275fac=function(e){return new(e||ei)(W.Xb(le),W.Xb(h.g),W.Xb(de.a),W.Xb(ue.a),W.Xb(h.a),W.Xb(we.d),W.Xb(W.h),W.Xb(g.f))},ei.\u0275cmp=W.Rb({type:ei,selectors:[["app-approve"]],viewQuery:function(e,t){var c;1&e&&(W.md(b.a,!0),W.md(za,!0)),2&e&&(W.Nc(c=W.mc())&&(t.submitButton=c.first),W.Nc(c=W.mc())&&(t.sideNav=c.first))},decls:116,vars:58,consts:[[1,"example-container",2,"min-height","535px",3,"hasBackdrop"],["position","end","mode","over",1,"example-sidenav","import-question-sidenav",3,"fixedInViewport","fixedTopGap","fixedBottomGap"],["sidenav",""],[1,"text-center","mat-bg-primary","pt-1","pb-1"],[1,"m-0"],[1,"p-16"],["aria-label","Select an option",3,"ngModel","ngModelChange"],["value","1",1,"mr-8",3,"change"],["value","2",3,"change"],["class","p-8",4,"ngIf"],["style","border-top:1px solid grey;",4,"ngIf"],["class","text-center","style","position:absolute;top:95%;left:35%;",4,"ngIf"],[3,"formGroup"],["fxLayout","row wrap",1,"mb-12"],["fxFlex","100","fxFlex.gt-xs","50"],["type","button","mat-raised-button","","color","primary",1,"btn-primary-bg",3,"click"],[1,"pl-8","primary-txt-color",3,"click"],["fxFlex","100","fxFlex.gt-xs","50",1,"mt-4"],["fxLayout","row wrap",1,"pl-16"],["fxFlex","100","fxFlex.gt-xs","16",1,"text-right"],["fxFlex","100","fxFlex.gt-xs","22",1,"pl-24"],["fxFlex","100","fxFlex.gt-xs","6",1,""],["fxFlex","100","fxFlex.gt-xs","10",1,"pl-24"],["fxFlex","100","fxFlex.gt-xs","10",1,"pl-24","mr-12"],["fxLayout","row wrap",1,"mt-12","text-right"],["fxFlex","100","fxFlex.gt-xs","70",1,"mt-0"],["fxFlex","100","fxFlex.gt-xs","30",1,"mb-12"],["aria-label","Select an option","formControlName","language",1,"ml-15","f14",3,"change"],["name","language","value","english","checked","",1,"mr-24"],["name","language","value","tamil",1,"mr-24"],["name","language","value","hindi",1,"mr-24"],["name","language","value","french",1,"mr-24"],["fxLayout","row wrap"],["fxFlex","100","fxFlex.gt-xs","15"],["fxFlex","100","fxFlex.gt-xs","70",1,"text-center"],["fxFlex","100","fxFlex.gt-xs","15",1,"text-right"],[1,"question-group"],["fxLayout","row wrap",1,"mb-8"],["fxFlex","100","fxFlex.gt-xs","80"],[1,"pt-8"],["fxFlex","100","fxFlex.gt-xs","20",1,"text-right"],["mat-flat-button","",1,"btn-white-bg","mb-4",3,"click"],["formArrayName","questions"],["hideToggle","false",3,"formGroupName","expanded","closed","click","opened",4,"ngFor","ngForOf"],["type","button","mat-raised-button","",1,"mt-12","icon-white-bg","ml-0",3,"disabled","click"],["_ngcontent-qyx-c19","",1,"material-icons","icon-image-preview"],[1,"p-8"],["appearance","fill",1,"full-width"],[3,"ngModel","ngModelChange"],["value","","disabled",""],[3,"value","click",4,"ngFor","ngForOf"],[3,"value","click"],[2,"border-top","1px solid grey"],[1,"pl-16",2,"list-style","none"],["style","display: flex;",4,"ngFor","ngForOf"],[2,"display","flex"],[3,"disabled","ngModel","change","ngModelChange"],[1,"import-question-name","ml-8",3,"innerHtml"],[1,"text-center",2,"position","absolute","top","95%","left","35%"],["mat-flat-button","",1,"btn-primary-bg",3,"click"],["hideToggle","false",3,"formGroupName","expanded","closed","click","opened"],[2,"width","100%"],["fxLayout","row wrap",2,"width","100%"],[1,"ml-8",3,"innerHtml"],[1,"editicon"],[1,"icons"],[1,"ml-16","removeicon",3,"click"],[1,"ml-16","unsaved"],[1,"ml-16","arrow-icon"],["fxLayout","row wrap",1,"mt-0"],["fxFlex","100","fxFlex.gt-xs","100",1,"mr-12"],[1,"mb-12"],["formControlName","questionName",3,"transliterate"],["fxFlex","100","fxFlex.gt-xs","100",1,"mt-12"],["fxFlex","100","fxFlex.gt-xs","85",1,"mr-12","mt-12"],["id","anskey","formControlName","anskey",3,"transliterate"],["fxLayout","row wrap",1,"mt-12"],["fxFlex","100","fxFlex.gt-xs","27",1,"mt-16"],["value","1","formControlName","isUploadPerm"],[1,"ml-12"],["fxFlex","100","fxFlex.gt-xs","27",1,"isUploadPerm"],["fxLayout","row wrap","formArrayName","attachment",1,"mt-16","mb-12"],["fxFlex","100","fxFlex.gt-xs","8",1,""],["fxFlex","100","fxFlex.gt-xs","75",1,""],["class","img-upload",4,"ngFor","ngForOf"],["type","file","accept","image/*","required","",2,"display","none",3,"change"],["fileInput",""],["src","assets/images/image-upload.png","height","40","weight","40",1,"ml-8",2,"cursor","pointer",3,"click"],[1,"mt-12"],["style","color: red;",4,"ngIf"],["mat-raised-button","",1,"btn-primary-bg","ml-0",2,"float","right",3,"click"],[1,"img-upload"],["class","ml-8","height","40","weight","40",3,"src",4,"ngIf"],["class","closeicon",3,"click",4,"ngIf"],["height","40","weight","40",1,"ml-8",3,"src"],[1,"closeicon",3,"click"],[2,"color","red"]],template:function(e,t){if(1&e){var c=W.ec();W.dc(0,"mat-sidenav-container",0),W.dc(1,"mat-sidenav",1,2),W.dc(3,"div",3),W.dc(4,"h4",4),W.dc(5,"strong"),W.cd(6,"Import Questions"),W.cc(),W.cc(),W.cc(),W.dc(7,"div"),W.dc(8,"div",5),W.dc(9,"mat-radio-group",6),W.lc("ngModelChange",(function(e){return t.selectedImportType=e})),W.dc(10,"mat-radio-button",7),W.lc("change",(function(e){return t.getHomeworks("homework")})),W.cd(11,"Home Work "),W.cc(),W.dc(12,"mat-radio-button",8),W.lc("change",(function(e){return t.getHomeworks("online_exam")})),W.cd(13,"Online Exam "),W.cc(),W.cc(),W.cc(),W.ad(14,Xa,7,2,"div",9),W.ad(15,Ra,3,1,"div",10),W.ad(16,Ba,4,0,"div",10),W.ad(17,$a,3,1,"div",11),W.cc(),W.cc(),W.dc(18,"mat-sidenav-content"),W.dc(19,"form",12),W.dc(20,"div",13),W.dc(21,"div",14),W.dc(22,"button",15),W.lc("click",(function(e){return t.console()})),W.cd(23),W.qc(24,"translate"),W.cc(),W.dc(25,"a",16),W.lc("click",(function(e){return t.discard()})),W.cd(26),W.qc(27,"translate"),W.cc(),W.cc(),W.dc(28,"div",17),W.dc(29,"div",18),W.dc(30,"div",19),W.dc(31,"label"),W.dc(32,"strong"),W.cd(33),W.qc(34,"translate"),W.cc(),W.cc(),W.cc(),W.dc(35,"div",20),W.cd(36),W.cc(),W.dc(37,"div",21),W.dc(38,"label"),W.dc(39,"strong"),W.cd(40),W.qc(41,"translate"),W.cc(),W.cc(),W.cc(),W.dc(42,"div",20),W.dc(43,"label"),W.cd(44),W.cc(),W.cc(),W.dc(45,"div",21),W.dc(46,"label"),W.dc(47,"strong"),W.cd(48),W.qc(49,"translate"),W.cc(),W.cc(),W.cc(),W.dc(50,"div",22),W.dc(51,"label"),W.cd(52),W.cc(),W.cc(),W.dc(53,"div",21),W.dc(54,"label"),W.dc(55,"strong"),W.cd(56),W.qc(57,"translate"),W.cc(),W.cc(),W.cc(),W.dc(58,"div",23),W.dc(59,"label"),W.cd(60),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(61,"div",24),W.dc(62,"div",25),W.dc(63,"label"),W.dc(64,"strong"),W.cd(65,"Select an Language"),W.cc(),W.cc(),W.cc(),W.dc(66,"div",26),W.dc(67,"mat-radio-group",27),W.lc("change",(function(e){return t.setTransLang(e.value)})),W.dc(68,"mat-radio-button",28),W.cd(69),W.qc(70,"translate"),W.cc(),W.dc(71,"mat-radio-button",29),W.cd(72),W.qc(73,"translate"),W.cc(),W.dc(74,"mat-radio-button",30),W.cd(75),W.qc(76,"translate"),W.cc(),W.dc(77,"mat-radio-button",31),W.cd(78),W.qc(79,"translate"),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(80,"mat-card"),W.dc(81,"div",32),W.dc(82,"div",33),W.dc(83,"h4"),W.dc(84,"strong"),W.cd(85),W.qc(86,"translate"),W.cc(),W.cc(),W.cc(),W.dc(87,"div",34),W.dc(88,"h3"),W.dc(89,"strong"),W.cd(90),W.cc(),W.cc(),W.dc(91,"h3"),W.dc(92,"strong"),W.cd(93),W.cc(),W.cc(),W.dc(94,"h4"),W.dc(95,"strong"),W.cd(96),W.qc(97,"translate"),W.cc(),W.cc(),W.cc(),W.dc(98,"div",35),W.dc(99,"h4"),W.dc(100,"strong"),W.cd(101),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(102,"div",36),W.dc(103,"div",37),W.dc(104,"div",38),W.dc(105,"h4",39),W.dc(106,"strong"),W.cd(107),W.cc(),W.cc(),W.cc(),W.dc(108,"div",40),W.dc(109,"button",41),W.lc("click",(function(e){return W.Sc(c),W.Oc(2).toggle(),t.resetImport()})),W.cd(110," Import Question "),W.cc(),W.cc(),W.cc(),W.dc(111,"mat-accordion",42),W.ad(112,Za,69,18,"mat-expansion-panel",43),W.dc(113,"button",44),W.lc("click",(function(e){return t.addImportQuestion()})),W.dc(114,"i",45),W.cd(115,"add"),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.cc()}2&e&&(W.yc("hasBackdrop",!0),W.Gb(1),W.yc("fixedInViewport",!0)("fixedTopGap",0)("fixedBottomGap",0),W.Gb(8),W.yc("ngModel",t.selectedImportType),W.Gb(5),W.yc("ngIf",""!=t.selectedImportType),W.Gb(1),W.yc("ngIf",t.importQuesAns.length>0),W.Gb(1),W.yc("ngIf",0==t.importQuesAns.length&&t.showQues),W.Gb(1),W.yc("ngIf",t.importQuesAns.length>0),W.Gb(2),W.yc("formGroup",t.importForm),W.Gb(4),W.dd(W.rc(24,34,"homework.question.button.saveContinue")),W.Gb(3),W.dd(W.rc(27,36,"homework.question.button.discard")),W.Gb(7),W.dd(W.rc(34,38,"homework.question.lable.Academic")),W.Gb(3),W.ed(" ",null==t.onlineexam?null:t.onlineexam.academicYearName," "),W.Gb(4),W.dd(W.rc(41,40,"homework.question.lable.Batch")),W.Gb(4),W.dd(null==t.onlineexam?null:t.onlineexam.batchName),W.Gb(4),W.dd(W.rc(49,42,"homework.question.lable.Class")),W.Gb(4),W.dd(null==t.onlineexam?null:t.onlineexam.className),W.Gb(4),W.dd(W.rc(57,44,"homework.question.lable.Section")),W.Gb(4),W.dd(t.selectedSectionIds.join()),W.Gb(9),W.ed(" ",W.rc(70,46,"homework.assignment.radio.english"),""),W.Gb(3),W.ed(" ",W.rc(73,48,"homework.assignment.radio.tamil"),""),W.Gb(3),W.ed(" ",W.rc(76,50,"homework.assignment.radio.hindi")," "),W.Gb(3),W.ed(" ",W.rc(79,52,"homework.assignment.radio.french"),""),W.Gb(7),W.fd("",W.rc(86,54,"homework.question.lable.Noof")," : ",null==t.group?null:t.group.noOfQus,""),W.Gb(5),W.dd(null==t.onlineexam?null:t.onlineexam.title),W.Gb(3),W.dd(null==t.onlineexam?null:t.onlineexam.subjectName),W.Gb(3),W.fd("",W.rc(97,56,"homework.question.lable.Marks")," : ",null==t.group?null:t.group.marks,""),W.Gb(5),W.ed("Prepared questions : ",t.noOfPreparedQus,""),W.Gb(6),W.dd(null==t.group?null:t.group.groupName),W.Gb(5),W.yc("ngForOf",t.importForm.get("questions").controls),W.Gb(1),W.yc("disabled",t.remainQues==t.importForm.value.questions.length-t.checkedQuesLength))},directives:[ja.b,ja.a,F.b,g.t,g.w,F.a,f.o,ja.c,g.D,g.u,g.k,xe.c,xe.a,b.a,g.i,x.a,La.a,g.e,f.n,ye.b,ye.e,j.a,y.p,v.a,La.c,g.l,La.e,La.f,w.a,Ea.a],pipes:[we.c,he.h],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.f24[_ngcontent-%COMP%]{font-size:24px;margin-left:-10px}.text-center[_ngcontent-%COMP%]{text-align:center!important}.text-right[_ngcontent-%COMP%]{text-align:right!important}.font20[_ngcontent-%COMP%]{font-size:27px}.font16[_ngcontent-%COMP%]{font-size:16px}mat-card.mat-card[_ngcontent-%COMP%]{border:1px solid hsla(0,0%,50.2%,.47843137254901963)}.f15[_ngcontent-%COMP%]{font-size:15px;margin-left:8px;margin-bottom:0}.prepared_qns[_ngcontent-%COMP%]{font-size:24px;position:relative;bottom:5px}.icon-red-bg[_ngcontent-%COMP%]{margin-left:9px;color:red}.icon-red-bg[_ngcontent-%COMP%], .icon-red-bg[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:21px}.isUploadPerm[_ngcontent-%COMP%]{margin-top:2%;margin-left:1%}.icons[_ngcontent-%COMP%]{font-size:15px;text-align:center;height:20px;width:20px;position:relative;top:2px}.editicon[_ngcontent-%COMP%]{border:1px solid grey;color:grey;border-radius:50%}.editicon[_ngcontent-%COMP%], .removeicon[_ngcontent-%COMP%]{width:20px;height:20px}.removeicon[_ngcontent-%COMP%]{border:1px solid red;color:red;border-radius:50%}.img-upload[_ngcontent-%COMP%] .icons[_ngcontent-%COMP%]{font-size:13px;text-align:center;height:15px;width:16px;position:relative;top:2px}.img-upload[_ngcontent-%COMP%] .closeicon[_ngcontent-%COMP%]{border:1px solid red;color:red;border-radius:50%;position:relative;bottom:45px}.img-upload[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border:1px solid #734f96;padding:2px}.import-question-name[_ngcontent-%COMP%]{white-space:normal}mat-sidenav-content[_ngcontent-%COMP%]{background:unset}mat-panel-title[_ngcontent-%COMP%]{width:85%}.unsaved[_ngcontent-%COMP%]{color:red}.saved[_ngcontent-%COMP%]{color:#21cf21}.mt-10[_ngcontent-%COMP%]{margin-top:-10px}mat-expansion-panel-header[_ngcontent-%COMP%]{height:unset!important;min-height:64px!important}.arrow-icon[_ngcontent-%COMP%]{position:relative;top:8px}"]}),ei),ci=["sidenav"];function ni(e,t){if(1&e){var c=W.ec();W.dc(0,"mat-option",51),W.lc("click",(function(e){W.Sc(c);var n=t.$implicit;return W.pc(2).getImportQuestions(n.id)})),W.cd(1),W.cc()}if(2&e){var n=t.$implicit;W.yc("value",n.id),W.Gb(1),W.ed(" ",n.title," ")}}function ai(e,t){if(1&e){var c=W.ec();W.dc(0,"div",46),W.dc(1,"mat-form-field",47),W.Yb(2,"mat-label"),W.dc(3,"mat-select",48),W.lc("ngModelChange",(function(e){return W.Sc(c),W.pc().dropDown=e})),W.dc(4,"mat-option",49),W.cd(5,"Select"),W.cc(),W.ad(6,ni,2,2,"mat-option",50),W.cc(),W.cc(),W.cc()}if(2&e){var n=W.pc();W.Gb(3),W.yc("ngModel",n.dropDown),W.Gb(3),W.yc("ngForOf",n.homeworks)}}function ii(e,t){if(1&e){var c=W.ec();W.dc(0,"li",55),W.dc(1,"mat-checkbox",56),W.lc("change",(function(e){W.Sc(c);var n=t.$implicit,a=t.index;return W.pc(2).checkimportEvent(e.checked,n,a)}))("ngModelChange",(function(e){return W.Sc(c),t.$implicit.checked=e})),W.cc(),W.Yb(2,"span",57),W.qc(3,"safeHtml"),W.cc()}if(2&e){var n=t.$implicit;W.Gb(1),W.yc("disabled",n.isDisabled)("ngModel",n.checked),W.Gb(1),W.yc("innerHtml",W.rc(3,3,n.questionName),W.Tc)}}function oi(e,t){if(1&e&&(W.dc(0,"div",52),W.dc(1,"ul",53),W.ad(2,ii,4,5,"li",54),W.cc(),W.cc()),2&e){var c=W.pc();W.Gb(2),W.yc("ngForOf",c.importQuesAns)}}function ri(e,t){1&e&&(W.dc(0,"div",52),W.dc(1,"ul",53),W.dc(2,"li",55),W.cd(3," No Data Found "),W.cc(),W.cc(),W.cc())}function si(e,t){if(1&e){var c=W.ec();W.dc(0,"div",58),W.dc(1,"button",59),W.lc("click",(function(e){return W.Sc(c),W.pc().selectedQues()})),W.cd(2),W.cc(),W.cc()}if(2&e){var n=W.pc();W.Gb(2),W.ed(" Import Questions (",n.selectedQuesCount,") ")}}function li(e,t){if(1&e){var c=W.ec();W.dc(0,"span",92),W.lc("click",(function(e){W.Sc(c);var t=W.pc().index,n=W.pc().index;return W.pc().removeImportQuesOption(n,t)})),W.dc(1,"i",93),W.cd(2,"delete"),W.cc(),W.cc()}}function di(e,t){if(1&e){var c=W.ec();W.dc(0,"div",85),W.dc(1,"div",86),W.dc(2,"label"),W.ad(3,li,3,0,"span",87),W.dc(4,"strong"),W.cd(5),W.qc(6,"translate"),W.cc(),W.cc(),W.cc(),W.dc(7,"div",88),W.Yb(8,"tgss-editor",89),W.cc(),W.dc(9,"div",90),W.dc(10,"label"),W.cd(11),W.qc(12,"translate"),W.cc(),W.Yb(13,"br"),W.dc(14,"span"),W.dc(15,"mat-checkbox",91),W.lc("change",(function(e){W.Sc(c);var n=t.index,a=W.pc().index;return W.pc().setValueForImportQuesOption(e,a,n)})),W.cc(),W.cc(),W.cc(),W.cc()}if(2&e){var n=t.index,a=W.pc().$implicit,i=W.pc();W.yc("formGroupName",n),W.Gb(3),W.yc("ngIf",a.controls.options.controls.length>1),W.Gb(2),W.ed(" ",W.rc(6,5,"homework.question.lable.Option"),""),W.Gb(3),W.yc("transliterate",i.transLang),W.Gb(3),W.ed(" ",W.rc(12,7,"homework.question.lable.Isanswer"),"")}}function ui(e,t){if(1&e&&W.Yb(0,"img",97),2&e){var c=W.pc().$implicit;W.yc("src",c.attachment,W.Vc)}}function mi(e,t){if(1&e){var c=W.ec();W.dc(0,"a",98),W.lc("click",(function(e){W.Sc(c);var t=W.pc(),n=t.$implicit,a=t.index,i=W.pc().index;return W.pc().deletePic(n,i,a)})),W.dc(1,"mat-icon",65),W.cd(2,"close"),W.cc(),W.cc()}}function pi(e,t){if(1&e&&(W.dc(0,"span",94),W.ad(1,ui,1,1,"img",95),W.ad(2,mi,3,0,"a",96),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.yc("ngIf",c.attachment),W.Gb(1),W.yc("ngIf",c.attachment)}}function hi(e,t){1&e&&(W.dc(0,"p",99),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.Gb(1),W.ed(" ",W.rc(2,1,"homework.assignment.error.fileSize"),""))}function fi(e,t){1&e&&(W.dc(0,"p",99),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.Gb(1),W.ed(" ",W.rc(2,1,"homework.assignment.error.maxFileCount"),""))}function gi(e,t){if(1&e){var c=W.ec();W.dc(0,"mat-expansion-panel",60),W.lc("closed",(function(e){W.Sc(c);var n=t.index;return W.pc().closedPanel(n)}))("click",(function(e){W.Sc(c);var n=t.index;return W.pc().click(n)}))("opened",(function(e){W.Sc(c);var n=t.index;return W.pc().setStep(n)})),W.dc(1,"mat-expansion-panel-header"),W.dc(2,"mat-panel-title",61),W.dc(3,"div",62),W.dc(4,"div",38),W.dc(5,"div",55),W.dc(6,"span"),W.cd(7),W.cc(),W.Yb(8,"span",63),W.qc(9,"safeHtml"),W.cc(),W.cc(),W.dc(10,"div",40),W.dc(11,"span",64),W.dc(12,"mat-icon",65),W.cd(13,"edit"),W.cc(),W.cc(),W.dc(14,"span",66),W.lc("click",(function(e){W.Sc(c);var n=t.index;return W.pc().removePanel(n)})),W.dc(15,"mat-icon",65),W.cd(16,"close"),W.cc(),W.cc(),W.dc(17,"span",67),W.cd(18),W.cc(),W.dc(19,"span",68),W.dc(20,"mat-icon"),W.cd(21),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(22,"mat-card"),W.dc(23,"div",69),W.dc(24,"div",70),W.dc(25,"div",71),W.dc(26,"label"),W.dc(27,"strong"),W.cd(28," Question Name"),W.cc(),W.cc(),W.cc(),W.Yb(29,"tgss-editor",72),W.cc(),W.cc(),W.dc(30,"div",73),W.ad(31,di,16,9,"div",74),W.cc(),W.dc(32,"button",44),W.lc("click",(function(e){W.Sc(c);var n=t.index;return W.pc().addImportQuesOption(n)})),W.dc(33,"i",45),W.cd(34,"add"),W.cc(),W.cc(),W.dc(35,"div",75),W.dc(36,"div",76),W.dc(37,"label"),W.dc(38,"strong"),W.cd(39,"Attachment"),W.cc(),W.cc(),W.cc(),W.dc(40,"div",77),W.ad(41,pi,3,2,"span",78),W.dc(42,"input",79,80),W.lc("change",(function(e){W.Sc(c);var n=t.index;return W.pc().onSelectedFile(e,n)})),W.cc(),W.dc(44,"img",81),W.lc("click",(function(e){return W.Sc(c),W.Oc(43).click()})),W.cc(),W.dc(45,"div",82),W.ad(46,hi,3,3,"p",83),W.ad(47,fi,3,3,"p",83),W.dc(48,"span"),W.cd(49,"Note : Only images can upload"),W.cc(),W.Yb(50,"br"),W.dc(51,"span"),W.cd(52,"Format : JPG, JPEG, PNG, BMP"),W.cc(),W.Yb(53,"br"),W.dc(54,"span"),W.cd(55,"File Size : Maximum 2MB"),W.cc(),W.Yb(56,"br"),W.cc(),W.cc(),W.cc(),W.dc(57,"button",84),W.lc("click",(function(e){W.Sc(c);var n=t.index;return W.pc().checkImportOptionValidationAndCreate(n)})),W.cd(58," Done "),W.cc(),W.cc(),W.cc()}if(2&e){var n=t.$implicit,a=t.index,i=W.pc();W.yc("formGroupName",a)("expanded",i.indexExpanded==a),W.Gb(7),W.ed("",a+1," ."),W.Gb(1),W.yc("innerHtml",W.rc(9,14,n.controls.questionName.value),W.Tc),W.Gb(9),W.Nb("saved",null==i.checkedQues[a]?null:i.checkedQues[a].isUpdated),W.Gb(1),W.dd(null!=i.checkedQues[a]&&i.checkedQues[a].isUpdated?"Saved":"Unsaved"),W.Gb(3),W.ed("",1==i.icon[a]?"keyboard_arrow_down":"keyboard_arrow_up"," "),W.Gb(8),W.yc("transliterate",i.transLang),W.Gb(2),W.yc("ngForOf",i.importForm.get("questions").controls[a].get("options").controls),W.Gb(1),W.yc("disabled",i.importForm.get("questions").controls[a].get("options").invalid),W.Gb(9),W.yc("ngForOf",null==i.checkedQues[a]?null:i.checkedQues[a].quesAttachment),W.Gb(5),W.yc("ngIf",i.isFileImportAttachSizeTooHigh[a]),W.Gb(1),W.yc("ngIf",i.isMaxFileImportAttachCountExceed[a])}}var bi,xi=((bi=function(){return _createClass((function e(t,c,n,a,i,o,r,s,l){_classCallCheck(this,e),this.modelService=t,this.router=c,this.loader=n,this.toaster=a,this.activateRoute=i,this.translate=o,this.location=r,this.cdr=s,this.fb=l,this.selectedSectionIds=[],this.eachMark=0,this.uploads=[],this.MaxFileCount=5,this.editorInstances=[],this.noOfPreparedQus=0,this.icon=[],this.selectedImportType="",this.selectedQuesCount=0,this.checkedQues=[],this.questions=[],this.checkedQuesLength=0,this.quesLang="",this.showQues=!1,this.dropDown="",this.importQuesAns=[],this.removedOptions=[],this.isFileImportAttachSizeTooHigh=[!1],this.isMaxFileImportAttachCountExceed=[!1],this.indexExpanded=-1,this.translate.setDefaultLang("en"),this.qusGrpId=this.activateRoute.snapshot.params.qusGrpId,this.language=localStorage.getItem("quesTranLang"),this.setTransLang(this.language);for(var d=0;d<=200;d++)this.icon.push(!1)}),[{key:"ngOnInit",value:function(){this.getOne(),this.buildForm(),this.buildImportForm(!0),this.addImportQuestion()}},{key:"buildForm",value:function(){this.questionForm=new g.j({question:new g.g("",[g.B.required]),isUploadPerm:new g.g(""),language:new g.g(this.language),options:new g.d([this.getOption()])}),console.log(this.questionForm.value)}},{key:"setTransLang",value:function(e){console.log(e,"language"),"english"==e?(this.transLang="en",this.quesLang="english"):"tamil"==e?(this.transLang="ta",this.quesLang="tamil"):"hindi"==e?(this.transLang="hi",this.quesLang="hindi"):"french"==e&&(this.transLang="fr",this.quesLang="french")}},{key:"getOption",value:function(){return new g.j({option_name:new g.g("",[g.B.required]),is_answer:new g.g(0)})}},{key:"addOption",value:function(){this.questionForm.controls.options.push(this.getOption())}},{key:"removeOption",value:function(e){this.questionForm.controls.options.removeAt(e)}},{key:"getOptionContol",value:function(){return this.questionForm.controls.options}},{key:"setValueForOption",value:function(e,t){this.getOptionContol().controls[t].patchValue(1==e.checked?{is_answer:1}:{is_answer:0})}},{key:"getOne",value:function(){var e=this;this.modelService.getQusGroupOne(this.qusGrpId).subscribe((function(t){"success"==t.keyword?(e.onlineexam=t.onlineexams[0],e.onlineexamId=e.onlineexam.onlineexamId,e.onlineexam.sections.forEach((function(t){e.selectedSectionIds.push(t.sectionName)})),e.group=e.onlineexam.group[0],e.noOfPreparedQus=e.group.noOfPreparedQus,e.noOfQus=e.group.noOfQus,e.eachMark=e.group.eachMark,e.remainQues=e.noOfQus-e.noOfPreparedQus,console.log(e.onlineexam),e.toaster.present(t.message)):(e.loader.close(),e.toaster.present(t.message))}))}},{key:"checkOptionvalidationAndcreate",value:function(){1==this.isAnswerValid()?this.create():Xe.a.fire({title:"Mandatory Option",text:"Check any one of the option",icon:"warning"})}},{key:"create",value:function(){var e=this,t=this.questionForm.value;if(this.questionForm.valid&&this.onlineexamId&&this.qusGrpId){this.loader.open();var c=new FormData;c.append("onlineexam_question_group_id",this.qusGrpId),c.append("onlineexam_id",this.onlineexamId),c.append("type","objective"),c.append("question_name",t.question),c.append("answer",""),c.append("options",JSON.stringify(t.options)),c.append("question_mark",this.eachMark<0?0:this.eachMark),c.append("is_permission_upload","1"==t.isUploadPerm?"1":"0"),this.uploads.forEach((function(e){c.append("attachment[]",e)})),this.modelService.saveQuestion(c,"create").subscribe((function(t){"success"==t.keyword?(e.submitButton.disabled=!1,e.noOfPreparedQus=e.noOfPreparedQus+1,e.loader.close(),e.noOfPreparedQus!=e.noOfQus?(e.questionForm.get("options").clear(),e.addOption(),e.questionForm.patchValue({question:"",isUploadPerm:""}),e.uploads=[]):e.noOfPreparedQus==e.group.noOfQus&&e.router.navigate(["/teacher/online-exam/onlineexam/",e.onlineexamId]),e.toaster.present(t.message,"")):(e.loader.close(),e.submitButton.disabled=!1,e.toaster.present(t.message))}))}else Xe.a.fire({title:"Check Required",text:"Fill Mandatory Fields",icon:"warning"})}},{key:"isAnswerValid",value:function(){var e=this.questionForm.value,t=[];return console.log(e.options),e.options.forEach((function(e){t.push(e.is_answer)})),t.reduce((function(e,t){return Number(e)+Number(t)||0}),0)}},{key:"onSelectFile",value:function(e){if(this.uploads=[],this.isFileSizeTooHigh=!1,this.isMaxFileCountExceed=!1,e.target.files.length>5)this.isMaxFileCountExceed=!0;else if(e.target.files&&e.target.files[0]){for(var t=e.target.files.length,c=0;c<t;c++)if(e.target.files[c].size>2e6){this.isFileSizeTooHigh=!0;break}if(!this.isFileSizeTooHigh&&!this.isMaxFileCountExceed)for(var n=0;n<t;n++)this.uploads.push(e.target.files[n])}}},{key:"clearFiles",value:function(){this.uploads=[],this.isFileSizeTooHigh=!1,this.isMaxFileCountExceed=!1}},{key:"discard",value:function(){console.log(this.onlineexamId,"this.onlineexamId"),this.router.navigate(["/teacher/online-exam/onlineexam/",this.onlineexamId])}},{key:"preview",value:function(){var e=this;this.router.navigate([]).then((function(t){window.open("/teacher/online-exam/preview/".concat(e.onlineexamId),"_blank")}))}},{key:"goBack",value:function(){this.location.back()}},{key:"getHomeworks",value:function(e){var t=this;this.modelService.getHomeworks(this.onlineexam.classId,this.onlineexam.subjectId,e,this.onlineexamId,this.quesLang).subscribe((function(e){"success"==e.keyword?(console.log("IMPORT onlineexam =>>>> ",e.data),t.homeworks=e.data,t.dropDown="",t.showQues=!1,t.importQuesAns=[]):(t.homeworks=[],t.dropDown="",t.showQues=!1,t.importQuesAns=[])}))}},{key:"resetImport",value:function(){this.importQuesAns=[],this.homeworks=[],this.selectedImportType="",this.selectedQuesCount=0,this.dropDown="",this.showQues=!1}},{key:"click",value:function(e){this.icon[e]=!this.icon[e]}},{key:"getImportQuestions",value:function(e){var t=this;this.modelService.getImportQuestions(e,"1"==this.selectedImportType?"homework":"online_exam",1).subscribe((function(e){"success"==e.keyword?(console.log("IMPORT QUES =>>>> ",e.questions),t.importQuesAns=e.questions,t.showQues=!0):(t.importQuesAns=[],t.showQues=!0)}))}},{key:"buildImportForm",value:function(e){this.importForm=new g.j({language:new g.g(this.language),questions:new g.d([this.getQuestions([])])}),e&&this.importForm.get("questions").removeAt(0)}},{key:"getQuestions",value:function(e){var t,c;return this.fb.group({questionName:new g.g(null===(t=e)||void 0===t?void 0:t.questionName,[g.B.required]),isUploadPerm:new g.g(null===(c=e)||void 0===c?void 0:c.isPermissionUpload),options:new g.d([this.getImportOption([])]),attachment:new g.d([this.getImportAttachment([])])})}},{key:"getImportOption",value:function(e){var t,c,n;return new g.j({option_id:new g.g(null===(t=e)||void 0===t?void 0:t.optionId),option_name:new g.g(null===(c=e)||void 0===c?void 0:c.optionName,[g.B.required]),is_answer:new g.g((null===(n=e)||void 0===n?void 0:n.isAnswer)?e.isAnswer:0)})}},{key:"setValueForImportQuesOption",value:function(e,t,c){this.importForm.get("questions").controls[t].get("options").controls[c].patchValue(1==e.checked?{is_answer:1}:{is_answer:0})}},{key:"getImportAttachment",value:function(e){var t,c,n;return new g.j({attachment_id:new g.g(null===(t=e)||void 0===t?void 0:t.attachmentId),attachment_name:new g.g(null===(c=e)||void 0===c?void 0:c.attachmentName),attachment:new g.g(null===(n=e)||void 0===n?void 0:n.attachment)})}},{key:"populateOption",value:function(e,t){var c=this,n=this.importForm.get("questions").controls[t].get("options");n.clear(),e.forEach((function(e){n.push(c.getImportOption(e))}))}},{key:"addImportQuesOption",value:function(e){this.importForm.get("questions").controls[e].get("options").push(this.getImportOption([]))}},{key:"removeImportQuesOption",value:function(e,t){var c=this.importForm.get("questions").controls[e].get("options"),n=this.removedOptions.findIndex((function(t){return t.getWholeIndex===e}));-1!==n?this.removedOptions[n].deleted.push({is_answer:c.value[t].is_answer,option_id:0,option_name:c.value[t].option_name}):this.removedOptions.push({deleted:[{is_answer:c.value[t].is_answer,option_id:0,option_name:c.value[t].option_name}],getWholeIndex:e}),c.removeAt(t)}},{key:"addImportQuestion",value:function(){var e=this.importForm.get("questions");e.push(this.getQuestions([])),this.indexExpanded=e.length-1,this.icon[e.length-1]=!this.icon[e.length-1];var t=this.setQuestion();t.isDisabled=!1,t.isUpdated=!1,t.checked=!1,t.customQues=!0,this.checkedQues.push(t)}},{key:"setQuestion",value:function(){var e=new V.e;return e.type="objective",e.questionId="",e.questionName="",e.studentAnswer="",e.studentOptionId="",e.isPermissionUpload="",e.questionMark="",e.obtainedMark="",e.quesOptions=[],e.quesAnswer=[],e.answer="",e.quesAttachment=[],e.studAttachment=[],e.isFavorite=0,e}},{key:"populateAttachment",value:function(e,t){var c=this,n=this.importForm.get("questions").controls[t].get("attachment");n.clear(),e.forEach((function(e){n.push(c.getImportAttachment(e))}))}},{key:"populateQuestions",value:function(e){var t=this,c=this.importForm.get("questions");c.clear(),e.forEach((function(e,n){var a,i;c.push(t.getQuestions(e)),t.populateOption(null===(a=e)||void 0===a?void 0:a.quesOptions,n),t.populateAttachment(null===(i=e)||void 0===i?void 0:i.quesAttachment,n)})),this.sideNav.toggle(),this.cdr.detectChanges()}},{key:"console",value:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){console.log(this.importForm.value,"value"),this.noOfPreparedQus==this.group.noOfQus?this.router.navigate(["/teacher/online-exam/onlineexam/",this.onlineexam]):Xe.a.fire({title:"Create Question",text:"The created question and saved question mismatched",icon:"warning"})}))},{key:"checkimportEvent",value:function(e,t,c){var n=this.importQuesAns.filter((function(e){return!0===e.checked}));this.selectedQuesCount=n.length,this.importQuesAns[c].isUpdated=!1}},{key:"selectAllImport",value:function(e){if(e.checked){var t=this.importQuesAns.length;this.importQuesAns.forEach((function(e){e.checked=!0,e.isUpdated=!1})),this.selectedQuesCount=t}else this.importQuesAns.forEach((function(e){e.checked=!1,e.isUpdated=!1})),this.selectedQuesCount=0}},{key:"setPatchValues",value:function(e){return t=this,n=_regenerator().m((function t(){var c,n,a,i,o,r;return _regenerator().w((function(t){for(;;)switch(t.p=t.n){case 0:c=_createForOfIteratorHelper(e.entries()),t.p=1,c.s();case 2:if((n=c.n()).done){t.n=6;break}return a=_slicedToArray(n.value,2),i=a[0],o=a[1],this.checkedQues[i].questionName=o.questionName,t.n=3,this.setPatchOptions(o.options);case 3:return this.checkedQues[i].quesOptions=t.v,t.n=4,this.setPatchAttachment(o.attachment);case 4:this.checkedQues[i].quesAttachment=t.v,this.checkedQues[i].isPermissionUpload=o.isUploadPerm;case 5:t.n=2;break;case 6:t.n=8;break;case 7:t.p=7,r=t.v,c.e(r);case 8:return t.p=8,c.f(),t.f(8);case 9:return t.a(2)}}),t,this,[[1,7,8,9]])})),new((c=void 0)||(c=Promise))((function(e,a){function i(e){try{r(n.next(e))}catch(t){a(t)}}function o(e){try{r(n.throw(e))}catch(t){a(t)}}function r(t){var n;t.done?e(t.value):(n=t.value,n instanceof c?n:new c((function(e){e(n)}))).then(i,o)}r((n=n.apply(t,[])).next())}));var t,c,n}},{key:"setPatchOptions",value:function(e){var t=[];return e.forEach((function(e){e.option_name&&t.push({isAnswer:e.is_answer,optionId:e.option_id,optionName:e.option_name})})),t}},{key:"setPatchAttachment",value:function(e){var t=[];return e.forEach((function(e){e.attachment&&t.push({attachment:e.attachment,attachmentId:e.attachment_id,attachmentName:e.attachment_name})})),t}},{key:"selectedQues",value:function(){var e,t,c=this;if(this.selectedQuesCount>0){var n=this.importQuesAns.filter((function(e){return!0===e.checked})).filter((function(e){return!c.checkedQues.some((function(t){return e.questionId===t.questionId}))}));console.log(null===(e=n)||void 0===e?void 0:e.length,this.remainQues),(null===(t=n)||void 0===t?void 0:t.length)+(this.importForm.value.questions.length-this.checkedQuesLength)>this.remainQues?(Xe.a.fire({title:"Import Question",text:"The created question and imported question mismatched",icon:"warning"}),n.forEach((function(e){var t=c.importQuesAns.findIndex((function(t){return e.questionId==t.questionId}));c.importQuesAns[t].checked=!1})),this.selectedQuesCount=0):(this.importQuesAns.forEach((function(e){e.checked&&(e.isDisabled=!0)})),this.setPatchValues(this.importForm.value.questions),this.checkedQues=[].concat(_toConsumableArray(this.checkedQues),_toConsumableArray(n)),this.populateQuestions(this.checkedQues),this.indexExpanded=-1,this.toaster.present("Imported Successfully"))}else this.sideNav.toggle(),this.cdr.detectChanges()}},{key:"deletePic",value:function(e,t,c){var n=this;if(e.attachmentId)this.importForm.get("questions").controls[t].get("attachment").removeAt(c),this.checkedQues[t].quesAttachment.splice(c,1);else{var a=new FormData;a.append("attachment",e.attachment_name),this.modelService.deleteImportAttach(a).subscribe((function(e){"success"==e.keyword?(n.importForm.get("questions").controls[t].get("attachment").removeAt(c),n.checkedQues[t].quesAttachment.splice(c,1),n.toaster.present(e.message,"")):n.toaster.present(e.message)}))}}},{key:"onSelectedFile",value:function(e,t){var c=this;if(this.isFileImportAttachSizeTooHigh[t]=!1,this.isMaxFileImportAttachCountExceed[t]=!1,e.target.files.length>5)this.isMaxFileImportAttachCountExceed[t]=!0;else if(e.target.files&&e.target.files[0]){for(var n=e.target.files.length,a=0;a<n;a++)if(e.target.files[a].size>2e6){this.isFileImportAttachSizeTooHigh[t]=!0;break}if(!this.isFileImportAttachSizeTooHigh[t]&&!this.isMaxFileImportAttachCountExceed[t])for(var i=0;i<n;i++){var o=new FormData;o.append("attachment",e.target.files[i]),this.modelService.uploadImportAttach(o).subscribe((function(e){var n;if("success"==e.keyword){var a=e.data,i=c.importForm.get("questions").controls[t].get("attachment"),o={attachmentId:"",attachmentName:a.attachment,attachment:a.attachment_url};i.push(c.getImportAttachment(o)),null===(n=c.checkedQues[t])||void 0===n||n.quesAttachment.push(o),c.toaster.present(e.message,"")}else c.toaster.present(e.message)}))}}}},{key:"setStep",value:function(e){this.checkedQues[e]&&(this.checkedQues[e].isUpdated=!1),this.indexExpanded=e}},{key:"closedPanel",value:function(e){}},{key:"nextStep",value:function(e){this.saveImportQuestion(e)}},{key:"checkImportOptionValidationAndCreate",value:function(e){1==this.isImportAnswerValid(e)?this.nextStep(e):(console.log(this.checkedQues),Xe.a.fire({title:"Mandatory Option",text:"Check any one of the option",icon:"warning"}))}},{key:"isImportAnswerValid",value:function(e){var t=this.importForm.get("questions").controls[e].value,c=[];return t.options.forEach((function(e){c.push(e.is_answer)})),c.reduce((function(e,t){return Number(e)+Number(t)||0}),0)}},{key:"setCustomQuesValue",value:function(e,t){e.questionId=t.question_id,e.questionName=t.question_name,e.questionMark=t.question_mark,e.quesOptions=t.ques_options,e.quesAttachment=t.ques_attachment}},{key:"saveImportQuestion",value:function(e){var t,c,n,a,i=this,o=this.importForm.get("questions").controls[e],r=o.value;console.log(o.value,o.valid);var s=[],l=[],d=[];if(null===(t=r)||void 0===t||t.attachment.forEach((function(e){""==e.attachment_id?d.push(e.attachment_name):l.push(e.attachment_name)})),o.valid&&this.onlineexamId&&this.qusGrpId)if(this.checkedQues[e].isUpdatedId){var u,m=this.removedOptions.findIndex((function(t){return t.getWholeIndex===e}));u=-1!==m?[].concat(_toConsumableArray(r.options),_toConsumableArray(this.removedOptions[m].deleted)):r.options,s=[{onlineexam_question_id:this.checkedQues[e].isUpdatedId,onlineexam_question_group_id:this.qusGrpId,onlineexam_id:this.onlineexamId,type:"objective",question_name:null===(c=r)||void 0===c?void 0:c.questionName,answer:"",is_permission_upload:"1"==r.isUploadPerm?"1":"0",question_mark:this.eachMark<0?0:this.eachMark,old_attachment:JSON.stringify(l),new_attachment:JSON.stringify(d),options:JSON.stringify(u)}],console.log(s,"questions"),this.loader.open();var p=new FormData;p.append("import_type","online_exam"),p.append("onlineexam_id",this.onlineexamId),p.append("question_data",JSON.stringify(s)),this.modelService.updateImportQuestion(p).subscribe((function(t){"success"==t.keyword?(console.log(t.data[0]),i.checkedQues[e].customQues&&i.setCustomQuesValue(i.checkedQues[e],t.data[0]),i.checkedQues[e].isUpdatedId=t.data[0].question_id,i.loader.close(),i.noOfPreparedQus!=i.noOfQus?(i.checkedQues[e].isUpdated=!0,i.indexExpanded=e==i.indexExpanded?-1:e):i.noOfPreparedQus==i.group.noOfQus&&i.router.navigate(["/teacher/online-exam/onlineexam/",i.onlineexamId]),i.toaster.present(t.message,"")):(i.loader.close(),i.toaster.present(t.message))}))}else{s=[{onlineexam_question_group_id:this.qusGrpId,type:"objective",question_name:null===(n=r)||void 0===n?void 0:n.questionName,answer:"",is_permission_upload:"1"==r.isUploadPerm?"1":"0",question_mark:this.eachMark<0?0:this.eachMark,old_attachment:JSON.stringify(l),new_attachment:JSON.stringify(d),options:JSON.stringify(null===(a=r)||void 0===a?void 0:a.options)}],console.log(s,"questions"),this.loader.open();var h=new FormData;h.append("import_type","online_exam"),h.append("onlineexam_id",this.onlineexamId),h.append("question_data",JSON.stringify(s)),this.modelService.saveImportQuestion(h).subscribe((function(t){"success"==t.keyword?(console.log(t.data[0]),i.checkedQues[e].customQues&&i.setCustomQuesValue(i.checkedQues[e],t.data[0]),i.checkedQues[e].isUpdatedId=t.data[0].question_id,i.noOfPreparedQus=i.noOfPreparedQus+1,i.remainQues=i.noOfQus-i.noOfPreparedQus,i.loader.close(),i.noOfPreparedQus!=i.noOfQus?(i.checkedQues[e].isUpdated=!0,i.checkedQuesLength=i.checkedQues.filter((function(e){return 1==e.isUpdated})).length,i.indexExpanded=e==i.indexExpanded?-1:e):i.noOfPreparedQus==i.group.noOfQus&&i.router.navigate(["/teacher/online-exam/onlineexam/",i.onlineexamId]),i.toaster.present(t.message,"")):(i.loader.close(),i.toaster.present(t.message))}))}else Xe.a.fire({title:"Check Required",text:"Fill Mandatory Fields",icon:"warning"})}},{key:"removePanel",value:function(e){var t=this;if(console.log(this.checkedQues),this.checkedQues[e].isUpdatedId){var c=new FormData;c.append("import_type","online_exam"),c.append("id",this.checkedQues[e].isUpdatedId),this.modelService.deleteQuestion(c).subscribe((function(c){if("success"==c.keyword){t.noOfPreparedQus=t.noOfPreparedQus-1,t.importForm.get("questions").removeAt(e);var n=t.checkedQues.splice(e,1),a=t.importQuesAns.findIndex((function(e){return e.questionId==n[0].questionId}));t.selectedQuesCount=t.selectedQuesCount>0?t.selectedQuesCount-1:0,-1!==a&&(t.importQuesAns[a].checked=!1,t.importQuesAns[a].isDisabled=!1),t.toaster.present(c.message)}else t.toaster.present(c.message)}))}else{var n=this.importForm.get("questions");console.log(n),n.removeAt(e);var a=this.checkedQues.splice(e,1),i=this.importQuesAns.findIndex((function(e){return e.questionId==a[0].questionId}));this.selectedQuesCount=this.selectedQuesCount>0?this.selectedQuesCount-1:0,-1!==i&&(this.importQuesAns[i].checked=!1,this.importQuesAns[i].isDisabled=!1)}}}])}()).\u0275fac=function(e){return new(e||bi)(W.Xb(le),W.Xb(h.g),W.Xb(de.a),W.Xb(ue.a),W.Xb(h.a),W.Xb(we.d),W.Xb(f.k),W.Xb(W.h),W.Xb(g.f))},bi.\u0275cmp=W.Rb({type:bi,selectors:[["app-approve"]],viewQuery:function(e,t){var c;1&e&&(W.md(b.a,!0),W.md(ci,!0)),2&e&&(W.Nc(c=W.mc())&&(t.submitButton=c.first),W.Nc(c=W.mc())&&(t.sideNav=c.first))},decls:116,vars:58,consts:[[1,"example-container",2,"min-height","535px",3,"hasBackdrop"],["position","end","mode","over",1,"example-sidenav","import-question-sidenav",3,"fixedInViewport","fixedTopGap","fixedBottomGap"],["sidenav",""],[1,"text-center","mat-bg-primary","pt-1","pb-1"],[1,"m-0"],[1,"p-16"],["aria-label","Select an option",3,"ngModel","ngModelChange"],["value","1",1,"mr-8",3,"change"],["value","2",3,"change"],["class","p-8",4,"ngIf"],["style","border-top:1px solid grey;",4,"ngIf"],["class","text-center","style","position:absolute;top:95%;left:35%;",4,"ngIf"],[3,"formGroup"],["fxLayout","row wrap",1,"mb-12"],["fxFlex","100","fxFlex.gt-xs","50"],["type","button","mat-raised-button","","color","primary",1,"btn-primary-bg",3,"click"],[1,"pl-8","primary-txt-color",3,"click"],["fxFlex","100","fxFlex.gt-xs","50",1,"mt-4"],["fxLayout","row wrap",1,"pl-16"],["fxFlex","100","fxFlex.gt-xs","16",1,"text-right"],["fxFlex","100","fxFlex.gt-xs","22",1,"pl-24"],["fxFlex","100","fxFlex.gt-xs","6",1,""],["fxFlex","100","fxFlex.gt-xs","10",1,"pl-24"],["fxFlex","100","fxFlex.gt-xs","10",1,"pl-24","mr-12"],["fxLayout","row wrap",1,"mt-12","text-right"],["fxFlex","100","fxFlex.gt-xs","70",1,"mt-0"],["fxFlex","100","fxFlex.gt-xs","30",1,"mb-12"],["aria-label","Select an option","formControlName","language",1,"ml-15","f14",3,"change"],["name","language","value","english","checked","",1,"mr-24"],["name","language","value","tamil",1,"mr-24"],["name","language","value","hindi",1,"mr-24"],["name","language","value","french",1,"mr-24"],["fxLayout","row wrap"],["fxFlex","100","fxFlex.gt-xs","15"],["fxFlex","100","fxFlex.gt-xs","70",1,"text-center"],["fxFlex","100","fxFlex.gt-xs","15",1,"text-right"],[1,"question-group"],["fxLayout","row wrap",1,"mb-8"],["fxFlex","100","fxFlex.gt-xs","80"],[1,"pt-8"],["fxFlex","100","fxFlex.gt-xs","20",1,"text-right"],["mat-flat-button","",1,"btn-white-bg","mb-4",3,"click"],["formArrayName","questions"],["hideToggle","false",3,"formGroupName","expanded","closed","click","opened",4,"ngFor","ngForOf"],["type","button","mat-raised-button","",1,"mt-12","icon-white-bg","ml-0",3,"disabled","click"],["_ngcontent-qyx-c19","",1,"material-icons","icon-image-preview"],[1,"p-8"],["appearance","fill",1,"full-width"],[3,"ngModel","ngModelChange"],["value","","disabled",""],[3,"value","click",4,"ngFor","ngForOf"],[3,"value","click"],[2,"border-top","1px solid grey"],[1,"pl-16",2,"list-style","none"],["style","display: flex;",4,"ngFor","ngForOf"],[2,"display","flex"],[3,"disabled","ngModel","change","ngModelChange"],[1,"import-question-name","ml-8",3,"innerHtml"],[1,"text-center",2,"position","absolute","top","95%","left","35%"],["mat-flat-button","",1,"btn-primary-bg",3,"click"],["hideToggle","false",3,"formGroupName","expanded","closed","click","opened"],[2,"width","100%"],["fxLayout","row wrap",2,"width","100%"],[1,"ml-8",3,"innerHtml"],[1,"editicon"],[1,"icons"],[1,"ml-16","removeicon",3,"click"],[1,"ml-16","unsaved"],[1,"ml-16","arrow-icon"],["fxLayout","row wrap",1,"mt-0"],["fxFlex","100","fxFlex.gt-xs","100",1,"mr-12"],[1,"mb-12"],["formControlName","questionName",3,"transliterate"],["formArrayName","options"],["fxLayout","row wrap","class","mt-0",3,"formGroupName",4,"ngFor","ngForOf"],["fxLayout","row wrap","formArrayName","attachment",1,"mt-16","mb-12"],["fxFlex","100","fxFlex.gt-xs","8",1,""],["fxFlex","100","fxFlex.gt-xs","75",1,""],["class","img-upload",4,"ngFor","ngForOf"],["type","file","accept","image/*","required","",2,"display","none",3,"change"],["fileInput",""],["src","assets/images/image-upload.png","height","40","weight","40",1,"ml-8",2,"cursor","pointer",3,"click"],[1,"mt-12"],["style","color: red;",4,"ngIf"],["mat-raised-button","",1,"btn-primary-bg","ml-0",2,"float","right",3,"click"],["fxLayout","row wrap",1,"mt-0",3,"formGroupName"],["fxFlex","100","fxFlex.gt-xs","5",1,"mt-12"],["class","icon-red-bg mt-8",3,"click",4,"ngIf"],["fxFlex","100","fxFlex.gt-xs","85",1,"mr-12","mt-12"],["formControlName","option_name",2,"height","100px",3,"transliterate"],["fxFlex","100","fxFlex.gt-xs","9",1,"mt-12","text-center"],["value","1","formControlName","is_answer",3,"change"],[1,"icon-red-bg","mt-8",3,"click"],["_ngcontent-qyx-c19","",1,"material-icons","icon-image-preview",2,"cursor","pointer"],[1,"img-upload"],["class","ml-8","height","40","weight","40",3,"src",4,"ngIf"],["class","closeicon",3,"click",4,"ngIf"],["height","40","weight","40",1,"ml-8",3,"src"],[1,"closeicon",3,"click"],[2,"color","red"]],template:function(e,t){if(1&e){var c=W.ec();W.dc(0,"mat-sidenav-container",0),W.dc(1,"mat-sidenav",1,2),W.dc(3,"div",3),W.dc(4,"h4",4),W.dc(5,"strong"),W.cd(6,"Import Questions"),W.cc(),W.cc(),W.cc(),W.dc(7,"div"),W.dc(8,"div",5),W.dc(9,"mat-radio-group",6),W.lc("ngModelChange",(function(e){return t.selectedImportType=e})),W.dc(10,"mat-radio-button",7),W.lc("change",(function(e){return t.getHomeworks("homework")})),W.cd(11,"Home Work "),W.cc(),W.dc(12,"mat-radio-button",8),W.lc("change",(function(e){return t.getHomeworks("online_exam")})),W.cd(13,"Online Exam "),W.cc(),W.cc(),W.cc(),W.ad(14,ai,7,2,"div",9),W.ad(15,oi,3,1,"div",10),W.ad(16,ri,4,0,"div",10),W.ad(17,si,3,1,"div",11),W.cc(),W.cc(),W.dc(18,"mat-sidenav-content"),W.dc(19,"form",12),W.dc(20,"div",13),W.dc(21,"div",14),W.dc(22,"button",15),W.lc("click",(function(e){return t.console()})),W.cd(23),W.qc(24,"translate"),W.cc(),W.dc(25,"a",16),W.lc("click",(function(e){return t.discard()})),W.cd(26),W.qc(27,"translate"),W.cc(),W.cc(),W.dc(28,"div",17),W.dc(29,"div",18),W.dc(30,"div",19),W.dc(31,"label"),W.dc(32,"strong"),W.cd(33),W.qc(34,"translate"),W.cc(),W.cc(),W.cc(),W.dc(35,"div",20),W.cd(36),W.cc(),W.dc(37,"div",21),W.dc(38,"label"),W.dc(39,"strong"),W.cd(40),W.qc(41,"translate"),W.cc(),W.cc(),W.cc(),W.dc(42,"div",20),W.dc(43,"label"),W.cd(44),W.cc(),W.cc(),W.dc(45,"div",21),W.dc(46,"label"),W.dc(47,"strong"),W.cd(48),W.qc(49,"translate"),W.cc(),W.cc(),W.cc(),W.dc(50,"div",22),W.dc(51,"label"),W.cd(52),W.cc(),W.cc(),W.dc(53,"div",21),W.dc(54,"label"),W.dc(55,"strong"),W.cd(56),W.qc(57,"translate"),W.cc(),W.cc(),W.cc(),W.dc(58,"div",23),W.dc(59,"label"),W.cd(60),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(61,"div",24),W.dc(62,"div",25),W.dc(63,"label"),W.dc(64,"strong"),W.cd(65,"Select an Language"),W.cc(),W.cc(),W.cc(),W.dc(66,"div",26),W.dc(67,"mat-radio-group",27),W.lc("change",(function(e){return t.setTransLang(e.value)})),W.dc(68,"mat-radio-button",28),W.cd(69),W.qc(70,"translate"),W.cc(),W.dc(71,"mat-radio-button",29),W.cd(72),W.qc(73,"translate"),W.cc(),W.dc(74,"mat-radio-button",30),W.cd(75),W.qc(76,"translate"),W.cc(),W.dc(77,"mat-radio-button",31),W.cd(78),W.qc(79,"translate"),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(80,"mat-card"),W.dc(81,"div",32),W.dc(82,"div",33),W.dc(83,"h4"),W.dc(84,"strong"),W.cd(85),W.qc(86,"translate"),W.cc(),W.cc(),W.cc(),W.dc(87,"div",34),W.dc(88,"h3"),W.dc(89,"strong"),W.cd(90),W.cc(),W.cc(),W.dc(91,"h3"),W.dc(92,"strong"),W.cd(93),W.cc(),W.cc(),W.dc(94,"h4"),W.dc(95,"strong"),W.cd(96),W.qc(97,"translate"),W.cc(),W.cc(),W.cc(),W.dc(98,"div",35),W.dc(99,"h4"),W.dc(100,"strong"),W.cd(101),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(102,"div",36),W.dc(103,"div",37),W.dc(104,"div",38),W.dc(105,"h4",39),W.dc(106,"strong"),W.cd(107),W.cc(),W.cc(),W.cc(),W.dc(108,"div",40),W.dc(109,"button",41),W.lc("click",(function(e){return W.Sc(c),W.Oc(2).toggle(),t.resetImport()})),W.cd(110," Import Question "),W.cc(),W.cc(),W.cc(),W.dc(111,"mat-accordion",42),W.ad(112,gi,59,16,"mat-expansion-panel",43),W.dc(113,"button",44),W.lc("click",(function(e){return t.addImportQuestion()})),W.dc(114,"i",45),W.cd(115,"add"),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.cc()}2&e&&(W.yc("hasBackdrop",!0),W.Gb(1),W.yc("fixedInViewport",!0)("fixedTopGap",0)("fixedBottomGap",0),W.Gb(8),W.yc("ngModel",t.selectedImportType),W.Gb(5),W.yc("ngIf",""!=t.selectedImportType),W.Gb(1),W.yc("ngIf",t.importQuesAns.length>0),W.Gb(1),W.yc("ngIf",0==t.importQuesAns.length&&t.showQues),W.Gb(1),W.yc("ngIf",t.importQuesAns.length>0),W.Gb(2),W.yc("formGroup",t.importForm),W.Gb(4),W.dd(W.rc(24,34,"homework.question.button.saveContinue")),W.Gb(3),W.dd(W.rc(27,36,"homework.question.button.discard")),W.Gb(7),W.dd(W.rc(34,38,"homework.question.lable.Academic")),W.Gb(3),W.ed(" ",null==t.onlineexam?null:t.onlineexam.academicYearName," "),W.Gb(4),W.dd(W.rc(41,40,"homework.question.lable.Batch")),W.Gb(4),W.dd(null==t.onlineexam?null:t.onlineexam.batchName),W.Gb(4),W.dd(W.rc(49,42,"homework.question.lable.Class")),W.Gb(4),W.dd(null==t.onlineexam?null:t.onlineexam.className),W.Gb(4),W.dd(W.rc(57,44,"homework.question.lable.Section")),W.Gb(4),W.dd(t.selectedSectionIds.join()),W.Gb(9),W.ed(" ",W.rc(70,46,"homework.assignment.radio.english"),""),W.Gb(3),W.ed(" ",W.rc(73,48,"homework.assignment.radio.tamil"),""),W.Gb(3),W.ed(" ",W.rc(76,50,"homework.assignment.radio.hindi")," "),W.Gb(3),W.ed(" ",W.rc(79,52,"homework.assignment.radio.french"),""),W.Gb(7),W.fd("",W.rc(86,54,"homework.question.lable.Noof")," : ",null==t.group?null:t.group.noOfQus,""),W.Gb(5),W.dd(null==t.onlineexam?null:t.onlineexam.title),W.Gb(3),W.dd(null==t.onlineexam?null:t.onlineexam.subjectName),W.Gb(3),W.fd("",W.rc(97,56,"homework.question.lable.Marks")," : ",null==t.group?null:t.group.marks,""),W.Gb(5),W.ed("Prepared questions : ",t.noOfPreparedQus,""),W.Gb(6),W.dd(null==t.group?null:t.group.groupName),W.Gb(5),W.yc("ngForOf",t.importForm.get("questions").controls),W.Gb(1),W.yc("disabled",t.remainQues==t.importForm.value.questions.length-t.checkedQuesLength))},directives:[ja.b,ja.a,F.b,g.t,g.w,F.a,f.o,ja.c,g.D,g.u,g.k,xe.c,xe.a,b.a,g.i,x.a,La.a,g.e,f.n,ye.b,ye.e,j.a,y.p,v.a,La.c,g.l,La.e,La.f,w.a,Ea.a],pipes:[we.c,he.h],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.f24[_ngcontent-%COMP%]{font-size:24px;margin-left:-10px}.text-center[_ngcontent-%COMP%]{text-align:center!important}.text-right[_ngcontent-%COMP%]{text-align:right!important}.font20[_ngcontent-%COMP%]{font-size:27px}.font16[_ngcontent-%COMP%]{font-size:16px}mat-card.mat-card[_ngcontent-%COMP%]{border:1px solid hsla(0,0%,50.2%,.47843137254901963)}.f15[_ngcontent-%COMP%]{font-size:15px;margin-left:8px;margin-bottom:0}.prepared_qns[_ngcontent-%COMP%]{font-size:24px;position:relative;bottom:5px}.icon-red-bg[_ngcontent-%COMP%]{margin-left:9px;color:red}.icon-red-bg[_ngcontent-%COMP%], .icon-red-bg[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:21px}.isUploadPerm[_ngcontent-%COMP%]{margin-top:2%;margin-left:1%}.icons[_ngcontent-%COMP%]{font-size:15px;text-align:center;height:20px;width:20px;position:relative;top:2px}.editicon[_ngcontent-%COMP%]{border:1px solid grey;color:grey;border-radius:50%}.editicon[_ngcontent-%COMP%], .removeicon[_ngcontent-%COMP%]{width:20px;height:20px}.removeicon[_ngcontent-%COMP%]{border:1px solid red;color:red;border-radius:50%}.img-upload[_ngcontent-%COMP%] .icons[_ngcontent-%COMP%]{font-size:13px;text-align:center;height:15px;width:16px;position:relative;top:2px}.img-upload[_ngcontent-%COMP%] .closeicon[_ngcontent-%COMP%]{border:1px solid red;color:red;border-radius:50%;position:relative;bottom:45px}.img-upload[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border:1px solid #734f96;padding:2px}.import-question-name[_ngcontent-%COMP%]{white-space:normal}mat-sidenav-content[_ngcontent-%COMP%]{background:unset}mat-panel-title[_ngcontent-%COMP%]{width:85%}.unsaved[_ngcontent-%COMP%]{color:red}.saved[_ngcontent-%COMP%]{color:#21cf21}.mt-10[_ngcontent-%COMP%]{margin-top:-10px}mat-expansion-panel-header[_ngcontent-%COMP%]{height:unset!important;min-height:64px!important}.arrow-icon[_ngcontent-%COMP%]{position:relative;top:8px}"]}),bi);function vi(e,t){1&e&&W.Yb(0,"th",27)}var yi=function(){return{width:"2%"}};function ki(e,t){if(1&e){var c=W.ec();W.dc(0,"td",28),W.dc(1,"mat-checkbox",29),W.lc("click",(function(e){return W.Sc(c),e.stopPropagation()}))("change",(function(e){W.Sc(c);var n=t.$implicit,a=W.pc();return e?a.selection.toggle(n):null})),W.cc(),W.cc()}if(2&e){var n=t.$implicit,a=W.pc();W.yc("ngStyle",W.Ec(2,yi)),W.Gb(1),W.yc("checked",a.selection.isSelected(n))}}function wi(e,t){1&e&&(W.dc(0,"th",30),W.cd(1," S.No "),W.cc())}function _i(e,t){if(1&e&&(W.dc(0,"td",31),W.cd(1),W.cc()),2&e){var c=t.index;W.Gb(1),W.ed(" ",c+1," ")}}function Ci(e,t){1&e&&(W.dc(0,"th",32),W.cd(1," Question Name "),W.cc())}function Oi(e,t){1&e&&(W.Yb(0,"td",33),W.qc(1,"safeHtml")),2&e&&W.yc("innerHtml",W.rc(1,1,t.$implicit.questionName),W.Tc)}function Fi(e,t){1&e&&W.Yb(0,"tr",34)}function qi(e,t){1&e&&W.Yb(0,"tr",35)}var Gi,Ii=((Gi=function(){return _createClass((function e(t,c,n,a,i,o){_classCallCheck(this,e),this.modelService=t,this.router=c,this.loader=n,this.toaster=a,this.activateRoute=i,this.translate=o,this.displayedColumns=["check","sNo","questionName"],this.dataSource=new T.o,this.selection=new ze.c(!0,[]),this.id=0,this.selectedSectionIds=[],o.setDefaultLang("en"),this.onlineexamId=this.activateRoute.snapshot.params.onlineexamId,this.qusGrpId=this.activateRoute.snapshot.params.qusGrpId}),[{key:"ngOnInit",value:function(){this.getOne()}},{key:"getOne",value:function(){var e=this;this.loader.open(),this.modelService.getQustionList(this.onlineexamId,this.qusGrpId).subscribe((function(t){"success"==t.keyword?(e.onlineexam=t.onlineexams[0],e.onlineexam.sections.forEach((function(t){e.selectedSectionIds.push(t.sectionName)})),e.dataSource=new T.o(e.onlineexam.questions),e.loader.close(),e.toaster.present(t.message)):(e.loader.close(),e.toaster.present(t.message))}))}},{key:"getCheckedValue",value:function(){var e=this,t=[];return this.dataSource.connect().value.forEach((function(c){e.selection.isSelected(c)&&t.push(c)})),t}},{key:"action",value:function(){if(1==this.getCheckedValue().length){var e=this.getCheckedValue()[0].questionId;this.router.navigate(["/teacher/online-exam/editonlineexam-start/".concat(e)])}else Xe.a.fire({icon:"error",title:"Update Question",text:"Please Select One Question!"})}},{key:"discard",value:function(){console.log(this.onlineexamId,"this.onlineexamId"),this.router.navigate(["/teacher/online-exam/onlineexam/".concat(this.onlineexamId)])}}])}()).\u0275fac=function(e){return new(e||Gi)(W.Xb(le),W.Xb(h.g),W.Xb(de.a),W.Xb(ue.a),W.Xb(h.a),W.Xb(we.d))},Gi.\u0275cmp=W.Rb({type:Gi,selectors:[["app-create"]],viewQuery:function(e,t){var c;1&e&&W.Yc(N.a,!0),2&e&&W.Nc(c=W.mc())&&(t.paginator=c.first)},decls:60,vars:24,consts:[[1,"create_btn"],[1,"pl-12","primary-txt-color",3,"click"],["fxLayout","row wrap",1,"mt-8","mb-8","pt-6","pl-16"],["fxFlex","100","fxFlex.gt-xs","13",1,"mt-16"],["fxFlex","100","fxFlex.gt-xs","9",1,"mt-16"],["fxFlex","100","fxFlex.gt-xs","8",1,"mt-16"],["fxFlex","100","fxFlex.gt-xs","10",1,"mt-16"],["fxFlex","100","fxFlex.gt-xs","13",1,"mr-12","mt-16"],[1,"border-top"],[1,"p-16"],[1,"text-center","font20","mb-0"],[1,"text-center"],[1,"table_container"],["mat-table","",1,"full-width",3,"dataSource"],["matColumnDef","check"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","","class","pt-0 pl-16 pr-16 text-center",3,"ngStyle",4,"matCellDef"],["matColumnDef","sNo"],["mat-header-cell","","style","width:5%;",4,"matHeaderCellDef"],["mat-cell","","class","pt-4",4,"matCellDef"],["matColumnDef","questionName"],["mat-header-cell","","style","width:25%;",4,"matHeaderCellDef"],["mat-cell","","class","pt-4 sun-editor-custom-style",3,"innerHtml",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"text-center","mt-24"],["type","button","mat-raised-button","","color","primary",1,"btn-primary-bg","start_btn","text-center",3,"click"],["mat-header-cell",""],["mat-cell","",1,"pt-0","pl-16","pr-16","text-center",3,"ngStyle"],[3,"checked","click","change"],["mat-header-cell","",2,"width","5%"],["mat-cell","",1,"pt-4"],["mat-header-cell","",2,"width","25%"],["mat-cell","",1,"pt-4","sun-editor-custom-style",3,"innerHtml"],["mat-header-row",""],["mat-row",""]],template:function(e,t){1&e&&(W.dc(0,"div",0),W.dc(1,"a",1),W.lc("click",(function(e){return t.discard()})),W.cd(2),W.qc(3,"translate"),W.cc(),W.cc(),W.dc(4,"div",2),W.dc(5,"div",3),W.dc(6,"label"),W.dc(7,"strong"),W.cd(8),W.qc(9,"translate"),W.cc(),W.cc(),W.cc(),W.dc(10,"div",3),W.cd(11),W.cc(),W.dc(12,"div",4),W.dc(13,"label"),W.dc(14,"strong"),W.cd(15),W.qc(16,"translate"),W.cc(),W.cc(),W.cc(),W.dc(17,"div",3),W.dc(18,"label"),W.cd(19),W.cc(),W.cc(),W.dc(20,"div",5),W.dc(21,"label"),W.dc(22,"strong"),W.cd(23),W.qc(24,"translate"),W.cc(),W.cc(),W.cc(),W.dc(25,"div",3),W.dc(26,"label"),W.cd(27),W.cc(),W.cc(),W.dc(28,"div",6),W.dc(29,"label"),W.dc(30,"strong"),W.cd(31),W.qc(32,"translate"),W.cc(),W.cc(),W.cc(),W.dc(33,"div",7),W.dc(34,"label"),W.cd(35),W.cc(),W.cc(),W.cc(),W.Yb(36,"div",8),W.dc(37,"div",9),W.dc(38,"p",10),W.dc(39,"strong"),W.cd(40),W.cc(),W.cc(),W.dc(41,"h3",11),W.dc(42,"strong"),W.cd(43),W.cc(),W.cc(),W.dc(44,"div",12),W.dc(45,"table",13),W.bc(46,14),W.ad(47,vi,1,0,"th",15),W.ad(48,ki,2,3,"td",16),W.ac(),W.bc(49,17),W.ad(50,wi,2,0,"th",18),W.ad(51,_i,2,1,"td",19),W.ac(),W.bc(52,20),W.ad(53,Ci,2,0,"th",21),W.ad(54,Oi,2,3,"td",22),W.ac(),W.ad(55,Fi,1,0,"tr",23),W.ad(56,qi,1,0,"tr",24),W.cc(),W.cc(),W.dc(57,"div",25),W.dc(58,"button",26),W.lc("click",(function(e){return t.action()})),W.cd(59,"Update "),W.cc(),W.cc(),W.cc()),2&e&&(W.Gb(2),W.dd(W.rc(3,14,"homework.question.button.discard")),W.Gb(6),W.dd(W.rc(9,16,"homework.question.newcreateDetail.lable.Academic")),W.Gb(3),W.ed(" ",null==t.onlineexam?null:t.onlineexam.academicYearName," "),W.Gb(4),W.dd(W.rc(16,18,"homework.question.newcreateDetail.lable.Batch")),W.Gb(4),W.dd(null==t.onlineexam?null:t.onlineexam.batchName),W.Gb(4),W.dd(W.rc(24,20,"homework.question.newcreateDetail.lable.Class")),W.Gb(4),W.dd(null==t.onlineexam?null:t.onlineexam.className),W.Gb(4),W.dd(W.rc(32,22,"homework.question.newcreateDetail.lable.Section")),W.Gb(4),W.dd(t.selectedSectionIds.join()),W.Gb(5),W.dd(null==t.onlineexam?null:t.onlineexam.title),W.Gb(3),W.dd(null==t.onlineexam?null:t.onlineexam.subjectName),W.Gb(2),W.yc("dataSource",t.dataSource),W.Gb(10),W.yc("matHeaderRowDef",t.displayedColumns),W.Gb(1),W.yc("matRowDefColumns",t.displayedColumns))},directives:[xe.c,xe.a,T.n,T.c,T.i,T.b,T.k,T.m,b.a,T.h,T.a,f.p,_t.b,v.a,T.j,T.l],pipes:[we.c,he.h],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.row[_ngcontent-%COMP%]{margin-top:-10px}.f24[_ngcontent-%COMP%]{font-size:24px;margin-left:-10px}.text-center[_ngcontent-%COMP%]{text-align:center!important}.text-right[_ngcontent-%COMP%]{text-align:right!important}.font20[_ngcontent-%COMP%]{font-size:27px}.font16[_ngcontent-%COMP%]{font-size:16px}mat-card.mat-card[_ngcontent-%COMP%]{border:1px solid hsla(0,0%,50.2%,.47843137254901963)}.f15[_ngcontent-%COMP%]{font-size:15px;margin-left:8px;margin-bottom:0}.start_btn[_ngcontent-%COMP%]{line-height:30px!important;padding:5px 17px!important;min-width:120px!important}.check_btn[_ngcontent-%COMP%]{color:green;top:4px;left:5px;font-size:21px;height:36px}.check_btn[_ngcontent-%COMP%], .edit_btn[_ngcontent-%COMP%]{position:relative;font-weight:700}.edit_btn[_ngcontent-%COMP%]{top:0;left:7px;font-size:10px;height:20px;width:20px;background:rgba(0,0,255,.8313725490196079);color:#fff;border-radius:50%;text-align:center;padding:0;line-height:19px;cursor:pointer}"]}),Gi);function Si(e,t){if(1&e&&(W.dc(0,"div",23),W.dc(1,"div",54),W.dc(2,"label"),W.dc(3,"strong"),W.cd(4,"Answer Key"),W.cc(),W.cc(),W.cc(),W.dc(5,"div",55),W.Yb(6,"tgss-editor",56),W.cc(),W.cc()),2&e){var c=W.pc();W.Gb(6),W.yc("transliterate",c.transLang)}}function Mi(e,t){if(1&e){var c=W.ec();W.dc(0,"span",63),W.lc("click",(function(e){W.Sc(c);var t=W.pc().index;return W.pc().removeOption(t)})),W.dc(1,"i",64),W.cd(2,"delete"),W.cc(),W.cc()}}function Pi(e,t){if(1&e&&(W.dc(0,"div",57),W.dc(1,"div",58),W.dc(2,"label"),W.ad(3,Mi,3,0,"span",59),W.dc(4,"strong"),W.cd(5),W.qc(6,"translate"),W.cc(),W.cc(),W.cc(),W.dc(7,"div",55),W.Yb(8,"tgss-editor",60),W.cc(),W.dc(9,"div",61),W.dc(10,"label"),W.cd(11),W.qc(12,"translate"),W.cc(),W.Yb(13,"br"),W.dc(14,"span"),W.Yb(15,"mat-checkbox",62),W.cc(),W.cc(),W.cc()),2&e){var c=t.index,n=W.pc();W.yc("formGroupName",c),W.Gb(3),W.yc("ngIf",n.questionForm.controls.options.controls.length>1),W.Gb(2),W.ed(" ",W.rc(6,6,"homework.question.lable.Option"),""),W.Gb(3),W.yc("transliterate",n.transLang)("id","opteditor"+c),W.Gb(3),W.ed(" ",W.rc(12,8,"homework.question.lable.Isanswer"),"")}}function Qi(e,t){if(1&e){var c=W.ec();W.dc(0,"button",65),W.lc("click",(function(e){return W.Sc(c),W.pc().addOption()})),W.dc(1,"i",66),W.cd(2,"add"),W.cc(),W.cc()}if(2&e){var n=W.pc();W.yc("disabled",n.questionForm.get("options").invalid)}}function Ni(e,t){1&e&&(W.dc(0,"div",67),W.dc(1,"div",68),W.Yb(2,"mat-checkbox",69),W.dc(3,"label",70),W.dc(4,"strong"),W.cd(5),W.qc(6,"translate"),W.cc(),W.cc(),W.cc(),W.cc()),2&e&&(W.Gb(5),W.ed(" ",W.rc(6,1,"homework.question.lable.isUploadPerm")," "))}function Ai(e,t){if(1&e&&(W.dc(0,"label"),W.cd(1),W.cc()),2&e){var c=W.pc();W.Gb(1),W.ed(" ",c.uploads.length," files selected ")}}function Di(e,t){if(1&e){var c=W.ec();W.dc(0,"button",71),W.lc("click",(function(e){return W.Sc(c),W.pc().clearFiles()})),W.dc(1,"mat-icon"),W.cd(2,"close"),W.cc(),W.cc()}}function Ti(e,t){1&e&&(W.dc(0,"p",72),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.Gb(1),W.ed(" ",W.rc(2,1,"homework.assignment.error.fileSize"),""))}function ji(e,t){1&e&&(W.dc(0,"p",72),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.Gb(1),W.ed(" ",W.rc(2,1,"homework.assignment.error.maxFileCount"),""))}var Li,Ei=((Li=function(){return _createClass((function e(t,c,n,a,i,o,r){_classCallCheck(this,e),this.modelService=t,this.router=c,this.loader=n,this.toaster=a,this.activateRoute=i,this.translate=o,this.fb=r,this.selectedSectionIds=[],this.eachMark=0,this.uploads=[],this.MaxFileCount=5,this.editorInstances=[],this.noOfPreparedQus=0,this.deletedIds=[],this.isNewInsert=0,this.questionId=this.activateRoute.snapshot.params.questionId,this.language=localStorage.getItem("quesTranLang"),this.setTransLang(this.language)}),[{key:"ngOnInit",value:function(){this.getOne(),this.buildForm()}},{key:"ngAfterViewInit",value:function(){}},{key:"buildForm",value:function(){this.questionForm=this.fb.group({question:new g.g("",[g.B.required]),anskey:new g.g(""),isUploadPerm:new g.g(""),language:new g.g(this.language),options:new g.d([this.getOption([])])}),console.log(this.questionForm.value)}},{key:"getOption",value:function(e){return this.fb.group({option_id:[e.optionId?e.optionId:0],option_name:[e.optionName||"",[g.B.required]],is_answer:[e.isAnswer||0]})}},{key:"setTransLang",value:function(e){console.log(e,"language"),"english"==e?this.transLang="en":"tamil"==e?this.transLang="ta":"hindi"==e?this.transLang="hi":"french"==e&&(this.transLang="fr")}},{key:"addOption",value:function(){this.questionForm.controls.options.push(this.getOption([]))}},{key:"removeOption",value:function(e){var t=this.questionForm.controls.options;this.deletedIds.push(t.value[e].option_id),t.removeAt(e)}},{key:"getOne",value:function(){var e=this;this.loader.open(),this.modelService.getQustionOne(this.questionId).subscribe((function(t){"success"==t.keyword?(e.onlineexam=t.onlineexams[0],console.log(e.onlineexam,"this.home12345678work"),e.onlineexamId=e.onlineexam.onlineexamId,e.common(),e.loader.close(),e.toaster.present(t.message)):(e.loader.close(),e.toaster.present(t.message))}))}},{key:"common",value:function(){var e,t=this;this.onlineexam.sections.forEach((function(e){t.selectedSectionIds.push(e.sectionName)})),this.group=this.onlineexam.group[0],this.noOfPreparedQus=null===(e=this.group)||void 0===e?void 0:e.noOfPreparedQus,this.onlineexam.questions[0].quesAttachment.forEach((function(e){t.uploads.push(e.attachment)})),this.questionGroupId=this.group.questionGroupId,this.setValue(this.onlineexam.questions[0]),this.populateOptions(this.onlineexam.questions[0].quesOptions),this.type=this.onlineexam.questions[0].type,"non-objective"==this.type&&this.questionForm.get("anskey").setValidators([g.B.required])}},{key:"setValue",value:function(e){this.questionForm.patchValue({question:e.questionName,isUploadPerm:e.isPermissionUpload,anskey:e.answer})}},{key:"populateOptions",value:function(e){var t=this,c=this.questionForm.get("options");c.clear(),e.forEach((function(e){c.push(t.getOption(e))}))}},{key:"update",value:function(){var e=this,t=this.questionForm.value;if(console.log(this.uploads,"uploads"),console.log(this.questionForm.value,"values"),console.log(this.deletedIds,"deletedids"),this.questionForm.valid&&this.onlineexamId&&this.questionId){this.loader.open();var c=new FormData;c.append("onlineexam_question_id",this.questionId),c.append("onlineexam_id",this.onlineexamId),"objective"==this.type?(c.append("type","objective"),c.append("options",JSON.stringify(t.options)),c.append("delete_id",JSON.stringify(this.deletedIds))):c.append("type","non-objective"),c.append("question_name",t.question),c.append("answer",t.anskey),c.append("is_permission_upload","1"==t.isUploadPerm?"1":"0"),1==this.isNewInsert?c.append("is_delete_attach","1"):0==this.isNewInsert?(this.uploads.forEach((function(e){c.append("attachment[]",e)})),c.append("is_delete_attach","0")):2==this.isNewInsert&&(this.uploads.forEach((function(e){c.append("attachment[]",e)})),c.append("is_delete_attach","2")),this.modelService.saveQuestion(c,"update").subscribe((function(t){"success"==t.keyword?(e.submitButton.disabled=!1,e.noOfPreparedQus=e.noOfPreparedQus+1,e.loader.close(),e.router.navigate(["/teacher/online-exam/onlineexam/question-list",e.onlineexamId,e.questionGroupId]),e.toaster.present(t.message,"")):(e.loader.close(),e.submitButton.disabled=!1,e.toaster.present(t.message))}))}}},{key:"onSelectFile",value:function(e){if(this.uploads=[],this.isFileSizeTooHigh=!1,this.isMaxFileCountExceed=!1,e.target.files.length>5)this.isMaxFileCountExceed=!0;else if(e.target.files&&e.target.files[0]){for(var t=e.target.files.length,c=0;c<t;c++)if(e.target.files[c].size>2e6){this.isFileSizeTooHigh=!0;break}if(!this.isFileSizeTooHigh&&!this.isMaxFileCountExceed)for(var n=0;n<t;n++)this.uploads.push(e.target.files[n]),this.isNewInsert=2}}},{key:"clearFiles",value:function(){this.uploads=[],this.isFileSizeTooHigh=!1,this.isMaxFileCountExceed=!1,this.isNewInsert=1}},{key:"discard",value:function(){this.router.navigate(["/teacher/online-exam/onlineexam/question-list",this.onlineexamId,this.questionGroupId])}}])}()).\u0275fac=function(e){return new(e||Li)(W.Xb(le),W.Xb(h.g),W.Xb(de.a),W.Xb(ue.a),W.Xb(h.a),W.Xb(we.d),W.Xb(g.f))},Li.\u0275cmp=W.Rb({type:Li,selectors:[["app-edit"]],viewQuery:function(e,t){var c;1&e&&W.md(b.a,!0),2&e&&W.Nc(c=W.mc())&&(t.submitButton=c.first)},decls:142,vars:75,consts:[[3,"formGroup"],["fxLayout","row wrap",1,"mb-12"],["fxFlex","100","fxFlex.gt-xs","50"],["type","button","mat-raised-button","","color","primary",1,"btn-primary-bg",3,"disabled","click"],[1,"pl-8","primary-txt-color",3,"click"],["fxFlex","100","fxFlex.gt-xs","50",1,"mt-4"],["fxLayout","row wrap",1,"pl-16"],["fxFlex","100","fxFlex.gt-xs","16",1,"text-right"],["fxFlex","100","fxFlex.gt-xs","22",1,"pl-24"],["fxFlex","100","fxFlex.gt-xs","6",1,""],["fxFlex","100","fxFlex.gt-xs","10",1,"pl-24"],["fxFlex","100","fxFlex.gt-xs","10",1,"pl-24","mr-12"],["fxLayout","row wrap",1,"mt-12","text-right"],["fxFlex","100","fxFlex.gt-xs","70",1,"mt-0"],["fxFlex","100","fxFlex.gt-xs","30",1,"mb-12"],["aria-label","Select an option","formControlName","language",1,"ml-15","f14",3,"change"],["name","language","value","english","checked","",1,"mr-24"],["name","language","value","tamil",1,"mr-24"],["name","language","value","hindi",1,"mr-24"],["name","language","value","french",1,"mr-24"],[1,"border-top"],[1,"p-16"],[1,"text-center","font20","mb-0"],["fxLayout","row wrap",1,"mt-0"],["fxFlex","100","fxFlex.gt-xs","40",1,"mt-16"],[1,"pl-8"],["fxFlex","100","fxFlex.gt-xs","20",1,"mt-4","text-center"],[1,"font16"],["fxFlex","100","fxFlex.gt-xs","24.5",1,"mt-12"],["fxFlex","100","fxFlex.gt-xs","12",1,"mt-16","text-right","pr-8"],["fxFlex","100","fxFlex.gt-xs","1",1,"mr-12","mt-12","pl-4"],[1,"prepared_qns"],["fxFlex","100","fxFlex.gt-xs","80",1,""],[1,"f15"],[1,""],["fxFlex","100","fxFlex.gt-xs","3",1,"text-center"],["fxFlex","100","fxFlex.gt-xs","100",1,"mr-12"],[1,"mb-12"],["id","question","formControlName","question",3,"transliterate"],["fxLayout","row wrap","class","mt-0",4,"ngIf"],["formArrayName","options"],["fxLayout","row wrap","class","mt-0",3,"formGroupName",4,"ngFor","ngForOf"],["type","button","mat-raised-button","","class","mt-12 icon-white-bg ml-0",3,"disabled","click",4,"ngIf"],["fxLayout","row wrap","class","mt-12",4,"ngIf"],["fxLayout","row wrap",1,"mt-16","mb-12"],["fxFlex","100","fxFlex.gt-xs","8",1,""],["fxFlex","100","fxFlex.gt-xs","25",1,""],["type","file","required","","multiple","",2,"display","none",3,"change"],["fileInput",""],["type","button","mat-raised-button","",1,"btn-primary-bg","ml-0",3,"click"],[4,"ngIf"],["type","button","mat-button","","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[1,"mt-12"],["style","color: red;",4,"ngIf"],["fxFlex","100","fxFlex.gt-xs","100",1,"mt-12"],["fxFlex","100","fxFlex.gt-xs","85",1,"mr-12","mt-12"],["id","anskey","formControlName","anskey",3,"transliterate"],["fxLayout","row wrap",1,"mt-0",3,"formGroupName"],["fxFlex","100","fxFlex.gt-xs","5",1,"mt-12"],["class","icon-red-bg mt-8",3,"click",4,"ngIf"],["formControlName","option_name",3,"transliterate","id"],["fxFlex","100","fxFlex.gt-xs","9",1,"mt-12","text-center"],["value","1","formControlName","is_answer"],[1,"icon-red-bg","mt-8",3,"click"],["_ngcontent-qyx-c19","",1,"material-icons","icon-image-preview",2,"cursor","pointer"],["type","button","mat-raised-button","",1,"mt-12","icon-white-bg","ml-0",3,"disabled","click"],["_ngcontent-qyx-c19","",1,"material-icons","icon-image-preview"],["fxLayout","row wrap",1,"mt-12"],["fxFlex","100","fxFlex.gt-xs","50",1,"mt-16"],["value","1","formControlName","isUploadPerm"],[1,"ml-12"],["type","button","mat-button","","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[2,"color","red"]],template:function(e,t){if(1&e){var c=W.ec();W.dc(0,"form",0),W.dc(1,"div",1),W.dc(2,"div",2),W.dc(3,"button",3),W.lc("click",(function(e){return t.update()})),W.cd(4,"Update"),W.cc(),W.dc(5,"a",4),W.lc("click",(function(e){return t.discard()})),W.cd(6),W.qc(7,"translate"),W.cc(),W.cc(),W.dc(8,"div",5),W.dc(9,"div",6),W.dc(10,"div",7),W.dc(11,"label"),W.dc(12,"strong"),W.cd(13),W.qc(14,"translate"),W.cc(),W.cc(),W.cc(),W.dc(15,"div",8),W.cd(16),W.cc(),W.dc(17,"div",9),W.dc(18,"label"),W.dc(19,"strong"),W.cd(20),W.qc(21,"translate"),W.cc(),W.cc(),W.cc(),W.dc(22,"div",8),W.dc(23,"label"),W.cd(24),W.cc(),W.cc(),W.dc(25,"div",9),W.dc(26,"label"),W.dc(27,"strong"),W.cd(28),W.qc(29,"translate"),W.cc(),W.cc(),W.cc(),W.dc(30,"div",10),W.dc(31,"label"),W.cd(32),W.cc(),W.cc(),W.dc(33,"div",9),W.dc(34,"label"),W.dc(35,"strong"),W.cd(36),W.qc(37,"translate"),W.cc(),W.cc(),W.cc(),W.dc(38,"div",11),W.dc(39,"label"),W.cd(40),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(41,"div",12),W.dc(42,"div",13),W.dc(43,"label"),W.dc(44,"strong"),W.cd(45,"Select an Language"),W.cc(),W.cc(),W.cc(),W.dc(46,"div",14),W.dc(47,"mat-radio-group",15),W.lc("change",(function(e){return t.setTransLang(e.value)})),W.dc(48,"mat-radio-button",16),W.cd(49),W.qc(50,"translate"),W.cc(),W.dc(51,"mat-radio-button",17),W.cd(52),W.qc(53,"translate"),W.cc(),W.dc(54,"mat-radio-button",18),W.cd(55),W.qc(56,"translate"),W.cc(),W.dc(57,"mat-radio-button",19),W.cd(58),W.qc(59,"translate"),W.cc(),W.cc(),W.cc(),W.cc(),W.Yb(60,"div",20),W.dc(61,"div",21),W.dc(62,"p",22),W.dc(63,"strong"),W.cd(64),W.cc(),W.cc(),W.dc(65,"div",23),W.dc(66,"div",24),W.dc(67,"label",25),W.dc(68,"strong"),W.cd(69),W.qc(70,"translate"),W.cc(),W.cc(),W.cc(),W.dc(71,"div",26),W.dc(72,"label",27),W.dc(73,"strong"),W.cd(74),W.cc(),W.cc(),W.cc(),W.Yb(75,"div",28),W.dc(76,"div",29),W.dc(77,"label",25),W.dc(78,"strong"),W.cd(79),W.qc(80,"translate"),W.cc(),W.cc(),W.cc(),W.dc(81,"div",30),W.dc(82,"label",31),W.dc(83,"strong"),W.cd(84),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(85,"div",23),W.dc(86,"div",32),W.dc(87,"p",33),W.dc(88,"strong"),W.cd(89),W.cc(),W.cc(),W.cc(),W.dc(90,"div",7),W.dc(91,"label",34),W.dc(92,"strong"),W.cd(93),W.qc(94,"translate"),W.cc(),W.cc(),W.cc(),W.dc(95,"div",35),W.dc(96,"label",34),W.dc(97,"strong"),W.cd(98),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(99,"mat-card"),W.dc(100,"div",23),W.dc(101,"div",36),W.dc(102,"div",37),W.dc(103,"label"),W.dc(104,"strong"),W.cd(105),W.qc(106,"translate"),W.cc(),W.cc(),W.cc(),W.Yb(107,"tgss-editor",38),W.cc(),W.cc(),W.ad(108,Si,7,1,"div",39),W.dc(109,"div",40),W.ad(110,Pi,16,10,"div",41),W.cc(),W.ad(111,Qi,3,1,"button",42),W.ad(112,Ni,7,3,"div",43),W.dc(113,"div",44),W.dc(114,"div",45),W.dc(115,"label"),W.dc(116,"strong"),W.cd(117),W.qc(118,"translate"),W.cc(),W.cc(),W.cc(),W.dc(119,"div",46),W.dc(120,"input",47,48),W.lc("change",(function(e){return t.onSelectFile(e)})),W.cc(),W.dc(122,"button",49),W.lc("click",(function(e){return W.Sc(c),W.Oc(121).click()})),W.cd(123),W.qc(124,"translate"),W.cc(),W.ad(125,Ai,2,1,"label",50),W.ad(126,Di,3,0,"button",51),W.dc(127,"div",52),W.ad(128,Ti,3,3,"p",53),W.ad(129,ji,3,3,"p",53),W.dc(130,"span"),W.cd(131),W.qc(132,"translate"),W.cc(),W.Yb(133,"br"),W.dc(134,"span"),W.cd(135),W.qc(136,"translate"),W.cc(),W.Yb(137,"br"),W.dc(138,"span"),W.cd(139),W.qc(140,"translate"),W.cc(),W.Yb(141,"br"),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.cc()}2&e&&(W.yc("formGroup",t.questionForm),W.Gb(3),W.yc("disabled",!t.questionForm.valid),W.Gb(3),W.dd(W.rc(7,39,"homework.question.button.discard")),W.Gb(7),W.dd(W.rc(14,41,"homework.question.lable.Academic")),W.Gb(3),W.ed(" ",null==t.onlineexam?null:t.onlineexam.academicYearName," "),W.Gb(4),W.dd(W.rc(21,43,"homework.question.lable.Batch")),W.Gb(4),W.dd(null==t.onlineexam?null:t.onlineexam.batchName),W.Gb(4),W.dd(W.rc(29,45,"homework.question.lable.Class")),W.Gb(4),W.dd(null==t.onlineexam?null:t.onlineexam.className),W.Gb(4),W.dd(W.rc(37,47,"homework.question.lable.Section")),W.Gb(4),W.dd(t.selectedSectionIds.join()),W.Gb(9),W.ed(" ",W.rc(50,49,"homework.assignment.radio.english"),""),W.Gb(3),W.ed(" ",W.rc(53,51,"homework.assignment.radio.tamil"),""),W.Gb(3),W.ed(" ",W.rc(56,53,"homework.assignment.radio.hindi")," "),W.Gb(3),W.ed(" ",W.rc(59,55,"homework.assignment.radio.french"),""),W.Gb(6),W.dd(null==t.onlineexam?null:t.onlineexam.title),W.Gb(5),W.fd("",W.rc(70,57,"homework.question.lable.Noof")," ",null==t.group?null:t.group.noOfQus,""),W.Gb(5),W.ed(" ",null==t.onlineexam?null:t.onlineexam.subjectName,""),W.Gb(5),W.dd(W.rc(80,59,"homework.question.newcreateDetail.lable.preparedQuestions")),W.Gb(5),W.dd(t.noOfPreparedQus),W.Gb(5),W.dd(null==t.group?null:t.group.groupName),W.Gb(4),W.dd(W.rc(94,61,"homework.question.lable.Marks")),W.Gb(5),W.dd(null==t.group?null:t.group.marks),W.Gb(7),W.ed(" ",W.rc(106,63,"homework.question.lable.Questionname"),""),W.Gb(2),W.yc("transliterate",t.transLang),W.Gb(1),W.yc("ngIf","non-objective"==t.type),W.Gb(2),W.yc("ngForOf",t.questionForm.get("options").controls),W.Gb(1),W.yc("ngIf",0!=t.questionForm.value.options.length),W.Gb(1),W.yc("ngIf","non-objective"==t.type),W.Gb(5),W.dd(W.rc(118,65,"homework.question.lable.attachment")),W.Gb(6),W.ed(" ",W.rc(124,67,"homework.question.button.addFile")," "),W.Gb(2),W.yc("ngIf",t.uploads.length>0),W.Gb(1),W.yc("ngIf",t.uploads.length>0),W.Gb(2),W.yc("ngIf",t.isFileSizeTooHigh),W.Gb(1),W.yc("ngIf",t.isMaxFileCountExceed),W.Gb(2),W.ed(" ",W.rc(132,69,"homework.question.lable.note"),""),W.Gb(4),W.ed(" ",W.rc(136,71,"homework.question.lable.format"),""),W.Gb(4),W.ed(" ",W.rc(140,73,"homework.question.lable.fileSize"),""))},directives:[g.D,g.u,g.k,xe.c,xe.a,b.a,F.b,g.t,g.i,F.a,x.a,Ea.a,f.o,g.e,f.n,g.l,v.a,ye.f,w.a],pipes:[we.c],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.f24[_ngcontent-%COMP%]{font-size:24px;margin-left:-10px}.text-center[_ngcontent-%COMP%]{text-align:center!important}.text-right[_ngcontent-%COMP%]{text-align:right!important}.font20[_ngcontent-%COMP%]{font-size:27px}.font16[_ngcontent-%COMP%]{font-size:16px}mat-card.mat-card[_ngcontent-%COMP%]{border:1px solid hsla(0,0%,50.2%,.47843137254901963)}.f15[_ngcontent-%COMP%]{font-size:15px;margin-left:8px;margin-bottom:0}.prepared_qns[_ngcontent-%COMP%]{font-size:24px;position:relative;bottom:5px}.icon-red-bg[_ngcontent-%COMP%]{margin-left:9px;color:red}.icon-red-bg[_ngcontent-%COMP%], .icon-red-bg[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:21px}.isUploadPerm[_ngcontent-%COMP%]{margin-top:2%;margin-left:1%}"]}),Li),zi=["filterInput"];function Yi(e,t){if(1&e){var c=W.ec();W.dc(0,"button",44),W.lc("click",(function(e){return W.Sc(c),W.pc().subjectSearch=""})),W.dc(1,"mat-icon"),W.cd(2,"close"),W.cc(),W.cc()}}function Xi(e,t){if(1&e){var c=W.ec();W.dc(0,"mat-checkbox",45),W.lc("change",(function(e){W.Sc(c);var n=t.$implicit;return W.pc().onSubjectChange(e.checked,n.subjectId)})),W.cd(1),W.cc()}if(2&e){var n=t.$implicit;W.Gb(1),W.ed(" ",n.subjectName,"")}}function Hi(e,t){if(1&e){var c=W.ec();W.dc(0,"button",44),W.lc("click",(function(e){return W.Sc(c),W.pc().classSearch=""})),W.dc(1,"mat-icon"),W.cd(2,"close"),W.cc(),W.cc()}}function Ri(e,t){if(1&e){var c=W.ec();W.dc(0,"mat-checkbox",45),W.lc("change",(function(e){W.Sc(c);var n=t.$implicit;return W.pc().onClassChange(e.checked,n.class_id)})),W.cd(1),W.cc()}if(2&e){var n=t.$implicit;W.Gb(1),W.ed(" ",n.class_name,"")}}function Bi(e,t){if(1&e){var c=W.ec();W.dc(0,"button",44),W.lc("click",(function(e){W.Sc(c);var t=W.pc();return t.value="",t.applyFilter("")})),W.dc(1,"mat-icon"),W.cd(2,"close"),W.cc(),W.cc()}}function $i(e,t){1&e&&(W.dc(0,"th",46),W.dc(1,"b"),W.cd(2,"Title"),W.cc(),W.cc())}function Vi(e,t){if(1&e&&(W.dc(0,"td",47),W.cd(1),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.ed(" ",c.title," ")}}function Ui(e,t){1&e&&(W.dc(0,"th",48),W.dc(1,"b"),W.cd(2,"Subject"),W.cc(),W.cc())}function Ji(e,t){if(1&e&&(W.dc(0,"td",47),W.cd(1),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.ed(" ",c.subjectName," ")}}function Wi(e,t){1&e&&(W.dc(0,"th",49),W.dc(1,"b"),W.cd(2,"Classes"),W.cc(),W.cc())}function Ki(e,t){if(1&e&&(W.dc(0,"td",50),W.cd(1),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.ed(" ",c.className," ")}}function Zi(e,t){1&e&&(W.dc(0,"th",51),W.dc(1,"b"),W.cd(2,"Academic Year"),W.cc(),W.cc())}function eo(e,t){if(1&e&&(W.dc(0,"td",50),W.cd(1),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.ed(" ",c.academicYearName," ")}}function to(e,t){1&e&&(W.dc(0,"th",52),W.dc(1,"b"),W.cd(2,"Batch"),W.cc(),W.cc())}function co(e,t){if(1&e&&(W.dc(0,"td",50),W.cd(1),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.ed(" ",c.batchName," ")}}function no(e,t){1&e&&(W.dc(0,"th",53),W.dc(1,"b"),W.cd(2,"No of Question"),W.cc(),W.cc())}function ao(e,t){if(1&e&&(W.dc(0,"td",54),W.cd(1),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.ed(" ",c.totalCount," ")}}function io(e,t){1&e&&(W.dc(0,"th",55),W.cd(1," Status "),W.cc())}function oo(e,t){1&e&&(W.dc(0,"label",59),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.Gb(1),W.dd(W.rc(2,1,"homework.list.button.active")))}function ro(e,t){1&e&&(W.dc(0,"label",60),W.cd(1),W.qc(2,"translate"),W.cc()),2&e&&(W.Gb(1),W.dd(W.rc(2,1,"homework.list.button.inactive")))}function so(e,t){1&e&&(W.dc(0,"label",61),W.cd(1,"Approved"),W.cc())}function lo(e,t){if(1&e&&(W.dc(0,"td",47),W.ad(1,oo,3,3,"label",56),W.ad(2,ro,3,3,"label",57),W.ad(3,so,2,0,"label",58),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.yc("ngIf",1==c.status),W.Gb(1),W.yc("ngIf",0==c.status),W.Gb(1),W.yc("ngIf",4==c.status)}}function uo(e,t){1&e&&W.Yb(0,"tr",62)}function mo(e,t){if(1&e){var c=W.ec();W.dc(0,"tr",63),W.lc("click",(function(e){W.Sc(c);var n=t.$implicit;return W.pc().getEmployeeId(n)})),W.cc()}}function po(e,t){1&e&&(W.bc(0),W.dc(1,"p",64),W.dc(2,"b"),W.cd(3,"No Data Found..."),W.cc(),W.cc(),W.ac())}var ho,fo=function(){return{margin:"8px 15px 0px 15px"}},go=function(){return{"flex-flow":"column"}},bo=((ho=function(){return _createClass((function e(t,c,n,a,i,o,r,s,l,d,u,m,p,h){_classCallCheck(this,e),this.cdr=t,this.dialog=c,this.router=n,this.modelService=a,this.toaster=i,this.academicService=o,this.batchService=r,this.classService=s,this.subjectService=l,this.sectionService=d,this.loader=u,this.snack=m,this.permission=p,this.commonService=h,this.displayedColumns=["title","subject","classes","acyear","batch","noofquestion","status"],this.dataSource=new T.o,this.selection=new ze.c(!0,[]),this.pageSizeOptions=[],this.value="",this.yearSearch="",this.batchSearch="",this.classSearch="",this.sectionSearch="",this.subjectSearch="",this.selectedAcademicYear=[],this.selectedSection=[],this.selectedClass=[],this.selectedBatch=[],this.selectedSubject=[],this.selectedType=[],this.paginationDTO=new Ve.a,this.pageSizeOptions=Object(Ue.b)().app.table.filtering.pageSizeOptions;var f=Object(Ue.b)().app.config;this.paginationDTO.academic_year_id=localStorage.getItem(f.academicId),this.paginationDTO.batch_id=localStorage.getItem(f.batchId)}),[{key:"ngOnInit",value:function(){this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort,this.getClass(),this.getSubject()}},{key:"ngAfterViewInit",value:function(){this.filterKeyUp()}},{key:"filterKeyUp",value:function(){var e=this;Object(Be.a)(this.filter.nativeElement,"keyup").pipe(Object(He.a)(150),Object(Re.a)()).subscribe((function(){if(e.dataSource){var t=e.filter.nativeElement.value;t=(t=t.trim()).toLowerCase(),e.paginationDTO.searchWith=t,e.getData()}})),this.getData()}},{key:"onSubjectChange",value:function(e,t){e?this.selectedSubject.push(t):this.selectedSubject=this.selectedSubject.filter((function(e){return e!=t})),this.paginationDTO.filterSubject=this.selectedSubject.length<=0?"":JSON.stringify(this.selectedSubject),this.getData()}},{key:"onYearChange",value:function(e,t){e?this.selectedAcademicYear.push(t):this.selectedAcademicYear=this.selectedAcademicYear.filter((function(e){return e!=t})),this.paginationDTO.filterAcademic=this.selectedAcademicYear.length<=0?"":JSON.stringify(this.selectedAcademicYear),this.getData()}},{key:"onBatchChange",value:function(e,t){e?this.selectedBatch.push(t):this.selectedBatch=this.selectedBatch.filter((function(e){return e!=t})),this.paginationDTO.filterBatch=this.selectedBatch.length<=0?"":JSON.stringify(this.selectedBatch),this.getData()}},{key:"onType",value:function(e,t){e?(this.selectedType.push(t),console.log(this.selectedType,"dgdgdgd")):this.selectedType=this.selectedType.filter((function(e){return e!=t})),this.paginationDTO.filterType=this.selectedType.length<=0?"":JSON.stringify(this.selectedType),this.getData()}},{key:"onClassChange",value:function(e,t){e?this.selectedClass.push(t):this.selectedClass=this.selectedClass.filter((function(e){return e!=t})),this.paginationDTO.filterClass=this.selectedClass.length<=0?"":JSON.stringify(this.selectedClass),this.getData()}},{key:"onSectionChange",value:function(e,t){e?this.selectedSection.push(t):this.selectedSection=this.selectedSection.filter((function(e){return e!=t})),this.paginationDTO.filterSection=this.selectedSection.length<=0?"":JSON.stringify(this.selectedSection),this.getData()}},{key:"sortData",value:function(e){this.paginationDTO.sortByKey=e.active,this.paginationDTO.sortByType=e.direction.toUpperCase(),this.getData()}},{key:"getData",value:function(){var e=this;this.modelService.getFavQuestions(this.paginationDTO).subscribe((function(t){e.paginationDTO.totalSize=t.pageSize,e.dataSource=new T.o(t.onlineexams),e.onlineexams=t.onlineexams,console.log(e.onlineexams,"this.onlineexams")}))}},{key:"getClass",value:function(){var e=this;this.commonService.getClasses(this.paginationDTO.batch_id).subscribe((function(t){"success"==t.keyword&&(e.classes=t.data)}))}},{key:"getSubject",value:function(){var e=this;this.subjectService.getList({}).subscribe((function(t){"success"==t.keyword&&(e.subjects=t.subjects.filter((function(e){return"1"==e.status})))}))}},{key:"getSection",value:function(){var e=this;this.sectionService.getList(void 0).subscribe((function(t){"success"==t.keyword&&(e.sections=t.sections.filter((function(e){return"1"==e.status})))}))}},{key:"applyFilter",value:function(e){e=(e=e.trim()).toLowerCase(),this.paginationDTO.searchWith=e,this.getData()}},{key:"onPaginateChange",value:function(e){this.paginationDTO.offset=e.pageIndex,this.paginationDTO.limit=e.pageSize,this.getData()}},{key:"getEmployeeId",value:function(e){this.router.navigate(["/teacher/online-exam/favourite/view/".concat(e.onlineexamId)])}}])}()).\u0275fac=function(e){return new(e||ho)(W.Xb(W.h),W.Xb(Ke.b),W.Xb(h.g),W.Xb(le),W.Xb(ue.a),W.Xb(ht.a),W.Xb(ft.a),W.Xb(lc.a),W.Xb(fe.a),W.Xb(st.a),W.Xb(de.a),W.Xb(wt.a),W.Xb($e.a),W.Xb(We.a))},ho.\u0275cmp=W.Rb({type:ho,selectors:[["app-list"]],viewQuery:function(e,t){var c;1&e&&(W.Yc(N.a,!0),W.Yc(D.a,!0),W.md(zi,!0)),2&e&&(W.Nc(c=W.mc())&&(t.paginator=c.first),W.Nc(c=W.mc())&&(t.sort=c.first),W.Nc(c=W.mc())&&(t.filter=c.first))},decls:70,vars:44,consts:[["fxLayout","row wrap ",1,"pagewrap"],["fxFlex","100","fxFlex.gt-xs","50",1,"pr-1"],[1,"example-button-row","mt-10"],["mat-flat-button","",1,"btn-primary-bg",3,"routerLink"],["mat-button","","color","primary",3,"matMenuTriggerFor"],[1,"material-icons"],["filter","matMenu"],[1,"filter-menu",3,"ngStyle","click"],[1,"mt-12"],["appearance","fill",1,"",2,"width","100%"],["matInput","","value","","autocomplete","off",3,"placeholder","ngModel","ngModelChange"],["mat-button","","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[1,"cb-wrapper",3,"ngStyle"],["class","example-margin pr-12","class","example-margin pr-12",3,"change",4,"ngFor","ngForOf"],[1,"mt-24","mb-24"],["class","example-margin pr-12",3,"change",4,"ngFor","ngForOf"],[1,"search",2,"width","100%"],["matInput","","id","filterInput","value","",3,"placeholder","ngModel","ngModelChange"],["filterInput",""],[1,"material-icons","search-icon"],[1,"table_container","pb-1"],[1,""],["mat-table","","matSort","",1,"mat-elevation-z8","p-8",3,"dataSource","matSortChange"],["matColumnDef","title"],["mat-header-cell","","style","width:20%","mat-sort-header","title",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","subject"],["mat-header-cell","","style","width:7%","mat-sort-header","subject_name",4,"matHeaderCellDef"],["matColumnDef","classes"],["mat-header-cell","","class","text-center","style","width:12%","mat-sort-header","class_name",4,"matHeaderCellDef"],["mat-cell","","class","",4,"matCellDef"],["matColumnDef","acyear"],["mat-header-cell","","class","text-center","style","width:10%","mat-sort-header","academic_year_name",4,"matHeaderCellDef"],["matColumnDef","batch"],["mat-header-cell","","class","text-center","style","width:11%","mat-sort-header","batch_name",4,"matHeaderCellDef"],["matColumnDef","noofquestion"],["mat-header-cell","","class","text-center","style","width:11%","mat-sort-header","quescount",4,"matHeaderCellDef"],["mat-cell","","class","text-center",4,"matCellDef"],["matColumnDef","status"],["mat-header-cell","","style","width:9%",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"click",4,"matRowDef","matRowDefColumns"],[4,"ngIf"],[3,"length","pageSize","pageSizeOptions","page"],["mat-button","","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[1,"example-margin","pr-12",3,"change"],["mat-header-cell","","mat-sort-header","title",2,"width","20%"],["mat-cell",""],["mat-header-cell","","mat-sort-header","subject_name",2,"width","7%"],["mat-header-cell","","mat-sort-header","class_name",1,"text-center",2,"width","12%"],["mat-cell","",1,""],["mat-header-cell","","mat-sort-header","academic_year_name",1,"text-center",2,"width","10%"],["mat-header-cell","","mat-sort-header","batch_name",1,"text-center",2,"width","11%"],["mat-header-cell","","mat-sort-header","quescount",1,"text-center",2,"width","11%"],["mat-cell","",1,"text-center"],["mat-header-cell","",2,"width","9%"],["class","mat-chip mat-primary mat-standard-chip ng-tns-c12-751 mat-chip-selected ng-star-inserted",4,"ngIf"],["class","mat-chip mat-danger mat-standard-chip ng-tns-c12-751 mat-chip-selected ng-star-inserted ",4,"ngIf"],["class","mat-chip mat-primary approve mat-standard-chip ng-tns-c12-751 mat-chip-selected ng-star-inserted",4,"ngIf"],[1,"mat-chip","mat-primary","mat-standard-chip","ng-tns-c12-751","mat-chip-selected","ng-star-inserted"],[1,"mat-chip","mat-danger","mat-standard-chip","ng-tns-c12-751","mat-chip-selected","ng-star-inserted"],[1,"mat-chip","mat-primary","approve","mat-standard-chip","ng-tns-c12-751","mat-chip-selected","ng-star-inserted"],["mat-header-row",""],["mat-row","",3,"click"],[1,"text-center"]],template:function(e,t){if(1&e&&(W.dc(0,"div",0),W.dc(1,"div",1),W.dc(2,"div",2),W.dc(3,"button",3),W.cd(4,"List of Online Exam"),W.cc(),W.dc(5,"button",4),W.dc(6,"span",5),W.cd(7," filter_list "),W.cc(),W.cd(8," Filter "),W.cc(),W.cc(),W.dc(9,"mat-menu",null,6),W.dc(11,"div",7),W.lc("click",(function(e){return e.stopPropagation()})),W.dc(12,"div",8),W.dc(13,"h4"),W.cd(14),W.qc(15,"translate"),W.cc(),W.dc(16,"mat-form-field",9),W.dc(17,"input",10),W.lc("ngModelChange",(function(e){return t.subjectSearch=e})),W.qc(18,"translate"),W.cc(),W.ad(19,Yi,3,0,"button",11),W.cc(),W.dc(20,"div",12),W.ad(21,Xi,2,1,"mat-checkbox",13),W.qc(22,"filter"),W.cc(),W.cc(),W.dc(23,"div",14),W.dc(24,"h4"),W.cd(25),W.qc(26,"translate"),W.cc(),W.dc(27,"mat-form-field",9),W.dc(28,"input",10),W.lc("ngModelChange",(function(e){return t.classSearch=e})),W.qc(29,"translate"),W.cc(),W.ad(30,Hi,3,0,"button",11),W.cc(),W.dc(31,"div",12),W.ad(32,Ri,2,1,"mat-checkbox",15),W.qc(33,"filter"),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(34,"div",1),W.dc(35,"mat-form-field",16),W.dc(36,"input",17,18),W.lc("ngModelChange",(function(e){return t.value=e})),W.qc(38,"translate"),W.cc(),W.ad(39,Bi,3,0,"button",11),W.cc(),W.dc(40,"i",19),W.cd(41," search "),W.cc(),W.cc(),W.cc(),W.dc(42,"div",20),W.dc(43,"div",21),W.dc(44,"table",22),W.lc("matSortChange",(function(e){return t.sortData(e)})),W.bc(45,23),W.ad(46,$i,3,0,"th",24),W.ad(47,Vi,2,1,"td",25),W.ac(),W.bc(48,26),W.ad(49,Ui,3,0,"th",27),W.ad(50,Ji,2,1,"td",25),W.ac(),W.bc(51,28),W.ad(52,Wi,3,0,"th",29),W.ad(53,Ki,2,1,"td",30),W.ac(),W.bc(54,31),W.ad(55,Zi,3,0,"th",32),W.ad(56,eo,2,1,"td",30),W.ac(),W.bc(57,33),W.ad(58,to,3,0,"th",34),W.ad(59,co,2,1,"td",30),W.ac(),W.bc(60,35),W.ad(61,no,3,0,"th",36),W.ad(62,ao,2,1,"td",37),W.ac(),W.bc(63,38),W.ad(64,io,2,0,"th",39),W.ad(65,lo,4,3,"td",25),W.ac(),W.ad(66,uo,1,0,"tr",40),W.ad(67,mo,1,0,"tr",41),W.cc(),W.ad(68,po,4,0,"ng-container",42),W.dc(69,"mat-paginator",43),W.lc("page",(function(e){return t.onPaginateChange(e)})),W.cc(),W.cc(),W.cc()),2&e){var c=W.Oc(10);W.Gb(3),W.yc("routerLink","/teacher/online-exam/list"),W.Gb(2),W.yc("matMenuTriggerFor",c),W.Gb(6),W.yc("ngStyle",W.Ec(41,fo)),W.Gb(3),W.dd(W.rc(15,25,"homework.list.columName.subject")),W.Gb(3),W.zc("placeholder",W.rc(18,27,"homework.list.button.search")),W.yc("ngModel",t.subjectSearch),W.Gb(2),W.yc("ngIf",t.subjectSearch),W.Gb(1),W.yc("ngStyle",W.Ec(42,go)),W.Gb(1),W.yc("ngForOf",W.sc(22,29,t.subjects,t.subjectSearch)),W.Gb(4),W.dd(W.rc(26,32,"homework.list.columName.classes")),W.Gb(3),W.zc("placeholder",W.rc(29,34,"homework.list.button.search")),W.yc("ngModel",t.classSearch),W.Gb(2),W.yc("ngIf",t.classSearch),W.Gb(1),W.yc("ngStyle",W.Ec(43,go)),W.Gb(1),W.yc("ngForOf",W.sc(33,36,t.classes,t.classSearch)),W.Gb(4),W.zc("placeholder",W.rc(38,39,"homework.list.button.search")),W.yc("ngModel",t.value),W.Gb(3),W.yc("ngIf",t.value),W.Gb(5),W.yc("dataSource",t.dataSource),W.Gb(22),W.yc("matHeaderRowDef",t.displayedColumns),W.Gb(1),W.yc("matRowDefColumns",t.displayedColumns),W.Gb(1),W.yc("ngIf",0===t.dataSource.filteredData.length||0===t.dataSource.data.length),W.Gb(1),W.yc("length",t.paginationDTO.totalSize)("pageSize",t.paginationDTO.limit)("pageSizeOptions",t.pageSizeOptions)}},directives:[xe.c,xe.a,b.a,h.h,G.d,G.e,f.p,_t.b,ye.b,_.b,g.c,g.t,g.w,f.o,f.n,T.n,D.a,T.c,T.i,T.b,T.k,T.m,N.a,ye.f,w.a,v.a,T.h,D.b,T.a,T.j,T.l],pipes:[we.c,z.a],styles:[".text-center[_ngcontent-%COMP%]{text-align:center!important}.filter-menu[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{display:block!important}.mat-elevation-z8[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{cursor:pointer}.mat-orange[_ngcontent-%COMP%]{padding:2px 4px!important;border-radius:0!important;font-size:11px!important;background:orange!important;color:#fff!important;line-height:16px}label.mat-chip.mat-primary.approve[_ngcontent-%COMP%]{background-color:#31a929!important}"]}),ho);function xo(e,t){if(1&e){var c=W.ec();W.dc(0,"div",34),W.Yb(1,"img",35),W.dc(2,"div",36),W.dc(3,"button",37),W.lc("click",(function(e){W.Sc(c);var n=t.$implicit;return W.pc(4).download(null==n?null:n.attachmentId,null==n?null:n.attachment)})),W.dc(4,"i",38),W.cd(5," cloud_download "),W.cc(),W.cc(),W.cc(),W.cc()}if(2&e){var n=t.$implicit;W.Gb(1),W.zc("src",null==n?null:n.attachment,W.Vc)}}function vo(e,t){if(1&e&&(W.dc(0,"div",32),W.ad(1,xo,6,1,"div",33),W.cc()),2&e){var c=W.pc().$implicit;W.Gb(1),W.yc("ngForOf",c.quesAttachment)}}function yo(e,t){if(1&e&&(W.dc(0,"div"),W.dc(1,"label",26),W.dc(2,"span"),W.cd(3),W.cc(),W.Yb(4,"span",40),W.qc(5,"safeHtml"),W.cc(),W.Yb(6,"br"),W.cc()),2&e){var c=t.$implicit,n=t.index;W.Gb(3),W.ed("",n+1,"."),W.Gb(1),W.yc("innerHtml",W.rc(5,2,c.optionName),W.Tc)}}function ko(e,t){if(1&e&&(W.dc(0,"div",16),W.dc(1,"div",24),W.dc(2,"label"),W.dc(3,"strong"),W.cd(4),W.qc(5,"translate"),W.cc(),W.cc(),W.cc(),W.dc(6,"div",39),W.ad(7,yo,7,4,"div",21),W.cc(),W.cc()),2&e){var c=W.pc().$implicit;W.Gb(4),W.ed(" ",W.rc(5,2,"homework.question.lable.Option"),""),W.Gb(3),W.yc("ngForOf",c.quesOptions)}}function wo(e,t){if(1&e&&(W.dc(0,"div",16),W.dc(1,"div",24),W.dc(2,"label"),W.dc(3,"strong"),W.cd(4,"Answer Key "),W.cc(),W.cc(),W.cc(),W.dc(5,"div",25),W.Yb(6,"label",41),W.qc(7,"safeHtml"),W.cc(),W.cc()),2&e){var c=W.pc().$implicit;W.Gb(6),W.yc("innerHtml",W.rc(7,1,null==c?null:c.answer),W.Tc)}}function _o(e,t){if(1&e&&(W.dc(0,"mat-card"),W.dc(1,"div",16),W.dc(2,"div",24),W.dc(3,"label"),W.dc(4,"strong"),W.cd(5),W.qc(6,"translate"),W.cc(),W.cc(),W.cc(),W.dc(7,"div",25),W.dc(8,"label",26),W.dc(9,"span"),W.cd(10),W.cc(),W.Yb(11,"span",27),W.qc(12,"safeHtml"),W.cc(),W.cc(),W.cc(),W.dc(13,"div",28),W.dc(14,"div",29),W.dc(15,"label"),W.Yb(16,"strong"),W.cc(),W.cc(),W.ad(17,vo,2,1,"div",30),W.cc(),W.ad(18,ko,8,4,"div",31),W.ad(19,wo,8,3,"div",31),W.cc()),2&e){var c=t.$implicit,n=t.index;W.Gb(5),W.dd(W.rc(6,6,"homework.question.lable.Questionname")),W.Gb(5),W.ed("",n+1,"."),W.Gb(1),W.yc("innerHtml",W.rc(12,8,null==c?null:c.questionName),W.Tc),W.Gb(6),W.yc("ngIf",0!=c.quesAttachment.length),W.Gb(1),W.yc("ngIf",0!=c.quesOptions.length),W.Gb(1),W.yc("ngIf","non-objective"==c.type)}}function Co(e,t){if(1&e&&(W.dc(0,"div"),W.dc(1,"div",16),W.dc(2,"div",22),W.dc(3,"p",23),W.dc(4,"strong"),W.cd(5),W.cc(),W.cc(),W.cc(),W.cc(),W.ad(6,_o,20,10,"mat-card",21),W.cc()),2&e){var c=t.$implicit;W.Gb(5),W.dd(null==c?null:c.groupName),W.Gb(1),W.yc("ngForOf",c.questions)}}var Oo,Fo=((Oo=function(){return _createClass((function e(t,c,n,a,i,o,r){_classCallCheck(this,e),this.translate=t,this.modelService=c,this.activateRoute=n,this.toaster=a,this.loader=i,this.router=o,this.apiService=r,this.selectedSectionIds=[],this.translate.setDefaultLang("en"),this.onlineexamId=this.activateRoute.snapshot.params.id}),[{key:"ngOnInit",value:function(){this.getPreview()}},{key:"getPreview",value:function(){var e=this;this.loader.open(),this.modelService.getFavOne(this.onlineexamId).subscribe((function(t){if("success"==t.keyword){console.log(t.onlineexams),e.onlineexam=t.onlineexams[0],e.onlineexam.sections.forEach((function(t){e.selectedSectionIds.push(t.sectionName)}));var c=[];e.onlineexam.group.forEach((function(e){c.push(e.marks)})),e.totalMarks=c.reduce((function(e,t){return Number(e)+Number(t)||0}),0),console.log(e.totalMarks,"this.totalMarks"),e.loader.close(),e.toaster.present(t.message,"")}}))}},{key:"download",value:function(e,t){var c=this;this.apiService.downloadFile("onlineexam/downloadQuesAttachment/".concat(e),{fileName:t}).subscribe((function(e){switch(e.type){case B.d.DownloadProgress:break;case B.d.Response:console.log(e);var c=new Blob([e.body],{type:e.body.type}),n=document.createElement("a");n.setAttribute("style","display:none;"),document.body.appendChild(n),n.download=t,n.href=URL.createObjectURL(c),n.target="_blank",n.click(),document.body.removeChild(n)}}),(function(e){c.toaster.present("could not download")}))}},{key:"back",value:function(){this.router.navigate(["/teacher/online-exam/favourite/list"])}}])}()).\u0275fac=function(e){return new(e||Oo)(W.Xb(we.d),W.Xb(le),W.Xb(h.a),W.Xb(ue.a),W.Xb(de.a),W.Xb(h.g),W.Xb(R.a))},Oo.\u0275cmp=W.Rb({type:Oo,selectors:[["app-create"]],decls:53,vars:22,consts:[["fxLayout","row wrap ",1,"pagewrap"],["fxFlex","100","fxFlex.gt-xs","35",1,"pr-1"],[1,"example-button-row","mt-10","mb-8"],["mat-flat-button","",1,"btn-primary-bg",3,"click"],["fxFlex","100","fxFlex.gt-xs","65",1,"pr-1"],["fxLayout","row wrap",1,""],["fxFlex","100","fxFlex.gt-xs","15",1,""],["fxFlex","100","fxFlex.gt-xs","10",1,""],["fxFlex","100","fxFlex.gt-xs","9",1,""],["fxFlex","100","fxFlex.gt-xs","20",1,""],["fxFlex","100","fxFlex.gt-xs","8",1,""],["fxFlex","100","fxFlex.gt-xs","11",1,""],["fxFlex","100","fxFlex.gt-xs","10",1,"mr-12"],[1,"border-top"],[1,"p-16"],[1,"text-center","font20","mb-0"],["fxLayout","row wrap",1,"mt-0"],["fxFlex","100","fxFlex.gt-xs","40",1,"mt-12"],["fxFlex","100","fxFlex.gt-xs","20",1,"mt-4","text-center"],[1,"font16"],["fxFlex","100","fxFlex.gt-xs","24.5",1,"mt-12"],[4,"ngFor","ngForOf"],["fxFlex","100","fxFlex.gt-xs","80",1,"mt-12"],[1,"f15"],["fxFlex","100","fxFlex.gt-xs","11",1,"mt-12"],["fxFlex","100","fxFlex.gt-xs","77",1,"mr-12","mt-12"],[2,"display","flex"],[3,"innerHtml"],["fxLayout","row wrap",1,"mt-8"],["fxFlex","100","fxFlex.gt-xs","11",1,"mt-8"],["fxFlex","100","fxFlex.gt-xs","88","class","mt-8",4,"ngIf"],["fxLayout","row wrap","class","mt-0",4,"ngIf"],["fxFlex","100","fxFlex.gt-xs","88",1,"mt-8"],["fxFlex","100","fxFlex.gt-xs","10","class","mt-12 mr-8 attachment-img",4,"ngFor","ngForOf"],["fxFlex","100","fxFlex.gt-xs","10",1,"mt-12","mr-8","attachment-img"],["height","68",1,"caption-figure","overlay-figure",3,"src"],[1,"text-center"],["mat-button","","color","primary",1,"bg-download","mb-4","ml-0",3,"click"],[1,"material-icons"],["fxFlex","100","fxFlex.gt-xs","75",1,"mr-12","mt-12"],[1,"mr-4",3,"innerHtml"],[2,"display","flex",3,"innerHtml"]],template:function(e,t){1&e&&(W.dc(0,"div",0),W.dc(1,"div",1),W.dc(2,"div",2),W.dc(3,"button",3),W.lc("click",(function(e){return t.back()})),W.cd(4),W.qc(5,"translate"),W.cc(),W.cc(),W.cc(),W.dc(6,"div",4),W.dc(7,"div",5),W.dc(8,"div",6),W.dc(9,"label"),W.dc(10,"strong"),W.cd(11),W.qc(12,"translate"),W.cc(),W.cc(),W.cc(),W.dc(13,"div",7),W.dc(14,"label"),W.cd(15),W.cc(),W.cc(),W.dc(16,"div",8),W.dc(17,"label"),W.dc(18,"strong"),W.cd(19),W.qc(20,"translate"),W.cc(),W.cc(),W.cc(),W.dc(21,"div",9),W.dc(22,"label"),W.cd(23),W.cc(),W.cc(),W.dc(24,"div",10),W.dc(25,"label"),W.dc(26,"strong"),W.cd(27),W.qc(28,"translate"),W.cc(),W.cc(),W.cc(),W.dc(29,"div",11),W.dc(30,"label"),W.cd(31),W.cc(),W.cc(),W.dc(32,"div",7),W.dc(33,"label"),W.dc(34,"strong"),W.cd(35),W.qc(36,"translate"),W.cc(),W.cc(),W.cc(),W.dc(37,"div",12),W.dc(38,"label"),W.cd(39),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.Yb(40,"div",13),W.dc(41,"div",14),W.dc(42,"p",15),W.dc(43,"strong"),W.cd(44),W.cc(),W.cc(),W.dc(45,"div",16),W.Yb(46,"div",17),W.dc(47,"div",18),W.dc(48,"label",19),W.dc(49,"strong"),W.cd(50),W.cc(),W.cc(),W.cc(),W.Yb(51,"div",20),W.cc(),W.ad(52,Co,7,2,"div",21),W.cc()),2&e&&(W.Gb(4),W.ed(" ",W.rc(5,12,"homework.question.button.back")," "),W.Gb(7),W.dd(W.rc(12,14,"homework.question.lable.Academic")),W.Gb(4),W.dd(null==t.onlineexam?null:t.onlineexam.academicYearName),W.Gb(4),W.dd(W.rc(20,16,"homework.question.lable.Batch")),W.Gb(4),W.dd(null==t.onlineexam?null:t.onlineexam.batchName),W.Gb(4),W.dd(W.rc(28,18,"homework.question.lable.Class")),W.Gb(4),W.dd(null==t.onlineexam?null:t.onlineexam.className),W.Gb(4),W.dd(W.rc(36,20,"homework.question.lable.Section")),W.Gb(4),W.dd(t.selectedSectionIds.join()),W.Gb(5),W.dd(null==t.onlineexam?null:t.onlineexam.title),W.Gb(6),W.dd(null==t.onlineexam?null:t.onlineexam.subjectName),W.Gb(2),W.yc("ngForOf",null==t.onlineexam?null:t.onlineexam.group))},directives:[xe.c,xe.a,b.a,f.n,x.a,f.o],pipes:[we.c,he.h],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.row[_ngcontent-%COMP%]{margin-top:-10px}.f24[_ngcontent-%COMP%]{font-size:24px;margin-left:-10px}.text-center[_ngcontent-%COMP%]{text-align:center!important}.text-right[_ngcontent-%COMP%]{text-align:right!important}.font20[_ngcontent-%COMP%]{font-size:27px}.font16[_ngcontent-%COMP%]{font-size:16px}mat-card.mat-card[_ngcontent-%COMP%]{border:1px solid hsla(0,0%,50.2%,.47843137254901963)}.f15[_ngcontent-%COMP%]{font-size:15px;margin-left:8px;margin-bottom:0}.copy-fav-btn[_ngcontent-%COMP%]{padding:0 6px!important;background:#019fa2!important;color:#fff!important;font-size:8px}.copy-fav-btn[_ngcontent-%COMP%], .favourite-btn[_ngcontent-%COMP%]{line-height:20px!important;border-radius:0!important;border:1px solid #019fa2!important}.favourite-btn[_ngcontent-%COMP%]{color:#01a39d!important;background:#fff!important;padding:0 5px!important;min-width:38px!important}.copy-fav-btn[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%], .favourite-btn[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{font-size:15px;margin-right:4px}.attachment-img[_ngcontent-%COMP%] .bg-download[_ngcontent-%COMP%]{background:#fff!important;color:#01a39d!important;min-width:35px;line-height:20px!important;padding:0 5px!important}.attachment-img[_ngcontent-%COMP%] .bg-download[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{font-size:18px}"]}),Oo);function qo(e,t){1&e&&(W.dc(0,"th",35),W.cd(1," Group Name "),W.cc())}function Go(e,t){if(1&e&&(W.dc(0,"td",36),W.cd(1),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.ed(" ",null==c?null:c.group_name," ")}}var Io=function(){return{width:"8%"}};function So(e,t){1&e&&(W.dc(0,"th",37),W.cd(1," No of Questions "),W.cc()),2&e&&W.yc("ngStyle",W.Ec(1,Io))}function Mo(e,t){if(1&e&&(W.dc(0,"td",38),W.cd(1),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.ed(" ",null==c?null:c.no_of_questions," ")}}function Po(e,t){1&e&&(W.dc(0,"th",37),W.cd(1," Attended Questions "),W.cc()),2&e&&W.yc("ngStyle",W.Ec(1,Io))}function Qo(e,t){if(1&e&&(W.dc(0,"td",38),W.cd(1),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.ed(" ",null==c?null:c.attend_question," ")}}function No(e,t){1&e&&(W.dc(0,"th",37),W.cd(1," Correct Answer "),W.cc()),2&e&&W.yc("ngStyle",W.Ec(1,Io))}function Ao(e,t){if(1&e&&(W.dc(0,"td",38),W.cd(1),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.ed(" ",null==c?null:c.correct_ans," ")}}function Do(e,t){1&e&&(W.dc(0,"th",37),W.cd(1," Partial Answer "),W.cc()),2&e&&W.yc("ngStyle",W.Ec(1,Io))}function To(e,t){if(1&e&&(W.dc(0,"td",38),W.cd(1),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.ed(" ",null==c?null:c.partial_ans," ")}}function jo(e,t){1&e&&(W.dc(0,"th",37),W.cd(1," Wrong Answer "),W.cc()),2&e&&W.yc("ngStyle",W.Ec(1,Io))}function Lo(e,t){if(1&e&&(W.dc(0,"td",38),W.cd(1),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.ed(" ",c.wrong_ans," ")}}function Eo(e,t){1&e&&(W.dc(0,"th",37),W.cd(1," Scored Marks "),W.cc()),2&e&&W.yc("ngStyle",W.Ec(1,Io))}function zo(e,t){if(1&e&&(W.dc(0,"td",38),W.cd(1),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.ed(" ",null==c?null:c.score_mark," ")}}function Yo(e,t){1&e&&W.Yb(0,"tr",39)}function Xo(e,t){if(1&e){var c=W.ec();W.dc(0,"tr",40),W.lc("click",(function(e){W.Sc(c);var n=t.$implicit;return W.pc().viewQuestionGrp(n)})),W.cc()}}var Ho,Ro=((Ho=function(){return _createClass((function e(t,c,n,a,i,o){_classCallCheck(this,e),this.router=t,this.modelService=c,this.toaster=n,this.loader=a,this.snack=i,this.activateRoute=o,this.displayedColumns=["group_name","question_count","Attend_question","correctans","partialAns","wrongans","score"],this.dataSource=new T.o,this.onlineexamId=this.activateRoute.snapshot.params.onlineexamId,this.studentId=this.activateRoute.snapshot.params.studentId}),[{key:"ngOnInit",value:function(){this.getOne()}},{key:"getOne",value:function(){var e=this;this.loader.open();var t=[],c=[];this.modelService.getQuestionGroup(this.onlineexamId,this.studentId).subscribe((function(n){var a,i,o;(n.keyword="success")?(e.quesGrpList=n.data[0],null===(i=null===(a=e.quesGrpList)||void 0===a?void 0:a.onlineexam_question_group)||void 0===i||i.forEach((function(e){var n,a;t.push(null===(n=e)||void 0===n?void 0:n.marks),c.push(null===(a=e)||void 0===a?void 0:a.score_mark)})),e.totalMarks=t.reduce((function(e,t){return Number(e)+Number(t)||0}),0),e.scoredMarks=c.reduce((function(e,t){return Number(e)+Number(t)||0}),0),e.dataSource=new T.o(null===(o=e.quesGrpList)||void 0===o?void 0:o.onlineexam_question_group),e.loader.close(),e.toaster.present(n.message,"")):(e.loader.close(),e.toaster.present(n.message,""))}))}},{key:"viewQuestionGrp",value:function(e){var t;this.router.navigate(["/teacher/online-exam/result/".concat(this.onlineexamId,"/").concat(this.studentId,"/").concat(null===(t=e)||void 0===t?void 0:t.onlineexam_question_group_id)])}}])}()).\u0275fac=function(e){return new(e||Ho)(W.Xb(h.g),W.Xb(ma),W.Xb(ue.a),W.Xb(de.a),W.Xb(wt.a),W.Xb(h.a))},Ho.\u0275cmp=W.Rb({type:Ho,selectors:[["app-create"]],decls:78,vars:23,consts:[[1,"create_btn"],["mat-raised-button","","color","primary",1,"btn-primary-bg",3,"routerLink"],[1,"float-right","f15"],[1,"pl-28","pr-24"],[1,"detail-view"],["fxLayout","row wrap",1,""],["fxFlex","100","fxFlex.gt-xs","100"],[1,"text-center","mt-8"],["fxFlex","100","fxFlex.gt-xs","20"],["fxFlex","100","fxFlex.gt-xs","60"],[1,"text-center"],[1,"text-right","pr-40"],[1,"border-top"],[1,"p-16"],["fxLayout","row wrap",1,"pl-16"],["fxFlex","100","fxFlex.gt-xs","15",1,""],["fxFlex","100","fxFlex.gt-xs","10",1,""],["fxFlex","100","fxFlex.gt-xs","75",1,"text-right"],[1,"text-right","pr-20"],["fxFlex","100","fxFlex.gt-xs","22",1,""],[1,"table_container"],["mat-table","",1,"full-width",3,"dataSource"],["matColumnDef","group_name"],["mat-header-cell","","style","width: 20%;",4,"matHeaderCellDef"],["mat-cell","","class","pt-4",4,"matCellDef"],["matColumnDef","question_count"],["mat-header-cell","","class","text-center",3,"ngStyle",4,"matHeaderCellDef"],["mat-cell","","class","pt-4 text-center",4,"matCellDef"],["matColumnDef","Attend_question"],["matColumnDef","correctans"],["matColumnDef","partialAns"],["matColumnDef","wrongans"],["matColumnDef","score"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"click",4,"matRowDef","matRowDefColumns"],["mat-header-cell","",2,"width","20%"],["mat-cell","",1,"pt-4"],["mat-header-cell","",1,"text-center",3,"ngStyle"],["mat-cell","",1,"pt-4","text-center"],["mat-header-row",""],["mat-row","",3,"click"]],template:function(e,t){1&e&&(W.dc(0,"div",0),W.dc(1,"button",1),W.cd(2,"Back"),W.cc(),W.dc(3,"label",2),W.dc(4,"strong"),W.cd(5),W.dc(6,"span",3),W.cd(7),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(8,"div",4),W.dc(9,"div",5),W.dc(10,"div",6),W.dc(11,"h2",7),W.dc(12,"strong"),W.cd(13),W.cc(),W.cc(),W.dc(14,"div",5),W.Yb(15,"div",8),W.dc(16,"div",9),W.dc(17,"h3",10),W.dc(18,"strong"),W.cd(19),W.cc(),W.cc(),W.cc(),W.dc(20,"div",8),W.dc(21,"h3",11),W.dc(22,"strong"),W.cd(23),W.qc(24,"number"),W.cc(),W.cc(),W.cc(),W.cc(),W.Yb(25,"div",12),W.dc(26,"div",13),W.dc(27,"div",14),W.dc(28,"div",15),W.dc(29,"label"),W.dc(30,"strong"),W.cd(31,"Last Submitted Date"),W.cc(),W.cc(),W.cc(),W.dc(32,"div",16),W.dc(33,"label"),W.dc(34,"strong"),W.cd(35),W.qc(36,"displayDate"),W.cc(),W.cc(),W.cc(),W.dc(37,"div",17),W.dc(38,"h3",18),W.dc(39,"strong"),W.cd(40),W.qc(41,"number"),W.cc(),W.cc(),W.cc(),W.dc(42,"div",15),W.dc(43,"label"),W.dc(44,"strong"),W.cd(45,"Last Submitted Time"),W.cc(),W.cc(),W.cc(),W.dc(46,"div",16),W.dc(47,"label"),W.dc(48,"strong"),W.cd(49),W.qc(50,"displayTime"),W.cc(),W.cc(),W.cc(),W.Yb(51,"div",17),W.Yb(52,"div",19),W.cc(),W.dc(53,"div",20),W.dc(54,"table",21),W.bc(55,22),W.ad(56,qo,2,0,"th",23),W.ad(57,Go,2,1,"td",24),W.ac(),W.bc(58,25),W.ad(59,So,2,2,"th",26),W.ad(60,Mo,2,1,"td",27),W.ac(),W.bc(61,28),W.ad(62,Po,2,2,"th",26),W.ad(63,Qo,2,1,"td",27),W.ac(),W.bc(64,29),W.ad(65,No,2,2,"th",26),W.ad(66,Ao,2,1,"td",27),W.ac(),W.bc(67,30),W.ad(68,Do,2,2,"th",26),W.ad(69,To,2,1,"td",27),W.ac(),W.bc(70,31),W.ad(71,jo,2,2,"th",26),W.ad(72,Lo,2,1,"td",27),W.ac(),W.bc(73,32),W.ad(74,Eo,2,2,"th",26),W.ad(75,zo,2,1,"td",27),W.ac(),W.ad(76,Yo,1,0,"tr",33),W.ad(77,Xo,1,0,"tr",34),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.cc()),2&e&&(W.Gb(1),W.yc("routerLink","/teacher/online-exam/student-list/"+t.onlineexamId),W.Gb(4),W.dd(null==t.quesGrpList?null:t.quesGrpList.student_name),W.Gb(2),W.fd("",null==t.quesGrpList?null:t.quesGrpList.class_name,"- ",null==t.quesGrpList?null:t.quesGrpList.section_name,""),W.Gb(6),W.dd(null==t.quesGrpList?null:t.quesGrpList.title),W.Gb(6),W.dd(null==t.quesGrpList?null:t.quesGrpList.subject_name),W.Gb(4),W.ed("Total Marks : ",W.sc(24,13,t.totalMarks,"1.2-2"),""),W.Gb(12),W.dd(W.rc(36,16,null==t.quesGrpList?null:t.quesGrpList.last_submission_date)),W.Gb(5),W.ed("Total Scored Marks : ",W.sc(41,18,t.scoredMarks,"1.2-2"),""),W.Gb(9),W.ed(" ",W.rc(50,21,null==t.quesGrpList?null:t.quesGrpList.last_submission_time),""),W.Gb(5),W.yc("dataSource",t.dataSource),W.Gb(22),W.yc("matHeaderRowDef",t.displayedColumns),W.Gb(1),W.yc("matRowDefColumns",t.displayedColumns))},directives:[b.a,h.h,xe.c,xe.a,T.n,T.c,T.i,T.b,T.k,T.m,T.h,T.a,f.p,_t.b,T.j,T.l],pipes:[f.f,he.a,he.c],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.row[_ngcontent-%COMP%]{margin-top:-10px}.f24[_ngcontent-%COMP%]{font-size:24px;margin-left:-10px}.text-center[_ngcontent-%COMP%]{text-align:center!important}.text-right[_ngcontent-%COMP%]{text-align:right!important}.font20[_ngcontent-%COMP%]{font-size:27px}.font16[_ngcontent-%COMP%]{font-size:16px}mat-card.mat-card[_ngcontent-%COMP%]{border:1px solid hsla(0,0%,50.2%,.47843137254901963)}.f15[_ngcontent-%COMP%]{font-size:15px;margin-left:8px;margin-bottom:0}.start_btn[_ngcontent-%COMP%]{line-height:30px!important;padding:5px 17px!important;min-width:120px!important}.pr-20[_ngcontent-%COMP%]{padding-right:22px}"]}),Ho),Bo=c("DHi0");function $o(e,t){if(1&e&&(W.dc(0,"h3",21),W.dc(1,"strong"),W.cd(2),W.qc(3,"number"),W.cc(),W.cc()),2&e){var c=W.pc();W.Gb(2),W.ed("Scored Marks : ",W.sc(3,1,c.scoredMarks,"1.2-2"),"")}}function Vo(e,t){1&e&&(W.dc(0,"label"),W.dc(1,"strong"),W.cd(2,"Marks"),W.cc(),W.cc())}function Uo(e,t){if(1&e&&(W.dc(0,"mat-radio-button",36),W.Yb(1,"p",37),W.qc(2,"safeHtml"),W.cc()),2&e){var c=t.$implicit;W.zc("value",c.is_answer),W.yc("checked",1==c.is_answer),W.Gb(1),W.yc("innerHtml",W.rc(2,3,c.option_name),W.Tc)}}function Jo(e,t){1&e&&(W.dc(0,"div",38),W.dc(1,"label"),W.dc(2,"strong"),W.cd(3," Attachment"),W.cc(),W.cc(),W.cc())}function Wo(e,t){if(1&e){var c=W.ec();W.dc(0,"div",41),W.Yb(1,"img",42),W.dc(2,"div",10),W.dc(3,"button",43),W.lc("click",(function(e){W.Sc(c);var n=t.$implicit;return W.pc(3).download(null==n?null:n.onlineexam_question_attachment_id,null==n?null:n.attachment,"admin")})),W.dc(4,"i",44),W.cd(5," cloud_download "),W.cc(),W.cc(),W.cc(),W.cc()}if(2&e){var n=t.$implicit;W.Gb(1),W.zc("src",null==n?null:n.attachment,W.Vc)}}function Ko(e,t){if(1&e&&(W.dc(0,"div",39),W.ad(1,Wo,6,1,"div",40),W.cc()),2&e){var c=W.pc().$implicit;W.Gb(1),W.yc("ngForOf",null==c?null:c.quest_attachment)}}function Zo(e,t){if(1&e&&(W.dc(0,"div",45),W.dc(1,"div",46),W.dc(2,"h4"),W.dc(3,"strong"),W.cd(4,"Answer :"),W.cc(),W.cc(),W.Yb(5,"div",24),W.qc(6,"safeHtml"),W.cc(),W.cc()),2&e){var c=W.pc().$implicit,n=W.pc();W.Gb(5),W.yc("innerHtml",W.rc(6,1,n.getStudentAnswer(c.ques_options)),W.Tc)}}function er(e,t){if(1&e&&(W.dc(0,"div",45),W.dc(1,"div",46),W.dc(2,"h4"),W.dc(3,"strong"),W.cd(4,"Answer :"),W.cc(),W.cc(),W.Yb(5,"div",24),W.qc(6,"safeHtml"),W.cc(),W.cc()),2&e){var c=W.pc().$implicit;W.Gb(5),W.yc("innerHtml",W.rc(6,1,c.stu_answer),W.Tc)}}function tr(e,t){if(1&e&&(W.dc(0,"div",45),W.dc(1,"div",46),W.dc(2,"h4"),W.dc(3,"strong"),W.cd(4,"Answer Key :"),W.cc(),W.cc(),W.Yb(5,"div",24),W.qc(6,"safeHtml"),W.cc(),W.cc()),2&e){var c=W.pc().$implicit;W.Gb(5),W.yc("innerHtml",W.rc(6,1,c.answer),W.Tc)}}function cr(e,t){1&e&&(W.dc(0,"div",38),W.dc(1,"label",47),W.dc(2,"strong"),W.cd(3,"Original Attachment"),W.cc(),W.cc(),W.cc())}function nr(e,t){if(1&e){var c=W.ec();W.dc(0,"div",41),W.Yb(1,"img",42),W.dc(2,"div",10),W.dc(3,"button",43),W.lc("click",(function(e){W.Sc(c);var n=t.$implicit;return W.pc(3).download(null==n?null:n.onlineexam_result_attachment_id,null==n?null:n.attachment,"student")})),W.dc(4,"i",44),W.cd(5," cloud_download "),W.cc(),W.cc(),W.cc(),W.cc()}if(2&e){var n=t.$implicit;W.Gb(1),W.zc("src",null==n?null:n.attachment,W.Vc)}}function ar(e,t){if(1&e&&(W.dc(0,"div",39),W.ad(1,nr,6,1,"div",48),W.cc()),2&e){var c=W.pc().$implicit;W.Gb(1),W.yc("ngForOf",null==c?null:c.stu_attachment)}}function ir(e,t){1&e&&(W.dc(0,"div",49),W.dc(1,"label",47),W.dc(2,"strong"),W.cd(3,"Evaluated Attachment"),W.cc(),W.cc(),W.cc())}function or(e,t){if(1&e&&W.Yb(0,"img",42),2&e){var c=W.pc().$implicit;W.zc("src",null==c?null:c.evaluate_attach,W.Vc)}}function rr(e,t){if(1&e){var c=W.ec();W.dc(0,"div",10),W.dc(1,"button",43),W.lc("click",(function(e){W.Sc(c);var t=W.pc().$implicit;return W.pc(3).download(null==t?null:t.onlineexam_result_attachment_id,null==t?null:t.evaluate_attach,"evaluate")})),W.dc(2,"i",44),W.cd(3," cloud_download "),W.cc(),W.cc(),W.cc()}}function sr(e,t){if(1&e&&(W.dc(0,"div",41),W.ad(1,or,1,1,"img",50),W.ad(2,rr,4,0,"div",51),W.cc()),2&e){var c=t.$implicit;W.Gb(1),W.yc("ngIf",""!=(null==c?null:c.evaluate_attach)),W.Gb(1),W.yc("ngIf",""!=(null==c?null:c.evaluate_attach))}}function lr(e,t){if(1&e&&(W.dc(0,"div",39),W.ad(1,sr,3,2,"div",48),W.cc()),2&e){var c=W.pc().$implicit;W.Gb(1),W.yc("ngForOf",null==c?null:c.stu_attachment)}}function dr(e,t){if(1&e&&(W.dc(0,"div",14),W.dc(1,"div",22),W.dc(2,"label"),W.dc(3,"strong",23),W.Yb(4,"span",24),W.cd(5,".\xa0"),W.Yb(6,"span",24),W.qc(7,"safeHtml"),W.cc(),W.cc(),W.cc(),W.dc(8,"div",16),W.dc(9,"label"),W.cd(10),W.cc(),W.cc(),W.dc(11,"div",25),W.dc(12,"label",26),W.dc(13,"strong",27),W.cd(14),W.cc(),W.cc(),W.cc(),W.dc(15,"div",28),W.dc(16,"div",29),W.dc(17,"mat-radio-group",30),W.ad(18,Uo,3,5,"mat-radio-button",31),W.cc(),W.cc(),W.ad(19,Jo,4,0,"div",32),W.ad(20,Ko,2,1,"div",33),W.dc(21,"div",29),W.ad(22,Zo,7,3,"div",34),W.ad(23,er,7,3,"div",34),W.ad(24,tr,7,3,"div",34),W.cc(),W.ad(25,cr,4,0,"div",32),W.ad(26,ar,2,1,"div",33),W.ad(27,ir,4,0,"div",35),W.ad(28,lr,2,1,"div",33),W.cc(),W.cc()),2&e){var c=t.$implicit,n=t.index;W.Gb(4),W.zc("innerHtml",n+1,W.Tc),W.Gb(2),W.yc("innerHtml",W.rc(7,14,c.question_name),W.Tc),W.Gb(4),W.ed("(",c.question_mark,")"),W.Gb(4),W.dd(c.obtained_mark),W.Gb(4),W.yc("ngForOf",null==c?null:c.ques_options),W.Gb(1),W.yc("ngIf",0!=(null==c?null:c.quest_attachment.length)),W.Gb(1),W.yc("ngIf",0!=(null==c?null:c.quest_attachment.length)),W.Gb(2),W.yc("ngIf","objective"==c.type),W.Gb(1),W.yc("ngIf","non-objective"==c.type),W.Gb(1),W.yc("ngIf","non-objective"==c.type),W.Gb(1),W.yc("ngIf",0!=(null==c?null:c.stu_attachment.length)),W.Gb(1),W.yc("ngIf",0!=(null==c?null:c.stu_attachment.length)),W.Gb(1),W.yc("ngIf",0!=(null==c?null:c.stu_attachment.length)),W.Gb(1),W.yc("ngIf",0!=(null==c?null:c.stu_attachment.length))}}var ur,mr,pr=((ur=function(){return _createClass((function e(t,c,n,a,i,o,r){_classCallCheck(this,e),this.gallery=t,this.modelService=c,this.activateRoute=n,this.toaster=a,this.loader=i,this.apiService=o,this.router=r,this.formData={},this.console=console,this.subjectName="",this.title="",this.studentName="",this.className="",this.sectionName="",this.onlineexamId=this.activateRoute.snapshot.params.onlineexamId,this.studentId=this.activateRoute.snapshot.params.studentId,this.quesGrpId=this.activateRoute.snapshot.params.quesGrpId}),[{key:"ngOnInit",value:function(){this.getQuesGrpOne(),this.items=hr.map((function(e){return new Bo.d({src:e.srcUrl,thumb:e.previewUrl})})),this.basicLightboxExample(),this.withCustomGalleryConfig()}},{key:"basicLightboxExample",value:function(){this.gallery.ref().load(this.items)}},{key:"withCustomGalleryConfig",value:function(){var e=this.gallery.ref("anotherLightbox");e.setConfig({imageSize:Bo.e.Cover,thumbPosition:Bo.f.Bottom}),e.load(this.galleryDetails)}},{key:"ngViewAfterInit",value:function(){}},{key:"getQuesGrpOne",value:function(){var e=this,t=[];this.modelService.getQuesGrpOne(this.onlineexamId,this.studentId,this.quesGrpId).subscribe((function(c){var n,a,i,o,r,s,l,d;"success"==c.keyword?(e.quesGrp=c.data,console.log(e.quesGrp,"this.quesGrp"),e.subjectName=null!=(a=null===(n=e.quesGrp)||void 0===n?void 0:n.subject_name)?a:"",e.title=null!=(i=e.quesGrp.title)?i:"",e.studentName=null!=(o=e.quesGrp.student_name)?o:"",e.className=null!=(r=e.quesGrp.class_name)?r:"",e.sectionName=null!=(s=e.quesGrp.section_name)?s:"",null===(d=null===(l=e.quesGrp)||void 0===l?void 0:l.questions)||void 0===d||d.forEach((function(e){var c;t.push(null===(c=e)||void 0===c?void 0:c.obtained_mark)})),e.scoredMarks=t.reduce((function(e,t){return Number(e)+Number(t)||0}),0),e.toaster.present(c.message,"")):e.toaster.present(c.message,"")}))}},{key:"getStudentAnswer",value:function(e){var t;return null===(t=e.find((function(e){return"1"==e.is_answer})))||void 0===t?void 0:t.option_name}},{key:"isChecked",value:function(e,t){return t.option_id==e}},{key:"download",value:function(e,t,c){var n=this;if("admin"==c)var a="onlineexam/downloadQuesAttachment/";else"student"==c?a="onlineexamQn/downloadStudentAttach/":"evaluate"==c&&(a="onlineexam/DownloadResultQuestion/");this.apiService.downloadFile("".concat(a).concat(e),{fileName:t}).subscribe((function(e){switch(e.type){case B.d.DownloadProgress:break;case B.d.Response:console.log(e);var c=new Blob([e.body],{type:e.body.type}),n=document.createElement("a");n.setAttribute("style","display:none;"),document.body.appendChild(n),n.download=t,n.href=URL.createObjectURL(c),n.target="_blank",n.click(),document.body.removeChild(n)}}),(function(e){n.toaster.present("could not download")}))}},{key:"overAllResult",value:function(){this.router.navigate(["/teacher/online-exam/overall-result/".concat(this.onlineexamId,"/").concat(this.studentId)])}}])}()).\u0275fac=function(e){return new(e||ur)(W.Xb(Bo.a),W.Xb(ma),W.Xb(h.a),W.Xb(ue.a),W.Xb(de.a),W.Xb(R.a),W.Xb(h.g))},ur.\u0275cmp=W.Rb({type:ur,selectors:[["app-create"]],decls:37,vars:10,consts:[[1,"create_btn"],["mat-raised-button","","color","primary",1,"btn-primary-bg",3,"click"],[1,"float-right","f15"],[1,"pl-28","pr-24"],[1,"detail-view"],["fxLayout","row wrap",1,""],["fxFlex","100","fxFlex.gt-xs","100"],[1,"text-center","mt-8"],["fxFlex","100","fxFlex.gt-xs","20"],["fxFlex","100","fxFlex.gt-xs","60"],[1,"text-center"],["class","text-right pr-16",4,"ngIf"],[1,"border-top"],[1,"p-16","pt-0"],["fxLayout","row wrap",1,"mt-0"],["fxFlex","100","fxFlex.gt-xs","90",1,"mt-12"],["fxFlex","100","fxFlex.gt-xs","5",1,"mt-12","text-center"],[4,"ngIf"],["fxFlex","100","fxFlex.gt-xs","5",1,"mt-12","text-right"],[1,"m-0"],["fxLayout","row wrap","class","mt-0",4,"ngFor","ngForOf"],[1,"text-right","pr-16"],["fxFlex","100","fxFlex.gt-xs","90",1,"mt-12","sun-editor-custom-style"],[2,"display","flex"],[3,"innerHtml"],["fxFlex","100","fxFlex.gt-xs","5",1,"mt-12"],[2,"margin-left","24px"],[1,"text-right"],["fxLayout","row wrap",1,"mt-0","ml-16","answer-block"],["fxFlex","100","fxFlex.gt-xs","100",1,"mt-8","sun-editor-custom-style"],["aria-label","Select an option","disabled","",1,"ml-15","f14","custom-radio-button"],["class","mr-8",3,"checked","value",4,"ngFor","ngForOf"],["fxFlex","100","fxFlex.gt-xs","11","class","mt-12",4,"ngIf"],["fxFlex","100","fxFlex.gt-xs","88","class","mt-8",4,"ngIf"],["fxLayout","row wrap",4,"ngIf"],["fxFlex","100","fxFlex.gt-xs","11","class","pt-28",4,"ngIf"],[1,"mr-8",3,"checked","value"],[1,"pt-4",3,"innerHtml"],["fxFlex","100","fxFlex.gt-xs","11",1,"mt-12"],["fxFlex","100","fxFlex.gt-xs","88",1,"mt-8"],["class","mt-12 mr-8 attachment-img","fxFlex","100","fxFlex.gt-xs","10",4,"ngFor","ngForOf"],["fxFlex","100","fxFlex.gt-xs","10",1,"mt-12","mr-8","attachment-img"],["height","80","width","100%",1,"caption-figure","overlay-figure",3,"src"],["mat-button","","color","primary",1,"bg-download","mb-4","ml-0",3,"click"],[1,"material-icons"],["fxLayout","row wrap"],["fxFlex","100","fxFlex.gt-xs","100",1,""],[2,"color","blue"],["fxFlex","100","fxFlex.gt-xs","10","class","mt-12 mr-8 attachment-img",4,"ngFor","ngForOf"],["fxFlex","100","fxFlex.gt-xs","11",1,"pt-28"],["class","caption-figure overlay-figure","height","80","width","100%",3,"src",4,"ngIf"],["class","text-center",4,"ngIf"]],template:function(e,t){1&e&&(W.dc(0,"div",0),W.dc(1,"button",1),W.lc("click",(function(e){return t.overAllResult()})),W.cd(2," Back "),W.cc(),W.dc(3,"label",2),W.dc(4,"strong"),W.cd(5),W.dc(6,"span",3),W.cd(7),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(8,"div",4),W.dc(9,"div",5),W.dc(10,"div",6),W.dc(11,"h2",7),W.dc(12,"strong"),W.cd(13),W.cc(),W.cc(),W.dc(14,"div",5),W.Yb(15,"div",8),W.dc(16,"div",9),W.dc(17,"h3",10),W.dc(18,"strong"),W.cd(19),W.cc(),W.cc(),W.cc(),W.dc(20,"div",8),W.ad(21,$o,4,4,"h3",11),W.cc(),W.cc(),W.Yb(22,"div",12),W.dc(23,"div",13),W.dc(24,"div",14),W.dc(25,"div",15),W.dc(26,"label"),W.dc(27,"strong"),W.cd(28),W.cc(),W.cc(),W.cc(),W.dc(29,"div",16),W.ad(30,Vo,3,0,"label",17),W.cc(),W.dc(31,"div",18),W.dc(32,"label"),W.dc(33,"strong"),W.cd(34),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(35,"mat-card",19),W.ad(36,dr,29,16,"div",20),W.cc(),W.cc(),W.cc(),W.cc(),W.cc()),2&e&&(W.Gb(5),W.dd(t.studentName),W.Gb(2),W.fd("",t.className," - ",t.sectionName,""),W.Gb(6),W.dd(t.title),W.Gb(6),W.dd(t.subjectName),W.Gb(2),W.yc("ngIf",t.scoredMarks),W.Gb(7),W.dd(t.quesGrp.group_name),W.Gb(2),W.yc("ngIf",null==t.quesGrp?null:t.quesGrp.marks),W.Gb(4),W.dd(null==t.quesGrp?null:t.quesGrp.marks),W.Gb(2),W.yc("ngForOf",null==t.quesGrp?null:t.quesGrp.questions))},directives:[b.a,xe.c,xe.a,f.o,x.a,f.n,F.b,F.a],pipes:[f.f,he.h],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.row[_ngcontent-%COMP%]{margin-top:-10px}.f24[_ngcontent-%COMP%]{font-size:24px;margin-left:-10px}.text-center[_ngcontent-%COMP%]{text-align:center!important}.text-right[_ngcontent-%COMP%]{text-align:right!important}.f16[_ngcontent-%COMP%]{font-size:16px}.answer-block[_ngcontent-%COMP%]{margin-top:-12px!important}mat-card[_ngcontent-%COMP%]{border:1px solid hsla(0,0%,50.2%,.3686274509803922)}.mat-radio-button[_ngcontent-%COMP%]{display:list-item;list-style:none}"],changeDetection:0}),ur),hr=[{srcUrl:"assets/images/backgrounds/waterfall.jpg",previewUrl:"assets/images/backgrounds/waterfall.jpg"}],fr=((mr=function(){return _createClass((function e(t){_classCallCheck(this,e),this.apiService=t}),[{key:"getAnalysisList",value:function(e,t,c){return this.apiService.get("onlineexam/analytics/".concat(e,"/").concat(t,"/").concat(c))}},{key:"getQuestionList",value:function(e,t,c){return this.apiService.get("onlineexam/analytics/questions/".concat(e,"/").concat(t,"/").concat(c))}},{key:"getPreviewDetails",value:function(e,t){return this.apiService.get("onlineexam/analyticsPreview/".concat(e,"/").concat(t))}}])}()).\u0275fac=function(e){return new(e||mr)(W.hc(R.a))},mr.\u0275prov=W.Tb({token:mr,factory:mr.\u0275fac,providedIn:"root"}),mr);c("WyAD");var gr=c("LPYB");function br(e,t){if(1&e){var c=W.ec();W.dc(0,"div",22),W.dc(1,"canvas",23),W.lc("chartHover",(function(e){return W.Sc(c),W.pc(2).chartHovered(e)}))("chartClick",(function(e){return W.Sc(c),W.pc(2).chartClicked(e)})),W.cc(),W.cc()}if(2&e){var n=W.pc(2);W.Gb(1),W.yc("data",n.pieChartData)("labels",n.pieChartLabels)("chartType",n.pieChartType)("options",n.pieChartOptions)("legend",n.pieChartLegend)("colors",n.pieChartColors)}}function xr(e,t){1&e&&(W.dc(0,"div",24),W.cd(1," No Analysis Chart Found..."),W.cc())}function vr(e,t){if(1&e&&(W.dc(0,"div"),W.dc(1,"div",7),W.dc(2,"h3"),W.dc(3,"strong"),W.cd(4,"Online Exam Analytics Report"),W.cc(),W.cc(),W.cc(),W.dc(5,"div",8),W.dc(6,"div",9),W.dc(7,"h3",10),W.dc(8,"strong"),W.cd(9),W.dc(10,"span",11),W.cd(11),W.cc(),W.dc(12,"span",11),W.cd(13),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(14,"div",12),W.dc(15,"span"),W.dc(16,"strong",13),W.cd(17,"Marks "),W.cc(),W.cc(),W.dc(18,"span",14),W.cd(19),W.cc(),W.dc(20,"span",15),W.cd(21),W.cc(),W.cc(),W.cc(),W.dc(22,"div",7),W.dc(23,"h3"),W.dc(24,"strong"),W.cd(25),W.cc(),W.dc(26,"label",16),W.cd(27),W.cc(),W.cc(),W.dc(28,"h3",10),W.dc(29,"strong"),W.cd(30),W.cc(),W.cc(),W.cc(),W.dc(31,"div",17),W.dc(32,"div",18),W.dc(33,"h1",19),W.dc(34,"strong"),W.cd(35),W.cc(),W.cc(),W.dc(36,"h3"),W.cd(37),W.cc(),W.cc(),W.dc(38,"div",9),W.ad(39,br,2,6,"div",20),W.ad(40,xr,2,0,"div",21),W.cc(),W.cc(),W.cc()),2&e){var c=W.pc();W.Gb(9),W.ed(" ",null==c.preview?null:c.preview.first_name,""),W.Gb(2),W.dd(null==c.preview?null:c.preview.roll_number),W.Gb(2),W.fd("",null==c.preview?null:c.preview.class_name," - ",null==c.preview?null:c.preview.section_name,""),W.Gb(6),W.ed("Scored : ",null==c.preview?null:c.preview.score_mark,""),W.Gb(2),W.ed("Total : ",null==c.preview?null:c.preview.tot_mark,""),W.Gb(4),W.dd(null==c.preview?null:c.preview.title),W.Gb(2),W.dd(null==c.preview?null:c.preview.home_work_type),W.Gb(3),W.dd(null==c.preview?null:c.preview.subject_name),W.Gb(5),W.dd(null==c.preview?null:c.preview.score_mark),W.Gb(2),W.ed("Out of ",null==c.preview?null:c.preview.tot_mark,""),W.Gb(2),W.yc("ngIf","0.00"!=(null==c.preview?null:c.preview.correct_ans)||"0.00"!=(null==c.preview?null:c.preview.wrong_ans)||"0.00"!=(null==c.preview?null:c.preview.not_attend_ans)||"0.00"!=(null==c.preview?null:c.preview.partial_ans)),W.Gb(1),W.yc("ngIf","0.00"==(null==c.preview?null:c.preview.correct_ans)&&"0.00"==(null==c.preview?null:c.preview.wrong_ans)&&"0.00"==(null==c.preview?null:c.preview.not_attend_ans)&&"0.00"==(null==c.preview?null:c.preview.partial_ans))}}function yr(e,t){1&e&&(W.dc(0,"div",7),W.dc(1,"h5"),W.dc(2,"strong"),W.cd(3,"No data found..."),W.cc(),W.cc(),W.cc())}var kr,wr=((kr=function(){return _createClass((function e(t,c,n,a,i,o,r){_classCallCheck(this,e),this.data=t,this.dialogRef=c,this.dialog=n,this.router=a,this.toaster=i,this.loader=o,this.modelService=r,this.pieChartOptions={responsive:!0,legend:{display:!0,position:"right",align:"end"}},this.pieChartLegend=!0,this.pieChartLabels=["Correct Answer","Wrong Answer","Not Answered","Partially Completed"],this.pieChartData=[],this.pieChartType="pie",this.pieChartColors=[{backgroundColor:["#19cbc3","#d32f3e","#f8a918","#2a699e"]}]}),[{key:"chartClicked",value:function(e){}},{key:"chartHovered",value:function(e){}},{key:"ngOnInit",value:function(){var e=this;this.modelService.getPreviewDetails(this.data.onlineexamId,this.data.studentId).subscribe((function(t){var c,n,a,i;"success"==t.keyword?(e.preview=t.data[0],e.pieChartData=[null===(c=e.preview)||void 0===c?void 0:c.correct_ans,null===(n=e.preview)||void 0===n?void 0:n.wrong_ans,null===(a=e.preview)||void 0===a?void 0:a.not_attend_ans,null===(i=e.preview)||void 0===i?void 0:i.partial_ans],console.log(e.preview,"preview"),e.toaster.present(t.message,"")):e.toaster.present(t.message,"")}))}}])}()).\u0275fac=function(e){return new(e||kr)(W.Xb(Ke.a),W.Xb(Ke.f),W.Xb(Ke.b),W.Xb(h.g),W.Xb(ue.a),W.Xb(de.a),W.Xb(fr))},kr.\u0275cmp=W.Rb({type:kr,selectors:[["app-preview-onlineexam-analysis"]],decls:10,vars:2,consts:[[1,"homework-analysis","pt-0"],[1,"card-title-text"],[2,"float","right","color","red","cursor","pointer",3,"click"],[1,"mt-4"],[1,"ml-0"],[4,"ngIf"],["class","text-center mt-12",4,"ngIf"],[1,"text-center","mt-12"],["fxLayout","row wrap",1,"mt-8","pb-8",2,"border-bottom","1px solid grey"],["fxFlex","100","fxFlex.gt-xs","70",1,""],[1,"f14"],[1,"ml-24"],["fxFlex","100","fxFlex.gt-xs","30",1,"text-right"],[2,"font-size","22px"],[1,"completed-count"],[1,"total-count","ml-4"],[1,"ml-8","hw-type"],["fxLayout","row wrap"],["fxFlex","100","fxFlex.gt-xs","30",1,"text-center",2,"margin-top","70px"],[1,"f50"],["style"," width: 400px!important; \n height: 400px!important;margin:auto;",4,"ngIf"],["style","text-align: center;padding-top: 60px;",4,"ngIf"],[2,"width","400px!important","height","400px!important","margin","auto"],["baseChart","",3,"data","labels","chartType","options","legend","colors","chartHover","chartClick"],[2,"text-align","center","padding-top","60px"]],template:function(e,t){1&e&&(W.dc(0,"mat-card",0),W.dc(1,"mat-card-title"),W.dc(2,"div",1),W.cd(3,"Preview "),W.dc(4,"span",2),W.lc("click",(function(e){return t.dialogRef.close()})),W.dc(5,"mat-icon",3),W.cd(6,"close"),W.cc(),W.cc(),W.cc(),W.Yb(7,"mat-divider",4),W.cc(),W.ad(8,vr,41,13,"div",5),W.ad(9,yr,4,0,"div",6),W.cc()),2&e&&(W.Gb(8),W.yc("ngIf",t.preview),W.Gb(1),W.yc("ngIf",!t.preview))},directives:[x.a,x.f,w.a,ve.a,f.o,xe.c,xe.a,gr.a],styles:[".completed-count[_ngcontent-%COMP%]{background:green}.completed-count[_ngcontent-%COMP%], .total-count[_ngcontent-%COMP%]{color:#fff;padding:4px;font-size:13px}.total-count[_ngcontent-%COMP%]{background:#734f96}.mark[_ngcontent-%COMP%]{width:80px;height:80px;border:3px solid rgba(232,86,86,.7294117647058823);border-radius:50%}.mark-details[_ngcontent-%COMP%]{width:75px;height:75px;background:rgba(232,86,86,.7294117647058823);border-radius:50%;border:3px solid #fff;padding-top:19px;color:#fff}.hw-type[_ngcontent-%COMP%]{padding:2px 4px!important;border-radius:0!important;font-size:11px!important;background:#734f96!important;color:#fff!important}th[_ngcontent-%COMP%]{width:10%;color:#000!important;font-weight:600!important;background:hsla(0,0%,50.2%,.30196078431372547)}table[_ngcontent-%COMP%]{line-height:30px;border-color:hsla(0,0%,50.2%,.30196078431372547)}td[_ngcontent-%COMP%]{text-align:center!important;border:1px solid hsla(0,0%,80%,.4588235294117647)!important}th[_ngcontent-%COMP%]{border:1px solid rgba(164,153,153,.4588235294117647)!important}td[_ngcontent-%COMP%]:nth-child(6){background-color:#f5f5f5!important}.mat-header-cell[_ngcontent-%COMP%]{padding-top:4px!important}tr.mat-header-row[_ngcontent-%COMP%]{height:unset!important}table.mat-table[_ngcontent-%COMP%]{border-spacing:0}td[_ngcontent-%COMP%]:nth-child(3){text-align:left!important;padding-left:12px}td[_ngcontent-%COMP%]:nth-child(4), td[_ngcontent-%COMP%]:nth-child(5){background-color:#f5f5f5!important}td[_ngcontent-%COMP%]:nth-child(5){padding-top:5px}td[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{line-height:18px!important;padding:0 7px!important}td[_ngcontent-%COMP%]{line-height:15px}.question-analysis[_ngcontent-%COMP%]{border-spacing:0}.question-analysis[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:12px}.homework-status[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{position:relative;bottom:4px;left:10px}.homework-status[_ngcontent-%COMP%]{list-style:none;display:inline-flex;float:right}.f50[_ngcontent-%COMP%]{font-size:50px}"]}),kr),_r=c("wZkO");function Cr(e,t){1&e&&(W.dc(0,"label",47),W.cd(1,"Evaluated"),W.cc())}function Or(e,t){1&e&&(W.dc(0,"label",48),W.cd(1,"Missing"),W.cc())}function Fr(e,t){1&e&&(W.dc(0,"label",49),W.cd(1,"Submitted"),W.cc())}function qr(e,t){1&e&&(W.dc(0,"label",50),W.cd(1,"Not Submitted"),W.cc())}function Gr(e,t){if(1&e){var c=W.ec();W.dc(0,"tr",40),W.dc(1,"td",41),W.cd(2),W.cc(),W.dc(3,"td",41),W.cd(4),W.cc(),W.dc(5,"td",41),W.cd(6),W.cc(),W.dc(7,"td",41),W.ad(8,Cr,2,0,"label",42),W.ad(9,Or,2,0,"label",43),W.ad(10,Fr,2,0,"label",44),W.ad(11,qr,2,0,"label",45),W.cc(),W.dc(12,"td",41),W.dc(13,"button",46),W.lc("click",(function(e){W.Sc(c);var n=t.$implicit;return W.pc(3).preview(null==n?null:n.student_id,null==n?null:n.status)})),W.cd(14,"Preview"),W.cc(),W.cc(),W.cc()}if(2&e){var n=t.$implicit;W.Gb(2),W.dd(null==n?null:n.roll_number),W.Gb(2),W.dd(null==n?null:n.admission_no),W.Gb(2),W.dd(null==n?null:n.first_name),W.Gb(2),W.yc("ngIf","Evaluated"==(null==n?null:n.status)),W.Gb(1),W.yc("ngIf","Missing"==(null==n?null:n.status)),W.Gb(1),W.yc("ngIf","Done"==(null==n?null:n.status)),W.Gb(1),W.yc("ngIf","Not done"==(null==n?null:n.status))}}function Ir(e,t){if(1&e&&(W.dc(0,"tbody"),W.ad(1,Gr,15,7,"tr",39),W.cc()),2&e){var c=W.pc(2);W.Gb(1),W.yc("ngForOf",null==c.analysis?null:c.analysis.student_list)}}function Sr(e,t){1&e&&(W.dc(0,"tbody",17),W.dc(1,"tr"),W.dc(2,"td",51),W.dc(3,"h5"),W.dc(4,"strong"),W.cd(5,"No data found..."),W.cc(),W.cc(),W.cc(),W.cc(),W.cc())}function Mr(e,t){if(1&e&&(W.dc(0,"tr"),W.dc(1,"td"),W.cd(2),W.cc(),W.Yb(3,"td",53),W.qc(4,"safeHtml"),W.dc(5,"td",54),W.dc(6,"div",55),W.Yb(7,"div",56),W.dc(8,"span"),W.cd(9),W.cc(),W.cc(),W.dc(10,"div",55),W.Yb(11,"div",57),W.dc(12,"span"),W.cd(13),W.cc(),W.cc(),W.dc(14,"div",55),W.Yb(15,"div",58),W.dc(16,"span"),W.cd(17),W.cc(),W.cc(),W.dc(18,"div",55),W.Yb(19,"div",59),W.dc(20,"span"),W.cd(21),W.cc(),W.cc(),W.cc(),W.cc()),2&e){var c=t.$implicit,n=t.index,a=W.pc(3);W.Gb(2),W.dd(n+1),W.Gb(1),W.yc("innerHtml",W.rc(4,14,null==c?null:c.question_name),W.Tc),W.Gb(4),W.Zc("width",a.getPercentage(null==c?null:c.correct_ans),"%"),W.Gb(2),W.dd(null==c?null:c.correct_ans),W.Gb(2),W.Zc("width",a.getPercentage(null==c?null:c.wrong_ans),"%"),W.Gb(2),W.dd(null==c?null:c.wrong_ans),W.Gb(2),W.Zc("width",a.getPercentage(null==c?null:c.not_attend_ans),"%"),W.Gb(2),W.dd(null==c?null:c.not_attend_ans),W.Gb(2),W.Zc("width",a.getPercentage(null==c?null:c.partial_ans),"%"),W.Gb(2),W.dd(null==c?null:c.partial_ans)}}function Pr(e,t){if(1&e&&(W.dc(0,"tbody"),W.ad(1,Mr,22,16,"tr",52),W.cc()),2&e){var c=W.pc(2);W.Gb(1),W.yc("ngForOf",c.questions)}}function Qr(e,t){1&e&&(W.dc(0,"tbody",17),W.dc(1,"tr"),W.dc(2,"td",60),W.dc(3,"h5"),W.dc(4,"strong"),W.cd(5,"No data found..."),W.cc(),W.cc(),W.cc(),W.cc(),W.cc())}function Nr(e,t){if(1&e&&(W.dc(0,"mat-card",5),W.dc(1,"div"),W.dc(2,"div",6),W.dc(3,"h3"),W.dc(4,"strong"),W.cd(5),W.cc(),W.cc(),W.dc(6,"div",7),W.dc(7,"div",8),W.dc(8,"h3",9),W.dc(9,"strong"),W.cd(10),W.cc(),W.cc(),W.cc(),W.dc(11,"div",10),W.dc(12,"h4",11),W.cd(13,"Given By"),W.cc(),W.cc(),W.dc(14,"div",12),W.dc(15,"h4",11),W.dc(16,"strong"),W.cd(17),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(18,"div",13),W.dc(19,"div",14),W.dc(20,"h3",11),W.dc(21,"strong"),W.cd(22),W.dc(23,"span"),W.cd(24),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(25,"div",15),W.dc(26,"h4",11),W.cd(27,"Total Student"),W.cc(),W.cc(),W.dc(28,"div",16),W.dc(29,"h4",11),W.dc(30,"strong"),W.cd(31),W.cc(),W.cc(),W.cc(),W.dc(32,"div",15),W.dc(33,"h4",11),W.cd(34," Submitted"),W.cc(),W.cc(),W.dc(35,"div",16),W.dc(36,"h4",11),W.dc(37,"strong"),W.cd(38),W.cc(),W.cc(),W.cc(),W.dc(39,"div",15),W.dc(40,"h4",11),W.cd(41,"Not Submitted"),W.cc(),W.cc(),W.dc(42,"div",16),W.dc(43,"h4",11),W.dc(44,"strong"),W.cd(45),W.cc(),W.cc(),W.cc(),W.dc(46,"div",15),W.dc(47,"h4",11),W.cd(48,"Evaluated"),W.cc(),W.cc(),W.dc(49,"div",16),W.dc(50,"h4",11),W.dc(51,"strong"),W.cd(52),W.cc(),W.cc(),W.cc(),W.dc(53,"div",15),W.dc(54,"h4",11),W.cd(55,"Missed"),W.cc(),W.cc(),W.dc(56,"div",16),W.dc(57,"h4",11),W.dc(58,"strong"),W.cd(59),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(60,"mat-tab-group",17),W.dc(61,"mat-tab",18),W.dc(62,"table",19),W.dc(63,"thead"),W.dc(64,"tr",20),W.dc(65,"th",21),W.cd(66,"Roll No"),W.cc(),W.dc(67,"th",22),W.cd(68,"Admn.No"),W.cc(),W.dc(69,"th",23),W.cd(70,"Student Name"),W.cc(),W.dc(71,"th",24),W.cd(72," status"),W.cc(),W.dc(73,"th",24),W.cd(74,"Action"),W.cc(),W.cc(),W.cc(),W.ad(75,Ir,2,1,"tbody",25),W.ad(76,Sr,6,0,"tbody",26),W.cc(),W.cc(),W.dc(77,"mat-tab",27),W.dc(78,"ul",28),W.dc(79,"li",29),W.dc(80,"div",30),W.Yb(81,"div",31),W.dc(82,"label"),W.cd(83,"Correct"),W.cc(),W.cc(),W.cc(),W.dc(84,"li",29),W.dc(85,"div",30),W.Yb(86,"div",32),W.dc(87,"label"),W.cd(88,"Wrong"),W.cc(),W.cc(),W.cc(),W.dc(89,"li",29),W.dc(90,"div",30),W.Yb(91,"div",33),W.dc(92,"label"),W.cd(93,"Not Answered"),W.cc(),W.cc(),W.cc(),W.dc(94,"li",29),W.dc(95,"div",30),W.Yb(96,"div",34),W.dc(97,"label"),W.cd(98,"Partially Completed"),W.cc(),W.cc(),W.cc(),W.cc(),W.dc(99,"table",35),W.dc(100,"thead"),W.dc(101,"tr"),W.dc(102,"th",36),W.cd(103,"S.No"),W.cc(),W.dc(104,"th",37),W.cd(105,"Question Name"),W.cc(),W.dc(106,"th",38),W.cd(107,"Analytics"),W.cc(),W.cc(),W.cc(),W.ad(108,Pr,2,1,"tbody",25),W.ad(109,Qr,6,0,"tbody",26),W.cc(),W.cc(),W.cc(),W.cc()),2&e){var c=W.pc();W.Gb(5),W.dd(null==c.analysis?null:c.analysis.title),W.Gb(5),W.dd(null==c.analysis?null:c.analysis.subject_name),W.Gb(7),W.dd(null==c.analysis?null:c.analysis.given_by),W.Gb(5),W.ed("",null==c.analysis?null:c.analysis.class_name," ,"),W.Gb(2),W.ed(" ",null==c.analysis?null:c.analysis.section_name,""),W.Gb(7),W.dd(c.totalStudent),W.Gb(7),W.dd(c.doneCount),W.Gb(7),W.dd(c.notDoneCount),W.Gb(7),W.dd(c.evaluatedCount),W.Gb(7),W.dd(c.missedCount),W.Gb(16),W.yc("ngIf",0!=(null==c.analysis?null:null==c.analysis.student_list?null:c.analysis.student_list.length)),W.Gb(1),W.yc("ngIf",0==(null==c.analysis?null:null==c.analysis.student_list?null:c.analysis.student_list.length)),W.Gb(32),W.yc("ngIf",0!=(null==c.questions?null:c.questions.length)),W.Gb(1),W.yc("ngIf",0==(null==c.questions?null:c.questions.length))}}var Ar,Dr=[{path:"",children:[{path:"create",component:Ee,data:{title:"Create Online Exam",breadcrumb:"New"}},{path:"edit/:id",component:qc,data:{title:"Update Online Exam",breadcrumb:"Update"}},{path:"onlineexam-analysis/:hmId/:cId/:sId",component:(Ar=function(){return _createClass((function e(t,c,n,a,i,o){_classCallCheck(this,e),this.dialog=t,this.modelService=c,this.router=n,this.activatedRoute=a,this.toaster=i,this.loader=o,this.panelOpenState=!1,this.onlineexamId=this.activatedRoute.snapshot.params.hmId,this.classId=this.activatedRoute.snapshot.params.cId,this.sectionId=this.activatedRoute.snapshot.params.sId}),[{key:"preview",value:function(e,t){"Evaluated"==t?this.dialog.open(wr,{data:{onlineexamId:this.onlineexamId,studentId:e},disableClose:!0,width:"70%"}).afterClosed().subscribe((function(e){console.log("The dialog was closed")})):Xe.a.fire({icon:"error",title:"Analytics Report",text:"Please select the evaluated online exam!"})}},{key:"ngOnInit",value:function(){this.getAnalysisList(),this.getQuestionList()}},{key:"getAnalysisList",value:function(){var e=this;this.loader.open(),this.modelService.getAnalysisList(this.onlineexamId,this.classId,this.sectionId).subscribe((function(t){var c,n,a,i,o,r,s,l,d,u;"success"==t.keyword?(e.analysis=t.data[0],e.totalStudent=null===(n=null===(c=e.analysis)||void 0===c?void 0:c.student_list)||void 0===n?void 0:n.length,e.doneCount=null===(i=null===(a=e.analysis)||void 0===a?void 0:a.student_list)||void 0===i?void 0:i.filter((function(e){return"Done"==e.status})).length,e.notDoneCount=null===(r=null===(o=e.analysis)||void 0===o?void 0:o.student_list)||void 0===r?void 0:r.filter((function(e){return"Not done"==e.status})).length,e.evaluatedCount=null===(l=null===(s=e.analysis)||void 0===s?void 0:s.student_list)||void 0===l?void 0:l.filter((function(e){return"Evaluated"==e.status})).length,e.missedCount=null===(u=null===(d=e.analysis)||void 0===d?void 0:d.student_list)||void 0===u?void 0:u.filter((function(e){return"Missing"==e.status})).length,console.log(e.analysis,"this.analysis"),e.loader.close(),e.toaster.present(t.message,"")):(e.loader.close(),e.toaster.present(t.message,""))}))}},{key:"getQuestionList",value:function(){var e=this;this.modelService.getQuestionList(this.onlineexamId,this.classId,this.sectionId).subscribe((function(t){"success"==t.keyword&&(e.questions=t.data,console.log(e.questions,"this.questions"))}))}},{key:"getPercentage",value:function(e){return e/this.totalStudent*100}}])}(),Ar.\u0275fac=function(e){return new(e||Ar)(W.Xb(Ke.b),W.Xb(fr),W.Xb(h.g),W.Xb(h.a),W.Xb(ue.a),W.Xb(de.a))},Ar.\u0275cmp=W.Rb({type:Ar,selectors:[["app-view"]],decls:6,vars:2,consts:[["fxLayout","row wrap",1,"pagewrap"],["fxFlex","100","fxFlex.gt-xs","50",1,"pb-8"],[1,"example-button-row","mt-10"],["mat-raised-button","","color","primary",1,"btn-primary-bg",3,"routerLink"],["class","homework-analysis",4,"ngIf"],[1,"homework-analysis"],[1,"text-center","mt-12"],["fxLayout","row wrap",1,"mt-8"],["fxFlex","100","fxFlex.gt-xs","55",1,"text-right"],[1,"f14"],["fxFlex","100","fxFlex.gt-xs","29",1,"text-right"],[1,"mb-0","mt-4"],["fxFlex","100","fxFlex.gt-xs","16"],["fxLayout","row wrap",1,"p-8","grey-100"],["fxFlex","100","fxFlex.gt-xs","10"],["fxFlex","100","fxFlex.gt-xs","12",1,"text-right"],["fxFlex","100","fxFlex.gt-xs","5"],[1,"mt-12"],["label","Student Wise Analytics"],[1,"mat-table","student-analysis","mt-8"],[1,"mat-header-row"],["rowspan","2",1,"mat-header-cell","text-center",2,"width","6%"],["rowspan","2",1,"mat-header-cell","text-center",2,"width","7%"],["rowspan","2",1,"mat-header-cell","pl-12",2,"width","16%","text-align","left"],[1,"mat-header-cell","text-center"],[4,"ngIf"],["class","mt-12",4,"ngIf"],["label","Question Wise Analytics"],[1,"homework-status"],[1,"pr-24"],[2,"display","flex"],[2,"width","10px","height","10px","background","#19cbc3"],[2,"width","10px","height","10px","background","#d32f3e"],[2,"width","10px","height","10px","background","#f8a918"],[2,"width","10px","height","10px","background","#2a699e"],[1,"question-analysis","mt-16"],[2,"width","5%"],[2,"width","80%","text-align","left"],[2,"width","15%"],["class","mat-row",4,"ngFor","ngForOf"],[1,"mat-row"],[1,"mat-cell"],["class","mat-chip mat-darkblue mat-standard-chip ng-tns-c12-751 mat-chip-selected ng-star-inserted",4,"ngIf"],["class","mat-chip mat-marron mat-standard-chip ng-tns-c12-751 mat-chip-selected ng-star-inserted",4,"ngIf"],["class","mat-chip mat-success mat-standard-chip ng-tns-c12-751 mat-chip-selected ng-star-inserted",4,"ngIf"],["class","mat-chip mat-danger mat-standard-chip ng-tns-c12-751 mat-chip-selected ng-star-inserted",4,"ngIf"],["mat-raised-button","","color","primary",1,"btn-white-bg",3,"click"],[1,"mat-chip","mat-darkblue","mat-standard-chip","ng-tns-c12-751","mat-chip-selected","ng-star-inserted"],[1,"mat-chip","mat-marron","mat-standard-chip","ng-tns-c12-751","mat-chip-selected","ng-star-inserted"],[1,"mat-chip","mat-success","mat-standard-chip","ng-tns-c12-751","mat-chip-selected","ng-star-inserted"],[1,"mat-chip","mat-danger","mat-standard-chip","ng-tns-c12-751","mat-chip-selected","ng-star-inserted"],["colspan","5",1,"text-center"],[4,"ngFor","ngForOf"],[1,"pl-12",2,"text-align","left!important",3,"innerHtml"],[1,"pb-8"],[1,"mt-4",2,"display","flex"],[2,"background","#19cbc3","height","17px"],[2,"background","#d32f3e","height","17px"],[2,"background","#f8a918","height","17px"],[2,"background","#2a699e","height","17px"],["colspan","3",1,"text-center"]],template:function(e,t){1&e&&(W.dc(0,"div",0),W.dc(1,"div",1),W.dc(2,"div",2),W.dc(3,"button",3),W.cd(4,"Back"),W.cc(),W.cc(),W.cc(),W.cc(),W.ad(5,Nr,110,14,"mat-card",4)),2&e&&(W.Gb(3),W.yc("routerLink","/teacher/online-exam/list"),W.Gb(2),W.yc("ngIf",t.analysis||t.questions))},directives:[xe.c,xe.a,b.a,h.h,f.o,x.a,_r.b,_r.a,f.n],pipes:[he.h],styles:[".completed-count[_ngcontent-%COMP%]{background:green}.completed-count[_ngcontent-%COMP%], .total-count[_ngcontent-%COMP%]{color:#fff;padding:4px;font-size:13px}.total-count[_ngcontent-%COMP%]{background:#734f96}.mark[_ngcontent-%COMP%]{width:80px;height:80px;border:3px solid rgba(232,86,86,.7294117647058823);border-radius:50%}.mark-details[_ngcontent-%COMP%]{width:75px;height:75px;background:rgba(232,86,86,.7294117647058823);border-radius:50%;border:3px solid #fff;padding-top:19px;color:#fff}.hw-type[_ngcontent-%COMP%]{padding:2px 4px!important;border-radius:0!important;font-size:11px!important;background:#734f96!important;color:#fff!important}th[_ngcontent-%COMP%]{width:10%;color:#000!important;font-weight:600!important;background:hsla(0,0%,50.2%,.30196078431372547)}table[_ngcontent-%COMP%]{line-height:30px;border-color:hsla(0,0%,50.2%,.30196078431372547)}td[_ngcontent-%COMP%]{text-align:center!important;border:1px solid hsla(0,0%,80%,.4588235294117647)!important}th[_ngcontent-%COMP%]{border:1px solid rgba(164,153,153,.4588235294117647)!important}td[_ngcontent-%COMP%]:nth-child(6){background-color:#f5f5f5!important}.mat-header-cell[_ngcontent-%COMP%]{padding-top:4px!important}tr.mat-header-row[_ngcontent-%COMP%]{height:unset!important}table.mat-table[_ngcontent-%COMP%]{border-spacing:0}td[_ngcontent-%COMP%]:nth-child(3){text-align:left!important;padding-left:12px}td[_ngcontent-%COMP%]:nth-child(4), td[_ngcontent-%COMP%]:nth-child(5){background-color:#f5f5f5!important}td[_ngcontent-%COMP%]:nth-child(5){padding-top:5px}td[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{line-height:18px!important;padding:0 7px!important}td[_ngcontent-%COMP%]{line-height:15px}.question-analysis[_ngcontent-%COMP%]{border-spacing:0}.question-analysis[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:12px}.homework-status[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{position:relative;bottom:4px;left:10px}.homework-status[_ngcontent-%COMP%]{list-style:none;display:inline-flex;float:right}.mat-darkblue[_ngcontent-%COMP%]{background:#003c93!important}.mat-darkblue[_ngcontent-%COMP%], .mat-marron[_ngcontent-%COMP%]{padding:4px 5px 3px!important;border-radius:0!important;font-size:11px!important;color:#fff!important;min-height:12px}.mat-marron[_ngcontent-%COMP%]{background:rgba(166,28,29,.7019607843137254)!important}th.mat-header-cell.text-center[_ngcontent-%COMP%]{text-align:center!important}"]}),Ar),data:{title:"Online Exam Analytics",breadcrumb:"Online Exam Analytics"}},{path:"preview/:id",component:Uc,data:{title:"Preview Question",breadcrumb:" Preview"}},{path:"list",component:sc,data:{title:"List of Online Exams",breadcrumb:"List "}},{path:"evaluate/:onlineexamId/:studentId",component:ua,data:{title:"Online Exam Evaluate ",breadcrumb:" Evaluate "}},{path:"view/:id",component:Ec,data:{title:"View ",breadcrumb:"View "}},{path:"student-list/:onlineexamId",component:Ta,data:{title:"Student List",breadcrumb:"Student List"}},{path:"approve/:id",component:nn,data:{title:"Approve",breadcrumb:"Approve"}},{path:"onlineexam-start/:qusGrpId",component:xi,data:{title:"Start",breadcrumb:"New"}},{path:"onlineexam-start/non-objective/:qusGrpId",component:ti,data:{title:"Start",breadcrumb:"New"}},{path:"editonlineexam-start/:questionId",component:Ei,data:{title:"Update Online Exam",breadcrumb:"Update"}},{path:"onlineexam/:id",component:An,data:{title:"Create Online Exam",breadcrumb:"New"}},{path:"onlineexam/question-list/:onlineexamId/:qusGrpId",component:Ii,data:{title:"Create Online Exam",breadcrumb:"Update Question List"}},{path:"favourite/list",component:bo,data:{title:"List of Favourite",breadcrumb:"Favourite / List"}},{path:"favourite/view/:id",component:Fo,data:{title:"View",breadcrumb:"Favourite / View"}},{path:"overall-result/:onlineexamId/:studentId",component:Ro,data:{title:"Online Exam Result",breadcrumb:"Result"}},{path:"result/:onlineexamId/:studentId/:quesGrpId",component:pr,data:{title:"Online Exam Result ",breadcrumb:" Result "}}]}],Tr=c("zMWy");c.d(t,"AppOnlineExamModule",(function(){return Lr}));var jr,Lr=((jr=_createClass((function e(){_classCallCheck(this,e)}))).\u0275mod=W.Vb({type:jr}),jr.\u0275inj=W.Ub({factory:function(e){return new(e||jr)},imports:[[f.c,g.m,gr.b,g.z,_.c,C.c,x.e,k.c,y.n,O.b,F.c,A.b,v.b,S.a,b.b,w.b,q.a,Tr.a,I.a,M.b,z.b,P.a,L.a,Q.a,N.b,G.c,D.c,T.p,j.b,H.a,ke.b,X.a,E.a,Y.b,h.k.forChild(Dr)]]}),jr)}}]);
/var/www/krbed.in/../../www/../www/html/../school_portal_admin/149-es5.4eb3adc0c48bd8d01d2b.js