Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2022-158
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2022-158
2022-158
Commits
22723f4e
Commit
22723f4e
authored
Nov 15, 2022
by
Jayasith H.B.C
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 'IT19079264'
Master See merge request
!123
parents
4ff3e47c
6c8ea0b8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
48 deletions
+46
-48
backend/submissions/class/research_classes-Page-1.jpg
backend/submissions/class/research_classes-Page-1.jpg
+0
-0
frontend/src/helpers/sidebar.items.js
frontend/src/helpers/sidebar.items.js
+1
-1
frontend/src/pages/StudentDashboard.js
frontend/src/pages/StudentDashboard.js
+22
-30
frontend/src/pages/SubjectsStudent.js
frontend/src/pages/SubjectsStudent.js
+23
-17
No files found.
backend/submissions/class/research_classes-Page-1.jpg
deleted
100644 → 0
View file @
4ff3e47c
65.6 KB
frontend/src/helpers/sidebar.items.js
View file @
22723f4e
...
...
@@ -33,7 +33,7 @@ const sidebar_student = [
icon
:
"
bx bx-category-alt
"
,
},
{
display_name
:
"
Module
s
"
,
display_name
:
"
Assignment
s
"
,
route
:
"
/auth/student/modules
"
,
icon
:
"
bx bx-bar-chart-square
"
,
},
...
...
frontend/src/pages/StudentDashboard.js
View file @
22723f4e
...
...
@@ -24,50 +24,42 @@ const StudentDashboard = () => {
const
[
StudentSubjects
,
setStudentSubjects
]
=
useState
([]);
const
[
value
,
onChange
]
=
useState
(
new
Date
());
const
fields
=
[
""
,
"
Assignment
"
,
"
Subject
"
,
"
Subject Code
"
];
const
subjects
=
[
{
ModuleCode
:
"
IT20300
"
,
ModuleName
:
"
CTSE
"
,
assign
:
"
Assignment 01
"
},
{
ModuleCode
:
"
IT30300
"
,
ModuleName
:
"
DMS
"
,
assign
:
"
Assignment 02
"
},
{
ModuleCode
:
"
IT40300
"
,
ModuleName
:
"
SPM
"
,
assign
:
"
Assignment 03
"
},
const
fields
=
[
""
,
"
ID
"
,
"
Module Code
"
,
"
Module Name
"
,
"
Assignment Type
"
,
"
Title
"
,
"
Start At
"
,
"
End At
"
,
"
Actions
"
,
];
const
renderOrderHead
=
(
item
,
index
)
=>
<
th
key
=
{
index
}
>
{
item
}
<
/th>
;
const
renderOrderBody
=
(
item
,
index
)
=>
(
<
tr
key
=
{
index
}
>
<
td
>
{}
<
/td
>
<
td
>
{
item
.
assign
}
<
/td
>
<
td
>
{
item
.
ModuleName
}
<
/td
>
<
td
>
{
item
.
ModuleCode
}
<
/td
>
<
td
>
<
div
className
=
"
row-user
"
style
=
{{
paddingTop
:
"
0
"
}}
>
{
item
.
DeliveryStatus
===
"
pending
"
?
(
<
Badge
type
=
"
warning
"
content
=
{
item
.
DeliveryStatus
}
/
>
)
:
item
.
DeliveryStatus
===
"
preparing
"
?
(
<
Badge
type
=
"
primary
"
content
=
{
item
.
DeliveryStatus
}
/
>
)
:
item
.
DeliveryStatus
===
"
delivering
"
?
(
<
Badge
type
=
"
success
"
content
=
{
item
.
DeliveryStatus
}
/
>
)
:
item
.
DeliveryStatus
===
"
delivered
"
?
(
<
Badge
type
=
"
success
"
content
=
{
item
.
DeliveryStatus
}
/
>
)
:
item
.
DeliveryStatus
===
"
submitted
"
?
(
<
Badge
type
=
"
normal
"
content
=
{
item
.
DeliveryStatus
}
/
>
)
:
(
""
)}
<
/div
>
<
/td
>
<
td
>
{
index
+
1
}
<
/td
>
<
td
>
{
item
.
id
}
<
/td
>
<
td
>
{
item
.
code
}
<
/td
>
<
td
>
{
item
.
name
}
<
/td
>
<
td
>
{
item
.
assignment_type
}
<
/td
>
<
td
>
{
item
.
title
}
<
/td
>
<
td
>
{
new
Date
(
item
.
start_at
).
toLocaleString
()}
<
/td
>
<
td
>
{
new
Date
(
item
.
end_at
).
toLocaleString
()}
<
/td
>
<
/tr
>
);
const
getAllSubjects
=
async
()
=>
{
try
{
const
res
=
await
axios
.
get
(
"
/subjects
"
);
setStudentSubjects
(
subjec
ts
);
const
res
=
await
axios
.
get
(
`assignments`
);
setStudentSubjects
(
res
.
data
.
assignmen
ts
);
setIsLoading
(
false
);
}
catch
(
err
)
{
console
.
log
(
err
.
response
);
}
};
useEffect
(()
=>
getAllSubjects
(),
[]);
return
(
...
...
@@ -142,7 +134,7 @@ const StudentDashboard = () => {
limit
=
"
5
"
headData
=
{
fields
}
renderHead
=
{(
item
,
index
)
=>
renderOrderHead
(
item
,
index
)}
bodyData
=
{
s
ubjects
}
bodyData
=
{
StudentS
ubjects
}
renderBody
=
{(
item
,
index
)
=>
renderOrderBody
(
item
,
index
)}
/
>
{
/* ) : (
...
...
frontend/src/pages/SubjectsStudent.js
View file @
22723f4e
...
...
@@ -14,24 +14,30 @@ import "../assets/css/Usercreate.css";
const
SubjectsStudent
=
()
=>
{
const
[
error
,
setError
]
=
useState
(
""
);
const
[
isLoading
,
setIsLoading
]
=
useState
(
true
);
const
[
SudentSubjects
,
setSudentSubjects
]
=
useState
([]);
const
fields
=
[
""
,
"
Module Code
"
,
"
Module Name
"
,
"
Year
"
,
""
,
"
Actions
"
];
const
subjects
=
[
{
ModuleCode
:
"
IT20300
"
,
ModuleName
:
"
CTSE
"
,
Year
:
"
4th Year
"
},
{
ModuleCode
:
"
IT30300
"
,
ModuleName
:
"
DMS
"
,
Year
:
"
4th Year
"
},
{
ModuleCode
:
"
IT40300
"
,
ModuleName
:
"
SPM:
"
,
Year
:
"
4th Year
"
},
const
[
StudentSubjects
,
setStudentSubjects
]
=
useState
([]);
const
fields
=
[
""
,
"
ID
"
,
"
Module Code
"
,
"
Module Name
"
,
"
Assignment Type
"
,
"
Title
"
,
"
Start At
"
,
"
End At
"
,
"
Actions
"
,
];
const
renderOrderHead
=
(
item
,
index
)
=>
<
th
key
=
{
index
}
>
{
item
}
<
/th>
;
const
renderOrderBody
=
(
item
,
index
)
=>
(
<
tr
key
=
{
index
}
>
<
td
>
{}
<
/td
>
<
td
>
{
item
.
ModuleC
ode
}
<
/td
>
<
td
>
{
item
.
ModuleN
ame
}
<
/td
>
<
td
>
{
item
.
Year
}
<
/td
>
<
td
>
{}
<
/td
>
<
td
>
{
item
.
id
}
<
/td
>
<
td
>
{
item
.
c
ode
}
<
/td
>
<
td
>
{
item
.
n
ame
}
<
/td
>
<
td
>
{
item
.
assignment_type
}
<
/td
>
<
td
>
{
item
.
title
}
<
/td
>
<
td
>
<
Link
to
=
{
`/auth/student/assignment`
}
>
<
Link
to
=
{
`/auth/student/assignment
/
${
item
.
id
}
`
}
>
<
button
className
=
"
view-btn
"
>
View
<
/button
>
<
/Link
>
<
/td
>
...
...
@@ -40,8 +46,8 @@ const SubjectsStudent = () => {
const
getAllSubjects
=
async
()
=>
{
try
{
const
res
=
await
axios
.
get
(
"
/subjects
"
);
setS
udentSubjects
(
res
.
data
.
order
s
);
const
res
=
await
axios
.
get
(
`assignments`
);
setS
tudentSubjects
(
res
.
data
.
assignment
s
);
setIsLoading
(
false
);
}
catch
(
err
)
{
console
.
log
(
err
.
response
);
...
...
@@ -56,9 +62,9 @@ const SubjectsStudent = () => {
<
div
id
=
"
main
"
className
=
"
layout__content
"
>
<
TopNav
/>
<
div
className
=
"
layout__content-main
"
>
<
h1
className
=
"
page-header
"
>
All
Module
s
<
/h1
>
<
h1
className
=
"
page-header
"
>
All
Assignment
s
<
/h1
>
<
div
className
=
"
card
"
>
<
h2
>
Subjects
You
Enrolled
<
/h2
>
<
h2
>
Assignments
you
have
to
complete
<
/h2
>
{
/* {isLoading ? (
<Spinner />
) : orderDetails.length > 0 ? ( */
}
...
...
@@ -66,7 +72,7 @@ const SubjectsStudent = () => {
limit
=
"
5
"
headData
=
{
fields
}
renderHead
=
{(
item
,
index
)
=>
renderOrderHead
(
item
,
index
)}
bodyData
=
{
s
ubjects
}
bodyData
=
{
StudentS
ubjects
}
renderBody
=
{(
item
,
index
)
=>
renderOrderBody
(
item
,
index
)}
/
>
{
/* ) : (
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment