0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 18.117.254.177


Current Path : /var/www/qpms/assets/
Upload File :
Current File : /var/www/qpms/assets/PrepareQp-tj8mXFmt.js

import{v as p,E as n}from"./index-Dyw5MJqL.js";const y=()=>async(r,e)=>{try{const o=e();let t=localStorage.getItem("dbname");r({type:"SET_LOADER"});const s=await p.get("app.php?a=getPrepareQpDetails&db="+t+"&teachcode="+o.loginfo.userData.fregno);if(r({type:"UNSET_LOADER"}),typeof s.data!="object")n("Error","Something went wrong, Please try again later");else if(s.data.error_code===0){let a=s.data.data.map((l,c)=>({...l,key:c,fslno:c+1}));r({type:"PREPARE_QP_DETAILS",payload:a})}else r({type:"CLEAR_PREPARE_QP_DETAILS",payload:[]})}catch(o){console.log("error",o.message)}},E=r=>async(e,o)=>{try{const t=o();let s=localStorage.getItem("dbname");e({type:"SET_LOADER"});const a=await p.post("app.php?a=getQuestions&db="+s+"&usertype="+t.loginfo.userData.fusertype,r);if(console.log(a),e({type:"UNSET_LOADER"}),typeof a.data!="object")n("Error","Something went wrong, Please try again later");else if(a.data.error_code===0){let l=a.data.data.map((c,d)=>({...c,key:d,fslno:d+1}));e({type:"QUESTION_NOS",payload:l})}else e({type:"CLEAR_QUESTION_NOS",payload:[]})}catch(t){console.log("error",t.message)}},m=r=>async e=>{const o=JSON.parse(r);o.error_code===0?e({type:"QN_FILE_DET",payload:o.data.msg}):e({type:"CLEAR_QN_FILE_DET",payload:[]})},i=r=>async(e,o)=>{try{const t=o();let s=localStorage.getItem("dbname");e({type:"SET_LOADER"});const a=await p.get("app.php?a=getSelectedMCQFinalPapers&db="+s+"&univcode="+t.loginfo.userData.funivcode+"&data="+JSON.stringify(r));if(console.log(a),e({type:"UNSET_LOADER"}),a.data.error_code===0){const l=a.data.data.map((c,d)=>({...c,key:d,fslno:d+1}));e({type:"MCQ_SELECTED_QP_DATA",payload:l})}else e({type:"MCQ_SELECTED_QP_DATA",payload:[]})}catch(t){n("error",t.message)}},_=r=>async(e,o)=>{try{const t=o();let s=localStorage.getItem("dbname");e({type:"SET_LOADER"});const a=await p.get("app.php?a=generateMCQVersions&db="+s+"&univcode="+t.loginfo.userData.funivcode+"&data="+JSON.stringify(r));console.log(a),e({type:"UNSET_LOADER"}),a.data.error_code===0?n("success",a.data.data.msg):n("info",a.data.data.msg)}catch(t){n("error",t.message)}},S=r=>async(e,o)=>{try{const t=o();let s=localStorage.getItem("dbname");e({type:"SET_LOADER"});const a=await p.post("app.php?a=deleteThQpFile&db="+s+"&univcode="+t.loginfo.userData.funivcode,r);console.log(a),e({type:"UNSET_LOADER"}),a.data.error_code===0?n("success",a.data.data.msg):n("info",a.data.data.msg)}catch(t){n("error",t.message)}},f=(r,e)=>async(o,t)=>{try{const s=t();let a=localStorage.getItem("dbname");o({type:"SET_LOADER"});const l=await p.post("app.php?a=saveTeachConfirm&db="+a+"&univcode="+s.loginfo.userData.funivcode,r);o({type:"UNSET_LOADER"}),e(),console.log(l)}catch(s){n("error",s.message)}};export{E as a,i as b,_ as c,S as d,y as g,f as s,m as u};