Linux websever 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64
Apache/2.4.52 (Ubuntu)
: 192.168.3.70 | : 192.168.1.99
Cant Read [ /etc/named.conf ]
8.1.2-1ubuntu2.23
urlab
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
html /
coursewise /
assets /
[ HOME SHELL ]
Name
Size
Permission
Action
AcademicTools-tj30wEj0.js
7.55
KB
-rwxr-xr-x
AcademicTools-tj30wEj0.js.map
14.63
KB
-rwxr-xr-x
AddCourse-BTNu-pnI.js
10.08
KB
-rwxr-xr-x
AddCourse-BTNu-pnI.js.map
35.84
KB
-rwxr-xr-x
AdminFeedbackManagement-DsTd1C...
13.52
KB
-rwxr-xr-x
AdminFeedbackManagement-DsTd1C...
45.25
KB
-rwxr-xr-x
CourseReviews-CLlzbLuT.js
27.45
KB
-rwxr-xr-x
CourseReviews-CLlzbLuT.js.map
112.09
KB
-rwxr-xr-x
Dewan-B5d13VSK.png
819.07
KB
-rwxr-xr-x
Dewan-Bniqtmij.js
102
B
-rwxr-xr-x
Dewan-Bniqtmij.js.map
197
B
-rwxr-xr-x
EditCourse-DeWQqcol.js
9.65
KB
-rwxr-xr-x
EditCourse-DeWQqcol.js.map
34.87
KB
-rwxr-xr-x
MyCourses-BA9wctPB.js
8.48
KB
-rwxr-xr-x
MyCourses-BA9wctPB.js.map
31.95
KB
-rwxr-xr-x
Rajput-BnxWGXCy.js
104
B
-rwxr-xr-x
Rajput-BnxWGXCy.js.map
200
B
-rwxr-xr-x
Rajput-CE3gMniE.png
908.11
KB
-rwxr-xr-x
Settings-BGf6-NRc.js
2.09
KB
-rwxr-xr-x
Settings-BGf6-NRc.js.map
5.35
KB
-rwxr-xr-x
TimetableClashChecker-gskbNvYE...
32.74
KB
-rwxr-xr-x
TimetableClashChecker-gskbNvYE...
137.78
KB
-rwxr-xr-x
UserManagement-pl4YxOXe.js
2.17
KB
-rwxr-xr-x
UserManagement-pl4YxOXe.js.map
5.49
KB
-rwxr-xr-x
academic-components-DF0R8Z3x.j...
670.84
KB
-rwxr-xr-x
academic-components-DF0R8Z3x.j...
1.87
MB
-rwxr-xr-x
admin-components-DUStTukf.js
1.36
MB
-rwxr-xr-x
admin-components-DUStTukf.js.m...
5.5
MB
-rwxr-xr-x
apple-touch-icon-CvbJoadU.png
20.94
KB
-rwxr-xr-x
browser-DyVnc2OH.js
392
B
-rwxr-xr-x
browser-DyVnc2OH.js.map
404
B
-rwxr-xr-x
favicon-16x16-CXk8OJVQ.png
734
B
-rwxr-xr-x
favicon-32x32-BMg2Kocu.png
1.78
KB
-rwxr-xr-x
favicon-hhFM0i7Z.ico
15.04
KB
-rwxr-xr-x
geminiService-khxcBfs7.js
2.36
KB
-rwxr-xr-x
geminiService-khxcBfs7.js.map
6.73
KB
-rwxr-xr-x
index-BbxTXAhJ.css
45.32
KB
-rwxr-xr-x
index-DN1SJQ1D.js
73.27
KB
-rwxr-xr-x
index-DN1SJQ1D.js.map
215.58
KB
-rwxr-xr-x
index.es-B3idowhG.js
155.35
KB
-rwxr-xr-x
index.es-B3idowhG.js.map
624.87
KB
-rwxr-xr-x
kunal-UYflGF6w.jpg
9.22
MB
-rwxr-xr-x
kunal-ozIpZZVI.js
102
B
-rwxr-xr-x
kunal-ozIpZZVI.js.map
197
B
-rwxr-xr-x
pdf-vendor-Bz5wMm03.js
317.87
KB
-rwxr-xr-x
pdf-vendor-Bz5wMm03.js.map
976.2
KB
-rwxr-xr-x
purify.es-CQJ0hv7W.js
21.35
KB
-rwxr-xr-x
purify.es-CQJ0hv7W.js.map
88.01
KB
-rwxr-xr-x
react-vendor-BFYHlx6n.js
160.29
KB
-rwxr-xr-x
react-vendor-BFYHlx6n.js.map
687.16
KB
-rwxr-xr-x
sarthak-CfXTejkX.png
764.15
KB
-rwxr-xr-x
sarthak-Cq6ZcrGb.js
106
B
-rwxr-xr-x
sarthak-Cq6ZcrGb.js.map
203
B
-rwxr-xr-x
site-BwHFeIBa.webmanifest
263
B
-rwxr-xr-x
supabase-vendor-DtZyL83W.js
105.45
KB
-rwxr-xr-x
supabase-vendor-DtZyL83W.js.ma...
449.41
KB
-rwxr-xr-x
ui-vendor-DSJ4jbeb.js
44.26
KB
-rwxr-xr-x
ui-vendor-DSJ4jbeb.js.map
190.96
KB
-rwxr-xr-x
useToast-Bg1woyD1.js
414
B
-rwxr-xr-x
useToast-Bg1woyD1.js.map
1.83
KB
-rwxr-xr-x
xlsx-vendor-D_ykzFJ-.js
276.48
KB
-rwxr-xr-x
xlsx-vendor-D_ykzFJ-.js.map
1.37
MB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : EditCourse-DeWQqcol.js
import{u as ae,e as ne,s as u,j as e,B as R,T as F,V as b,L as _,H as oe,a as y,aN as de,G as P,b as c,c as n,d as o,I as p,aC as B,aD as M,aO as O,aP as z,aQ as G,S as L,av as ce,aE as v,aF as w,k as le}from"./admin-components-DUStTukf.js";import{j as ue,u as me,r as h}from"./react-vendor-BFYHlx6n.js";import"./supabase-vendor-DtZyL83W.js";import"./pdf-vendor-Bz5wMm03.js";import"./xlsx-vendor-D_ykzFJ-.js";import"./ui-vendor-DSJ4jbeb.js";const _e=()=>{const{id:S}=ue(),E=me(),m=ae(),[W,H]=h.useState(!0),[J,I]=h.useState(!1),V=ne("purple.200","gray.600"),[U,Y]=h.useState([]),[i,d]=h.useState({uuid:"",course_code:"",course_name:"",credits:0,dept_acronym:"",department:"",semester:1,description:"",professor_allocated:"",prerequisites:[],antirequisites:[],schedule:[]}),[g,T]=h.useState(""),[C,A]=h.useState(""),[x,q]=h.useState({day:"Monday",start_time:"09:00",end_time:"10:30"});h.useEffect(()=>{Q(),K()},[S]);const Q=async()=>{try{const{data:{session:s},error:r}=await u.auth.getSession();if(r||!s){m({title:"Authentication Error",description:"Please login as admin first",status:"error",duration:5e3,isClosable:!0});return}const{data:t,error:a}=await u.from("courses_iiitd").select("*").eq("uuid",S).single();if(a)throw a;const{data:j,error:l}=await u.from("users").select("id").eq("id",s.user.id).single();if(!l&&t.created_by&&t.created_by!==s.user.id){m({title:"Access Denied",description:"You can only edit courses that you created",status:"error",duration:5e3,isClosable:!0}),E("/admin/courses/my-courses");return}let k="";if(t.dept_acronym){const{data:D,error:ie}=await u.from("departments_iiitd").select("dept_name").eq("dept_acronym",t.dept_acronym).single();!ie&&D&&(k=D.dept_name)}d({uuid:t.uuid,course_code:t.course_code,course_name:t.course_name,credits:t.credits,dept_acronym:t.dept_acronym,department:k,semester:t.semester||1,description:t.description||"",professor_allocated:t.professor_allocated||"",prerequisites:t.prerequisites?t.prerequisites.split("/").filter(Boolean):[],antirequisites:t.antirequisites?t.antirequisites.split("/").filter(Boolean):[],schedule:t.schedule?JSON.parse(t.schedule):[]})}catch(s){console.error("Error fetching course:",s),m({title:"Error",description:"Failed to fetch course details",status:"error",duration:5e3,isClosable:!0})}finally{H(!1)}},K=async()=>{try{const{data:s,error:r}=await u.from("departments_iiitd").select("uuid, dept_name, dept_acronym").order("dept_name");if(r)throw r;const t=s?.map(a=>({id:a.uuid,name:a.dept_name,acronym:a.dept_acronym}))||[];Y(t)}catch(s){console.error("Error fetching streams:",s),m({title:"Error",description:"Failed to fetch streams",status:"error",duration:5e3,isClosable:!0})}},f=async s=>{const{name:r,value:t}=s.target;if(d(a=>({...a,[r]:t})),r==="dept_acronym"&&t)try{const{data:a,error:j}=await u.from("departments_iiitd").select("dept_name").eq("dept_acronym",t).single();!j&&a&&d(l=>({...l,department:a.dept_name}))}catch(a){console.error("Error fetching department name:",a)}},N=(s,r)=>{d(t=>({...t,[s]:parseInt(r)}))},X=()=>{g&&!i.prerequisites.includes(g)&&(d(s=>({...s,prerequisites:[...s.prerequisites,g]})),T(""))},Z=s=>{d(r=>({...r,prerequisites:r.prerequisites.filter(t=>t!==s)}))},$=()=>{C&&!i.antirequisites.includes(C)&&(d(s=>({...s,antirequisites:[...s.antirequisites,C]})),A(""))},ee=s=>{d(r=>({...r,antirequisites:r.antirequisites.filter(t=>t!==s)}))},se=()=>{i.schedule.some(r=>r.day===x.day&&r.start_time===x.start_time&&r.end_time===x.end_time)||d(r=>({...r,schedule:[...r.schedule,{...x}].sort((t,a)=>{const j=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];return j.indexOf(t.day)-j.indexOf(a.day)||t.start_time.localeCompare(a.start_time)})})),q({day:"Monday",start_time:"09:00",end_time:"10:30"})},re=s=>{d(r=>({...r,schedule:r.schedule.filter((t,a)=>a!==s)}))},te=async s=>{s.preventDefault(),I(!0);try{const{data:{session:r},error:t}=await u.auth.getSession();if(t||!r){m({title:"Authentication Error",description:"Please login as admin first",status:"error",duration:5e3,isClosable:!0});return}const{error:a}=await u.from("users").select("id").eq("id",r.user.id).single(),j={course_code:i.course_code,course_acronym:i.course_code,course_name:i.course_name,dept_acronym:i.dept_acronym,description:i.description,credits:i.credits,semester:i.semester,prerequisites:i.prerequisites.length===0?null:i.prerequisites.join("/"),antirequisites:i.antirequisites.length===0?null:i.antirequisites.join("/"),professor_allocated:i.professor_allocated,schedule:i.schedule.length===0?null:JSON.stringify(i.schedule),...a?{}:{updated_by:r.user.id}},{error:l}=await u.from("courses_iiitd").update(j).eq("uuid",S);if(l)throw l.code==="23503"&&l.message.includes("courses_updated_by_fkey")&&m({title:"Admin User Setup Required",description:"Your admin account needs to be added to the users table first. Please run the admin_user_creation.sql script.",status:"error",duration:8e3,isClosable:!0}),l;m({title:"Course updated successfully",status:"success",duration:3e3,isClosable:!0}),E("/admin/courses/my-courses")}catch(r){console.error("Error:",r),r?.code==="23503"&&r?.message?.includes("courses_updated_by_fkey")||m({title:"Error",description:"Failed to update course",status:"error",duration:5e3,isClosable:!0})}finally{I(!1)}};return W?e.jsx(R,{p:8,maxWidth:"800px",mx:"auto",children:e.jsx(F,{children:"Loading..."})}):e.jsx(R,{p:8,maxWidth:"800px",mx:"auto",bgGradient:"linear(to-br, purple.50, blue.50)",children:e.jsxs(b,{spacing:8,align:"stretch",bg:"white",p:8,borderRadius:"xl",boxShadow:"lg",border:"1px",borderColor:V,children:[e.jsxs(_,{justify:"space-between",align:"center",children:[e.jsx(oe,{size:"lg",bgGradient:"linear(to-r, blue.400, purple.500)",bgClip:"text",children:"Edit Course"}),e.jsx(y,{as:"a",href:"/admin/courses/my-courses",colorScheme:"gray",leftIcon:e.jsx(de,{}),children:"Back to My Courses"})]}),e.jsx("form",{onSubmit:te,children:e.jsxs(b,{spacing:6,children:[e.jsx(P,{templateColumns:"repeat(2, 1fr)",gap:6,width:"100%",children:e.jsx(c,{children:e.jsxs(n,{isRequired:!0,children:[e.jsx(o,{children:"Course Code"}),e.jsx(p,{name:"course_code",value:i.course_code,onChange:f,placeholder:"e.g., CS101"})]})})}),e.jsx(c,{children:e.jsxs(n,{isRequired:!0,children:[e.jsx(o,{children:"Course Name"}),e.jsx(p,{name:"course_name",value:i.course_name,onChange:f,placeholder:"e.g., Introduction to Computer Science"})]})}),e.jsx(c,{children:e.jsxs(n,{isRequired:!0,children:[e.jsx(o,{children:"Credits"}),e.jsxs(B,{min:1,max:6,value:i.credits,onChange:s=>N("credits",s),children:[e.jsx(M,{}),e.jsxs(O,{children:[e.jsx(z,{}),e.jsx(G,{})]})]})]})}),e.jsx(c,{children:e.jsxs(n,{isRequired:!0,children:[e.jsx(o,{children:"Department"}),e.jsxs(L,{name:"dept_acronym",value:i.dept_acronym,onChange:f,children:[e.jsx("option",{value:"",children:"Select a department"}),U.map(s=>e.jsx("option",{value:s.acronym,children:s.name},s.id))]})]})}),e.jsx(c,{children:e.jsxs(n,{children:[e.jsx(o,{children:"Department Name"}),e.jsx(p,{name:"department",value:i.department||"",onChange:f,isReadOnly:!0,placeholder:"Auto-populated from department acronym"})]})}),e.jsx(c,{children:e.jsxs(n,{isRequired:!0,children:[e.jsx(o,{children:"Semester"}),e.jsxs(B,{min:1,max:8,value:i.semester,onChange:s=>N("semester",s),children:[e.jsx(M,{}),e.jsxs(O,{children:[e.jsx(z,{}),e.jsx(G,{})]})]})]})}),e.jsx(c,{children:e.jsxs(n,{isRequired:!0,children:[e.jsx(o,{children:"Professor Allocated"}),e.jsx(p,{name:"professor_allocated",value:i.professor_allocated,onChange:f,placeholder:"e.g., Dr. John Doe"})]})}),e.jsxs(n,{isRequired:!0,children:[e.jsx(o,{children:"Description"}),e.jsx(ce,{name:"description",value:i.description,onChange:f,placeholder:"Enter course description",rows:4})]}),e.jsxs(n,{children:[e.jsx(o,{children:"Prerequisites"}),e.jsxs(_,{children:[e.jsx(p,{value:g,onChange:s=>T(s.target.value),placeholder:"Enter course code"}),e.jsx(y,{onClick:X,leftIcon:e.jsx(v,{}),children:"Add"})]}),e.jsx(_,{wrap:"wrap",mt:2,spacing:2,children:i.prerequisites.map(s=>e.jsx(y,{size:"sm",rightIcon:e.jsx(w,{}),onClick:()=>Z(s),children:s},s))})]}),e.jsxs(n,{children:[e.jsx(o,{children:"Anti-requisites"}),e.jsxs(_,{children:[e.jsx(p,{value:C,onChange:s=>A(s.target.value),placeholder:"Enter course code"}),e.jsx(y,{onClick:$,leftIcon:e.jsx(v,{}),children:"Add"})]}),e.jsx(_,{wrap:"wrap",mt:2,spacing:2,children:i.antirequisites.map(s=>e.jsx(y,{size:"sm",rightIcon:e.jsx(w,{}),onClick:()=>ee(s),children:s},s))})]}),e.jsxs(n,{children:[e.jsx(o,{children:"Schedule"}),e.jsxs(P,{templateColumns:"repeat(3, 1fr)",gap:4,children:[e.jsx(c,{children:e.jsxs(L,{value:x.day,onChange:s=>q(r=>({...r,day:s.target.value})),children:[e.jsx("option",{value:"Monday",children:"Monday"}),e.jsx("option",{value:"Tuesday",children:"Tuesday"}),e.jsx("option",{value:"Wednesday",children:"Wednesday"}),e.jsx("option",{value:"Thursday",children:"Thursday"}),e.jsx("option",{value:"Friday",children:"Friday"}),e.jsx("option",{value:"Saturday",children:"Saturday"})]})}),e.jsx(c,{children:e.jsx(p,{type:"time",value:x.start_time,onChange:s=>{const t=s.target.value.split(":").slice(0,2).join(":");q(a=>({...a,start_time:t}))},step:"60"})}),e.jsx(c,{children:e.jsx(p,{type:"time",value:x.end_time,onChange:s=>{const t=s.target.value.split(":").slice(0,2).join(":");q(a=>({...a,end_time:t}))},step:"60"})})]}),e.jsx(y,{onClick:se,mt:4,leftIcon:e.jsx(v,{}),children:"Add Time Slot"}),e.jsx(b,{align:"stretch",mt:4,spacing:2,children:i.schedule.map((s,r)=>e.jsxs(_,{justify:"space-between",children:[e.jsxs(F,{children:[s.day," - ",s.start_time," to ",s.end_time]}),e.jsx(le,{"aria-label":"Remove time slot",icon:e.jsx(w,{}),size:"sm",onClick:()=>re(r),colorScheme:"red"})]},r))})]}),e.jsx(y,{type:"submit",colorScheme:"purple",width:"100%",size:"lg",isLoading:J,children:"Update Course"})]})})]})})};export{_e as default}; //# sourceMappingURL=EditCourse-DeWQqcol.js.map
Close