Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2021-049
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
0
Merge Requests
0
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
2021-049
2021-049
Commits
338bc956
Commit
338bc956
authored
Oct 13, 2021
by
Gihan76
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Student performance details adding done
parent
a3a0d659
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
322 additions
and
35 deletions
+322
-35
BackEnd/WebBackEnd/server.js
BackEnd/WebBackEnd/server.js
+2
-0
WebFrontEnd/smartcoach-frontend/src/Components/Admin/Dashboard.js
...End/smartcoach-frontend/src/Components/Admin/Dashboard.js
+8
-0
WebFrontEnd/smartcoach-frontend/src/Components/Admin/add_stud_perf_details.js
...ch-frontend/src/Components/Admin/add_stud_perf_details.js
+181
-0
WebFrontEnd/smartcoach-frontend/src/Components/Admin/analytics.js
...End/smartcoach-frontend/src/Components/Admin/analytics.js
+131
-35
No files found.
BackEnd/WebBackEnd/server.js
View file @
338bc956
...
...
@@ -32,6 +32,7 @@ const studentResult = require('./routes/studentALResult.route');
const
tutorRating
=
require
(
'
./routes/tutorRatings.route
'
);
const
filteredList
=
require
(
'
./routes/filteredListNew.route
'
);
const
createClassRoute
=
require
(
'
./routes/createClass.route
'
);
const
studPerRoute
=
require
(
'
./routes/studper.route
'
);
app
.
use
(
'
/studentSingUp
'
,
studentRouter
);
app
.
use
(
'
/tutorSingUp
'
,
tutorRouter
);
...
...
@@ -43,6 +44,7 @@ app.use('/studentResults', studentResult);
app
.
use
(
'
/tutorRatings
'
,
tutorRating
);
app
.
use
(
'
/filteredList
'
,
filteredList
);
app
.
use
(
'
/createClass
'
,
createClassRoute
);
app
.
use
(
'
/admin/studper
'
,
studPerRoute
);
app
.
listen
(
port
,
()
=>
{
console
.
log
(
`Server is running on Port:
${
port
}
`
);
...
...
WebFrontEnd/smartcoach-frontend/src/Components/Admin/Dashboard.js
View file @
338bc956
...
...
@@ -8,6 +8,7 @@ import EditFinance from './edit_financial_details';
import
AddClass
from
'
./add_class_details
'
;
import
Analytics
from
"
./analytics
"
;
import
studentRequest
from
'
./StudentRequestForClass
'
;
import
AddStudPer
from
'
./add_stud_perf_details
'
;
export
default
class
Dashboard
extends
Component
{
render
()
{
...
...
@@ -393,6 +394,12 @@ export default class Dashboard extends Component {
Progress
<
/a
>
<
/li
>
<
li
>
<
NavLink
activeClassName
=
'
mm-active
'
to
=
{
"
/admin/studper/add/
"
}
>
<
i
className
=
"
metismenu-icon
"
><
/i
>
Add
Progress
Details
<
/NavLink
>
<
/li
>
<
/ul
>
<
/li
>
...
...
@@ -456,6 +463,7 @@ export default class Dashboard extends Component {
<
Route
path
=
{
"
/admin/finance/edit/:id
"
}
exact
component
=
{
EditFinance
}
/
>
<
Route
path
=
"
/admin/classes/add
"
exact
component
=
{
AddClass
}
/
>
<
Route
path
=
"
/admin/classes/studentRequests
"
exact
component
=
{
studentRequest
}
/
>
<
Route
path
=
"
/admin/studper/add
"
exact
component
=
{
AddStudPer
}
/
>
<
/div
>
{
/* Footer */
}
...
...
WebFrontEnd/smartcoach-frontend/src/Components/Admin/add_stud_perf_details.js
0 → 100644
View file @
338bc956
import
React
,
{
Component
}
from
"
react
"
;
import
axios
from
"
axios
"
;
export
default
class
AddPerformanceDetails
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
student_id
:
''
,
sex
:
''
,
study_time
:
''
,
activities
:
''
,
internet
:
''
,
free_time
:
''
,
absences
:
''
,
g1
:
''
,
g2
:
''
};
}
onChangeHandler
=
e
=>
{
this
.
setState
({
[
e
.
target
.
name
]:
e
.
target
.
value
})
}
onSubmitHandler
=
e
=>
{
e
.
preventDefault
();
const
studPerfDetails
=
{
student_id
:
this
.
state
.
student_id
,
sex
:
this
.
state
.
sex
,
study_time
:
this
.
state
.
study_time
,
activities
:
this
.
state
.
activities
,
internet
:
this
.
state
.
internet
,
free_time
:
this
.
state
.
free_time
,
absences
:
this
.
state
.
absences
,
g1
:
this
.
state
.
g1
,
g2
:
this
.
state
.
g2
}
console
.
log
(
`Form submitted:`
);
console
.
log
(
`std_id:
${
this
.
state
.
student_id
}
`
);
console
.
log
(
`sex:
${
this
.
state
.
sex
}
`
);
console
.
log
(
`study_time:
${
this
.
state
.
study_time
}
`
);
console
.
log
(
`activities:
${
this
.
state
.
activities
}
`
);
console
.
log
(
`internet:
${
this
.
state
.
internet
}
`
);
console
.
log
(
`free_time:
${
this
.
state
.
free_time
}
`
);
console
.
log
(
`absences:
${
this
.
state
.
absences
}
`
);
console
.
log
(
`G1:
${
this
.
state
.
g1
}
`
);
console
.
log
(
`G2:
${
this
.
state
.
g2
}
`
);
axios
.
post
(
'
http://localhost:5000/admin/studper/store
'
,
studPerfDetails
)
.
then
(
res
=>
console
.
log
(
res
.
data
));
e
.
target
.
reset
();
}
render
()
{
return
(
<
div
>
<
div
className
=
"
app-page-title
"
>
<
div
className
=
"
page-title-wrapper
"
>
<
div
className
=
"
page-title-heading
"
>
<
div
className
=
"
page-title-icon
"
>
<
i
className
=
"
pe-7s-display1 fa fa-line-chart
"
><
/i
>
<
/div
>
<
div
>
Add
Student
Performance
Details
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"
main-card mb-3 card
"
>
<
div
className
=
"
card-body
"
>
<
form
onSubmit
=
{
this
.
onSubmitHandler
}
>
<
div
className
=
"
position-relative row form-group
"
>
<
label
htmlFor
=
"
stdId
"
className
=
"
col-sm-2 col-form-label
"
>
Student
ID
<
/label
>
<
div
className
=
"
col-sm-3
"
>
<
input
type
=
"
text
"
name
=
"
student_id
"
id
=
"
stdId
"
className
=
"
form-control
"
onChange
=
{
this
.
onChangeHandler
}
required
/>
<
/div
>
<
label
>
Student
id
of
the
student
<
/label
>
<
/div
>
<
div
className
=
"
position-relative row form-group
"
>
<
label
htmlFor
=
"
sex
"
className
=
"
col-sm-2 col-form-label
"
>
Sex
<
/label
>
<
div
className
=
"
col-sm-3
"
>
<
select
defaultValue
=
""
className
=
"
form-control
"
name
=
"
sex
"
onChange
=
{
this
.
onChangeHandler
}
>
<
option
disabled
=
{
true
}
value
=
""
>
Select
<
/option
>
<
option
value
=
"
1
"
>
Male
<
/option
>
<
option
value
=
"
0
"
>
Female
<
/option
>
<
/select
>
<
/div
>
<
label
>
Female
/
Male
<
/label
>
<
/div
>
<
div
className
=
"
position-relative row form-group
"
>
<
label
htmlFor
=
"
studyTime
"
className
=
"
col-sm-2 col-form-label
"
>
Study
Time
<
/label
>
<
div
className
=
"
col-sm-3
"
>
<
input
type
=
"
number
"
min
=
"
0
"
max
=
"
24
"
name
=
"
study_time
"
id
=
"
studyTime
"
className
=
"
form-control
"
onChange
=
{
this
.
onChangeHandler
}
required
/>
<
/div
>
<
label
>
Study
Time
after
school
<
/label
>
<
/div
>
<
div
className
=
"
position-relative row form-group
"
>
<
label
htmlFor
=
"
extraAct
"
className
=
"
col-sm-2 col-form-label
"
>
Extra
Curriculum
Activities
<
/label
>
<
div
className
=
"
col-sm-3
"
>
<
select
defaultValue
=
""
className
=
"
form-control
"
name
=
"
activities
"
onChange
=
{
this
.
onChangeHandler
}
>
<
option
disabled
=
{
true
}
value
=
""
>
Select
<
/option
>
<
option
value
=
"
1
"
>
Yes
<
/option
>
<
option
value
=
"
0
"
>
No
<
/option
>
<
/select
>
<
/div
>
<
label
>
Doing
extra
-
curricular
activities
<
/label
>
<
/div
>
<
div
className
=
"
position-relative row form-group
"
>
<
label
htmlFor
=
"
int
"
className
=
"
col-sm-2 col-form-label
"
>
Internet
at
Home
<
/label
>
<
div
className
=
"
col-sm-3
"
>
<
select
defaultValue
=
""
className
=
"
form-control
"
name
=
"
internet
"
onChange
=
{
this
.
onChangeHandler
}
>
<
option
disabled
=
{
true
}
value
=
""
>
Select
<
/option
>
<
option
value
=
"
1
"
>
Yes
<
/option
>
<
option
value
=
"
0
"
>
No
<
/option
>
<
/select
>
<
/div
>
<
label
>
Internet
availability
at
home
<
/label
>
<
/div
>
<
div
className
=
"
position-relative row form-group
"
>
<
label
htmlFor
=
"
freeTime
"
className
=
"
col-sm-2 col-form-label
"
>
Free
Time
<
/label
>
<
div
className
=
"
col-sm-3
"
>
<
input
type
=
"
number
"
min
=
"
0
"
max
=
"
24
"
name
=
"
free_time
"
id
=
"
freeTime
"
className
=
"
form-control
"
onChange
=
{
this
.
onChangeHandler
}
required
/>
<
/div
>
<
label
>
Free
time
available
after
school
<
/label
>
<
/div
>
<
div
className
=
"
position-relative row form-group
"
>
<
label
htmlFor
=
"
abs
"
className
=
"
col-sm-2 col-form-label
"
>
Absences
<
/label
>
<
div
className
=
"
col-sm-3
"
>
<
input
type
=
"
number
"
min
=
"
0
"
max
=
"
99
"
name
=
"
absences
"
id
=
"
abs
"
className
=
"
form-control
"
onChange
=
{
this
.
onChangeHandler
}
required
/>
<
/div
>
<
label
>
Number
of
days
absent
in
tution
class
<
/label
>
<
/div
>
<
div
className
=
"
position-relative row form-group
"
>
<
label
htmlFor
=
"
quiz1
"
className
=
"
col-sm-2 col-form-label
"
>
Quiz
1
Marks
<
/label
>
<
div
className
=
"
col-sm-3
"
>
<
input
type
=
"
number
"
min
=
"
0
"
max
=
"
20
"
name
=
"
g1
"
id
=
"
quiz1
"
className
=
"
form-control
"
onChange
=
{
this
.
onChangeHandler
}
required
/>
<
/div
>
<
label
>
Quiz
1
marks
obtained
by
the
student
<
/label
>
<
/div
>
<
div
className
=
"
position-relative row form-group
"
>
<
label
htmlFor
=
"
quiz2
"
className
=
"
col-sm-2 col-form-label
"
>
Quiz
2
Marks
<
/label
>
<
div
className
=
"
col-sm-3
"
>
<
input
type
=
"
number
"
min
=
"
0
"
max
=
"
20
"
name
=
"
g2
"
id
=
"
quiz2
"
className
=
"
form-control
"
onChange
=
{
this
.
onChangeHandler
}
required
/>
<
/div
>
<
label
>
Quiz
2
marks
obtained
by
the
student
<
/label
>
<
/div
>
<
div
className
=
"
position-relative row form-group
"
>
<
div
className
=
"
col-sm-12
"
>
<
button
className
=
"
btn btn-primary
"
style
=
{{
width
:
"
150px
"
}}
type
=
"
submit
"
>
Save
Details
<
/button
>
<
/div
>
<
/div
>
<
/form
>
<
/div
>
<
/div
>
<
/div
>
);
}
}
\ No newline at end of file
WebFrontEnd/smartcoach-frontend/src/Components/Admin/analytics.js
View file @
338bc956
...
...
@@ -85,44 +85,92 @@ export default class Analytics extends Component{
<
/div
>
<
/div
>
<
div
className
=
"
row
"
>
<
div
className
=
"
col-md-12 col-lg-6
"
>
<
div
className
=
"
mb-3 card
"
>
<
div
className
=
"
card-header-tab card-header-tab-animation card-header
"
>
<
div
className
=
"
card-header-title
"
>
<
i
className
=
"
header-icon lnr-apartment icon-gradient bg-love-kiss
"
>
<
/i
>
Sales
Report
<
div
className
=
"
col-md-6 col-lg-4
"
>
<
div
className
=
"
mb-3 card
"
>
<
div
className
=
"
card-header-tab card-header-tab-animation card-header
"
>
<
div
className
=
"
card-header-title
"
>
<
i
className
=
"
header-icon lnr-apartment icon-gradient bg-love-kiss
"
>
<
/i
>
Monthly
Income
<
/div
>
<
ul
className
=
"
nav
"
>
<
li
className
=
"
nav-item
"
><
a
href
=
"
javascript:void(0);
"
className
=
"
active nav-link
"
>
Last
<
/a></
li
>
<
li
className
=
"
nav-item
"
><
a
href
=
"
javascript:void(0);
"
className
=
"
nav-link second-tab-toggle
"
>
Current
<
/a></
li
>
<
/ul
>
<
/div
>
<
div
className
=
"
card-body
"
>
<
div
className
=
"
tab-content
"
>
<
div
className
=
"
tab-pane fade show active
"
id
=
"
tabs-eg-77
"
>
<
div
className
=
"
card mb-3 widget-chart widget-chart2 text-left w-100
"
>
<
div
className
=
"
widget-chat-wrapper-outer
"
>
<
div
className
=
"
widget-chart-wrapper widget-chart-wrapper-lg opacity-10 m-0
"
>
{
/*<canvas id="canvas" />*/
}
{
/*<Bar data={data} options={options}/>*/
}
<
Pie
data
=
{
state
}
options
=
{{
title
:{
display
:
true
,
text
:
'
Average Rainfall per month
'
,
fontSize
:
20
},
legend
:{
display
:
true
,
position
:
'
right
'
}
}}
/
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
ul
className
=
"
nav
"
>
<
li
className
=
"
nav-item
"
><
a
href
=
"
javascript:void(0);
"
className
=
"
active nav-link
"
>
Last
<
/a></
li
>
<
li
className
=
"
nav-item
"
><
a
href
=
"
javascript:void(0);
"
className
=
"
nav-link second-tab-toggle
"
>
Current
<
/a></
li
>
<
/ul
>
<
/div
>
<
div
className
=
"
card-body
"
>
<
div
className
=
"
tab-content
"
>
<
div
className
=
"
tab-pane fade show active
"
id
=
"
tabs-eg-77
"
>
<
div
className
=
"
card mb-3 widget-chart widget-chart2 text-left w-100
"
>
<
div
className
=
"
widget-chat-wrapper-outer
"
>
<
div
className
=
"
widget-chart-wrapper widget-chart-wrapper-lg opacity-10 m-0
"
>
{
/*<canvas id="canvas" />*/
}
{
/*<Bar data={data} options={options}/>*/
}
<
Pie
data
=
{
state
}
options
=
{{
title
:{
display
:
true
,
text
:
'
Average Rainfall per month
'
,
fontSize
:
20
},
legend
:{
display
:
true
,
position
:
'
right
'
}
}}
/
>
<
/div
>
<
div
className
=
"
col-md-6 col-lg-4
"
>
<
div
className
=
"
mb-3 card
"
>
<
div
className
=
"
card-header-tab card-header-tab-animation card-header
"
>
<
div
className
=
"
card-header-title
"
>
<
i
className
=
"
header-icon lnr-apartment icon-gradient bg-love-kiss
"
>
<
/i
>
Monthly
Expenses
<
/div
>
<
ul
className
=
"
nav
"
>
<
li
className
=
"
nav-item
"
><
a
href
=
"
javascript:void(0);
"
className
=
"
active nav-link
"
>
Last
<
/a></
li
>
<
li
className
=
"
nav-item
"
><
a
href
=
"
javascript:void(0);
"
className
=
"
nav-link second-tab-toggle
"
>
Current
<
/a></
li
>
<
/ul
>
<
/div
>
<
div
className
=
"
card-body
"
>
<
div
className
=
"
tab-content
"
>
<
div
className
=
"
tab-pane fade show active
"
id
=
"
tabs-eg-77
"
>
<
div
className
=
"
card mb-3 widget-chart widget-chart2 text-left w-100
"
>
<
div
className
=
"
widget-chat-wrapper-outer
"
>
<
div
className
=
"
widget-chart-wrapper widget-chart-wrapper-lg opacity-10 m-0
"
>
{
/*<canvas id="canvas" />*/
}
{
/*<Bar data={data} options={options}/>*/
}
<
Pie
data
=
{
state
}
options
=
{{
title
:{
display
:
true
,
text
:
'
Average Rainfall per month
'
,
fontSize
:
20
},
legend
:{
display
:
true
,
position
:
'
right
'
}
}}
/
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
@@ -130,7 +178,55 @@ export default class Analytics extends Component{
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"
col-md-6 col-lg-4
"
>
<
div
className
=
"
mb-3 card
"
>
<
div
className
=
"
card-header-tab card-header-tab-animation card-header
"
>
<
div
className
=
"
card-header-title
"
>
<
i
className
=
"
header-icon lnr-apartment icon-gradient bg-love-kiss
"
>
<
/i
>
Monthly
Revenue
<
/div
>
<
ul
className
=
"
nav
"
>
<
li
className
=
"
nav-item
"
><
a
href
=
"
javascript:void(0);
"
className
=
"
active nav-link
"
>
Last
<
/a></
li
>
<
li
className
=
"
nav-item
"
><
a
href
=
"
javascript:void(0);
"
className
=
"
nav-link second-tab-toggle
"
>
Current
<
/a></
li
>
<
/ul
>
<
/div
>
<
div
className
=
"
card-body
"
>
<
div
className
=
"
tab-content
"
>
<
div
className
=
"
tab-pane fade show active
"
id
=
"
tabs-eg-77
"
>
<
div
className
=
"
card mb-3 widget-chart widget-chart2 text-left w-100
"
>
<
div
className
=
"
widget-chat-wrapper-outer
"
>
<
div
className
=
"
widget-chart-wrapper widget-chart-wrapper-lg opacity-10 m-0
"
>
{
/*<canvas id="canvas" />*/
}
{
/*<Bar data={data} options={options}/>*/
}
<
Pie
data
=
{
state
}
options
=
{{
title
:{
display
:
true
,
text
:
'
Average Rainfall per month
'
,
fontSize
:
20
},
legend
:{
display
:
true
,
position
:
'
right
'
}
}}
/
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
);
}
...
...
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