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
a7888ca1
Commit
a7888ca1
authored
Aug 22, 2021
by
Hasitha Samarasekara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Student Dashboard Added.
Student Alevel result adding form added.
parent
a0272770
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1018 additions
and
3 deletions
+1018
-3
BackEnd/WebBackEnd/models/studentALResult.model.js
BackEnd/WebBackEnd/models/studentALResult.model.js
+27
-0
BackEnd/WebBackEnd/routes/studentALResult.route.js
BackEnd/WebBackEnd/routes/studentALResult.route.js
+78
-0
BackEnd/WebBackEnd/server.js
BackEnd/WebBackEnd/server.js
+2
-0
WebFrontEnd/smartcoach-frontend/src/App.js
WebFrontEnd/smartcoach-frontend/src/App.js
+9
-3
WebFrontEnd/smartcoach-frontend/src/Components/Student/ALResults.js
...d/smartcoach-frontend/src/Components/Student/ALResults.js
+405
-0
WebFrontEnd/smartcoach-frontend/src/Components/Student/StudentDashboard.js
...coach-frontend/src/Components/Student/StudentDashboard.js
+497
-0
WebFrontEnd/smartcoach-frontend/src/Images/grades.png
WebFrontEnd/smartcoach-frontend/src/Images/grades.png
+0
-0
WebFrontEnd/smartcoach-frontend/src/Images/nveified.png
WebFrontEnd/smartcoach-frontend/src/Images/nveified.png
+0
-0
No files found.
BackEnd/WebBackEnd/models/studentALResult.model.js
0 → 100644
View file @
a7888ca1
const
mongoose
=
require
(
'
mongoose
'
);
const
Schema
=
mongoose
.
Schema
;
const
ALResultsSchema
=
new
Schema
({
student_id
:{
type
:
mongoose
.
Schema
.
Types
.
ObjectId
,
ref
:
'
Post
'
},
year
:{
type
:
String
,
required
:
false
},
stream
:
{
type
:
String
,
required
:
true
},
subject01
:{
type
:
String
,
required
:
true
},
subject02
:{
type
:
String
,
required
:
true
},
subject03
:{
type
:
String
,
required
:
true
},
subject01Result
:{
type
:
String
,
required
:
true
},
subject02Result
:{
type
:
String
,
required
:
true
},
subject03Result
:{
type
:
String
,
required
:
true
},
generalEnglish
:{
type
:
String
},
commonGeneralTest
:{
type
:
String
},
image
:{
type
:
String
},
verified
:
{
type
:
Boolean
,
default
:
false
}
});
const
ALevelResults
=
mongoose
.
model
(
'
ALevelResults
'
,
ALResultsSchema
);
module
.
exports
=
ALevelResults
;
\ No newline at end of file
BackEnd/WebBackEnd/routes/studentALResult.route.js
0 → 100644
View file @
a7888ca1
const
router
=
require
(
'
express
'
).
Router
();
let
ALevelResults
=
require
(
'
../models/studentALResult.model
'
);
const
mongoose
=
require
(
"
mongoose
"
);
router
.
route
(
'
/add
'
).
post
(
async
(
req
,
res
)
=>
{
const
results
=
await
ALevelResults
.
findOne
({
student_id
:
req
.
body
.
student_id
})
console
.
log
(
req
.
body
);
const
student_id
=
mongoose
.
Types
.
ObjectId
(
req
.
body
.
student_id
);
const
year
=
req
.
body
.
year
;
const
stream
=
req
.
body
.
stream
;
const
subject01
=
req
.
body
.
subject01
;
const
subject02
=
req
.
body
.
subject02
;
const
subject03
=
req
.
body
.
subject03
;
const
subject01Result
=
req
.
body
.
subject01Result
;
const
subject02Result
=
req
.
body
.
subject02Result
;
const
subject03Result
=
req
.
body
.
subject03Result
;
const
generalEnglish
=
req
.
body
.
generalEnglish
;
const
commonGeneralTest
=
req
.
body
.
commonGeneralTest
;
const
image
=
req
.
body
.
image
;
const
newResult
=
new
ALevelResults
({
student_id
,
year
,
stream
,
subject01
,
subject02
,
subject03
,
subject01Result
,
subject02Result
,
subject03Result
,
generalEnglish
,
commonGeneralTest
,
image
,
});
if
(
!
results
){
newResult
.
save
().
then
(()
=>
{
res
.
json
(
'
Item update!
'
);
})
}
else
{
ALevelResults
.
findById
(
req
.
body
.
student_id
,
function
(
err
,
details
){
if
(
!
details
){
req
.
status
(
404
).
send
(
"
data is not found
"
);
}
else
{
details
.
year
=
year
;
details
.
stream
=
stream
;
details
.
subject01
=
subject01
;
details
.
subject02
=
subject02
;
details
.
subject03
=
subject03
;
details
.
subject01Result
=
subject01Result
;
details
.
subject02Result
=
subject02Result
;
details
.
subject03Result
=
subject03Result
;
details
.
generalEnglish
=
generalEnglish
;
details
.
commonGeneralTest
=
commonGeneralTest
;
details
.
image
=
image
;
details
.
save
().
then
(
()
=>
{
res
.
json
(
'
results updated!
'
);
})
.
catch
(
err
=>
{
res
.
status
(
400
).
send
(
"
Update not possible
"
);
});
}
})
}
});
module
.
exports
=
router
;
\ No newline at end of file
BackEnd/WebBackEnd/server.js
View file @
a7888ca1
...
...
@@ -28,6 +28,7 @@ const instituteRouter = require('./routes/institute.route');
const
userAccount
=
require
(
'
./routes/userAccount.route
'
);
const
questionManage
=
require
(
'
./routes/question.route
'
);
const
financeRouter
=
require
(
'
./routes/finance.route
'
);
const
studentResult
=
require
(
'
./routes/studentALResult.route
'
);
app
.
use
(
'
/studentSingUp
'
,
studentRouter
);
app
.
use
(
'
/tutorSingUp
'
,
tutorRouter
);
...
...
@@ -35,6 +36,7 @@ app.use('/instituteSingUp',instituteRouter);
app
.
use
(
'
/userAccount
'
,
userAccount
);
app
.
use
(
'
/questions
'
,
questionManage
);
app
.
use
(
'
/admin/finance
'
,
financeRouter
);
app
.
use
(
'
/studentResults
'
,
studentResult
);
app
.
listen
(
port
,
()
=>
{
console
.
log
(
`Server is running on Port:
${
port
}
`
);
...
...
WebFrontEnd/smartcoach-frontend/src/App.js
View file @
a7888ca1
...
...
@@ -11,9 +11,10 @@ import SignUp from "./Components/SignUp";
import
beforeConfirmation
from
"
./Components/beforeConfirmation
"
;
import
VerifiedAccount
from
"
./Components/AccountVerified
"
;
import
Dashboard
from
"
./Components/Admin/Dashboard
"
;
import
StudentDashboard
from
"
./Components/Student/StudentDashboard
"
;
import
QuestionDetails
from
"
./Components/IT18050240/question_details
"
import
QuestionLayout
from
"
./Components/IT18050240/question_layout
"
import
AdminQuestionManagement
from
"
./Components/IT18050240/admin_question_management.js
"
//
import AdminQuestionManagement from "./Components/IT18050240/admin_question_management.js"
import
QuestionBank
from
"
./Components/IT18050240/question_bank
"
function
App
()
{
...
...
@@ -26,16 +27,21 @@ function App() {
<
Route
path
=
"
/SignUp
"
exact
component
=
{
SignUp
}
/
>
<
Route
path
=
"
/beforeConfirm
"
exact
component
=
{
beforeConfirmation
}
/
>
<
Route
path
=
"
/AccountVerified/:id
"
exact
component
=
{
VerifiedAccount
}
/
>
{
/*<Route path="/studentDashboard" exact component={StudentDashboard}/>*/
}
{
/*<Route path="/" exact component={Dashboard}/>*/
}
<
Switch
>
<
Route
path
=
"
/admin
"
><
Dashboard
/><
/Route
>
<
Route
path
=
"
/studentDashboard
"
><
StudentDashboard
/><
/Route
>
<
Route
path
=
"
/questiondetails
"
exact
component
=
{
QuestionDetails
}
/
>
<
Route
path
=
"
/question
"
exact
component
=
{
QuestionLayout
}
/
>
<
Route
path
=
"
/questionmanagement
"
exact
component
=
{
AdminQuestionManagement
}
/
>
{
/*<Route path="/questionmanagement" exact component={AdminQuestionManagement}/>*/
}
<
Route
path
=
"
/questionbank
"
exact
component
=
{
QuestionBank
}
/
>
<
Route
path
=
"
/edititem/:id
"
exact
component
=
{
AdminQuestionManagement
}
/
>
{
/*<Route path="/edititem/:id" exact component={AdminQuestionManagement}/>*/
}
<
/Switch
>
<
/div
>
<
/Router
>
);
...
...
WebFrontEnd/smartcoach-frontend/src/Components/Student/ALResults.js
0 → 100644
View file @
a7888ca1
This diff is collapsed.
Click to expand it.
WebFrontEnd/smartcoach-frontend/src/Components/Student/StudentDashboard.js
0 → 100644
View file @
a7888ca1
This diff is collapsed.
Click to expand it.
WebFrontEnd/smartcoach-frontend/src/Images/grades.png
0 → 100644
View file @
a7888ca1
16.7 KB
WebFrontEnd/smartcoach-frontend/src/Images/nveified.png
0 → 100644
View file @
a7888ca1
37.4 KB
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