Commit 9d437dbb authored by Gihan Tharaka's avatar Gihan Tharaka

Merge remote-tracking branch 'origin/master'

parents 6abcc971 a51fc9dd
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const ClassStudentRequestSchema = new Schema({
class_id:{type:mongoose.Schema.Types.ObjectId,ref: 'Classes'},
student_id:{type:mongoose.Schema.Types.ObjectId,ref: 'student'},
tutor_id:{type:mongoose.Schema.Types.ObjectId,ref: 'tutor'},
},{
timestamps:true,
});
const ClassStudentRequestList = mongoose.model('ClassStudentRequestList',ClassStudentRequestSchema);
module.exports = ClassStudentRequestList;
\ No newline at end of file
......@@ -2,6 +2,7 @@ const router = require('express').Router();
let classes = require('../models/createClass.model');
let student = require('../models/student.user.model');
let studentList = require('../models/ClassStudentList.model');
let studentRequestList = require('../models/ClassStudentRquestList.model');
const mongoose = require("mongoose");
router.route('/add').post(async(req,res) =>{
......@@ -161,4 +162,64 @@ router.route('/studentList/:id').get(function (req, res) {
});
});
router.route('/studentRequestList/add').post((req, res) => {
const class_id = req.body._id;
const student_id = req.body.student_id;
const tutor_id = req.body.tutor_id;
console.log("classID: " + class_id);
console.log("student_nic: " + student_id);
classes.findById(class_id,function(err, tutorsClass){
if(!tutorsClass)
res.status(404).send("Sorry Class Could not Found.");
else {
student.find({"_id": student_id}).then(student => {
console.log(student)
console.log(student[0]._id)
if(student[0].student_nic === ""){
res.status(500).send("Sorry, This Student Not Registered");
}else{
const student_id = student[0]._id;
const newClassStudent = new studentRequestList({
class_id,
student_id,
tutor_id
});
studentRequestList.find({"student_id" : student_id, "class_id" : class_id}).then(reqClass =>{
console.log("reqClass : ")
console.log(reqClass)
if(reqClass.length > 0){
res.status(501).send("Already Request to this Class");
}
else{
newClassStudent.save().then(result =>{
res.json('Student Requested is complete!');
})
.catch(err =>{
res.status(500).send("Update not possible");
});
}
})
}
}).catch(err => res.status(500).json('Eroor: '+ err));
}
});
});
module.exports = router;
\ No newline at end of file
web: gunicorn --bind 0.0.0.0:$PORT wsgi:app
\ No newline at end of file
# flask-api
* **Emotion Detection Flask API**
* Open the project emotion-recognition (Code -> flask-api -> emotion-recognition)
* Install the required libraries using `pip`.
* Flask - `pip install -U Flask`
* numpy - `pip install numpy`
* tenserflow - `pip install --user --upgrade tensorflow`
* Pillow - `pip install Pillow==2.2.1`
* Flask Cors - `pip install Flask-Cors`
* gunicorn - `pip install gunicorn`
* Download the pretrained model from : https://drive.google.com/file/d/1trPbUpfoVFMxssZxMPorqMbIekbnxhI4/view?usp=sharing
* Place the model inside the app folder. (Code -> flask-api -> emotion-recognition -> app)
* After successfully installing the dependencies run the API with `python wsgi.py`
# Importing the libraries
import time
import numpy as np
from tensorflow import keras
from flask import Flask, request, jsonify
from flask_cors import CORS
from keras.preprocessing.sequence import pad_sequences
from keras.preprocessing.text import Tokenizer
import pickle
# Load Tensorflow and Keras Model
print('Loading Model ...')
model = keras.models.load_model('app/model.h5')
print('Model Loaded')
# Enabling Cors
app = Flask(__name__)
SEQUENCE_LENGTH = 300
POSITIVE = "POSITIVE"
NEGATIVE = "NEGATIVE"
NEUTRAL = "NEUTRAL"
SENTIMENT_THRESHOLDS = (0.6, 0.8)
#tokenizer = Tokenizer()
def conbinenegativeWords(comment):
notWord = 'not'
conbine = 'false'
tempWord = []
FinalText = ''
x = '0'
isSet ='false'
tokens = []
for eachWord in comment.split():
if eachWord in notWord:
if x in '0':
eachWord = 'ABC'
x = '1'
isSet = 'true'
tokens.append(eachWord)
else:
if x in '1':
tempWord.append(eachWord)
eachWord = ''
x = '0'
tokens.append(eachWord)
else:
tokens.append(eachWord)
if isSet in 'true':
FinalText = " ".join(tokens)
for tem in tempWord:
FinalText = FinalText.replace('ABC','not'+tem)
else:
FinalText = comment
return FinalText
# loading
with open('app/tokenizer.pickle', 'rb') as handle:
tokenizer = pickle.load(handle)
def decode_sentiment(score, include_neutral=True):
if include_neutral:
label = NEUTRAL
if score <= SENTIMENT_THRESHOLDS[0]:
label = NEGATIVE
elif score >= SENTIMENT_THRESHOLDS[1]:
label = POSITIVE
return label
else:
return NEGATIVE if score < 0.5 else POSITIVE
#return label, score and Time
def predict(text, include_neutral=True):
start_at = time.time()
# Tokenize text
x_test = pad_sequences(tokenizer.texts_to_sequences([text]), maxlen=SEQUENCE_LENGTH)
# Predict
score = model.predict([x_test])[0]
# Decode sentiment
label = decode_sentiment(score, include_neutral=include_neutral)
return {"label": label, "score": float(score),
"elapsed_time": time.time()-start_at}
#Return Only score
def predict_OnlyAccuracy(text, include_neutral=True):
start_at = time.time()
# Tokenize text
x_test = pad_sequences(tokenizer.texts_to_sequences([text]), maxlen=SEQUENCE_LENGTH)
# Predict
score = model.predict([x_test])[0]
# Decode sentiment
label = decode_sentiment(score, include_neutral=include_neutral)
return float(score)
# Test Route
@app.route('/')
def index():
return "<h1>Review Prediction Flask API !!</h1>"
# Review Prediction Route
@app.route('/review_prediction',methods=['POST'])
def review_prediction():
'''
For direct API calls trought request
'''
data = request.get_json(force=True)
start = time.time()
reviewResultsList = []
for var in data['review']:
reviewResultsList.append(predict(conbinenegativeWords(var)));
# Getting the prediciton
#prediction_new = predict(conbinenegativeWords(data['review']));
end = time.time()
print('Prediction Time: ',end - start)
return jsonify({"data":data, "result":reviewResultsList})
# Review Prediction Route Get Final value to Tutor
@app.route('/review_prediction_for_tutor',methods=['POST'])
def review_prediction_for_tutor():
'''
For direct API calls trought request
'''
data = request.get_json(force=True)
start = time.time()
reviewResultsList = []
totalScore = 0
for var in data:
print(var);
reviewResultsList.append(predict_OnlyAccuracy(conbinenegativeWords(var)));
for item in reviewResultsList:
totalScore = totalScore + item
finalyPrecentage = (totalScore / len(reviewResultsList)) * 100
end = time.time()
print('Prediction Time: ',end - start)
return jsonify({"result":finalyPrecentage})
Flask
numpy
tensorflow==2.0
Pillow
flask_cors
gunicorn
\ No newline at end of file
from app.main import app
if __name__ == "__main__":
app.run(debug=True)
# 2021-049
Main Objective :
To develop a comprehensive solution that benefits students to find the most suitable tutor and a solution to the tutor capable of tracking income, students' attendance, and students' performance.
Sub Objective :
Sub Objective 1: (IT18063288)
System considers 4 main aspects when recommending the foremost tutor for the new students for Advance Level.
1. Based on the student Count.
2. Based on the tutor rating.
3. Based on the student reviews.
4. Based on the student A/Level results.
Sub Objective 2: (IT18058338)
To develop an efficient predictive model with supervised learning methods to determine the tutors’ revenue in upcoming months and determine students' performance with the help of assessments given to students.
Sub Objective 3: (IT18049114)
The objective is to have one online tuition class system according to all-in-one concept for anyone, anywhere in Sri Lanka, providing the service of live streaming and file sharing with the standard of physical class rather than existing systems.
Sub Objective 4: (IT18050240)
The main objective of this proposed system is implementing automatic question generating tool. When it comes to creating question papers, question creation is a challenging process. Making the relevant questions is time consuming and requires a lot of effort. As a result of that, the recommended system was implemented as a solution to all of the problems.
Main Research Problem
There is no decent standard for the education system in a third world developing country like Sri Lanka.
Students move to tuition classes instead of free education due to the high competition for university entries in Sri Lanka.
In order to ensure that some tutors who do not have proper education background and experience in the industry starts tuition classes with that demand.
The majority of students attend to tuition classes throughout promotional reviews via advertisements, TV commercials and also the recommendations from relatives/neighbors/friends/office mates etc.
tutor’s experience in tutoring, their. Yet they have no idea about the tutor's tutoring background in the industry, instructional techniques and teaching methods & patterns.
To a certain end, students will encounter many problems unless the student has been unable to understand or gain a better understanding and knowledge from those tuition masters.
The money spent by parents, the time spent and the effort wasted by the child are worthless in that situation. Because, even before the students enroll to the tuition classes, both parents and students do not have any impression.
So they definitely need to sit for 3-4 weeks for the class and at the beginning spend admissions and tuition fees.
There are so many problems that may arise when there is no proper tutor recommendation system.
Therefore, we propose an educational system that would help determine a skilled, professional, well experienced, most appropriate tuition master for GCE Advanced level in Sri Lanka.
System Overview
The whole system is developed for an online learning platform with all-in-one concept.
This system is for tutors, students, parents, institutes and tutors.
Several functions are going to be developed in this platform which are Tuition master recommendation, Tutor dashboards, online video conferencing and file sharing and preparing and answering MCQ and essay type questions
......@@ -14,11 +14,9 @@ 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"
import LessonAndExam from "./Components/IT18050240/lessonandexampage";
import AutomaticQuestion from "./Components/IT18050240/automatic_question"
import Upload from "./Components/IT18050240/UploadPage";
import TutorProfileView from "./Components/HomePage/TutorProfileView";
function App() {
return (
......@@ -30,7 +28,8 @@ 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="/Home/ViewProfile/:id" exact component={TutorProfileView}/>
<Route path="/studentDashboard" exact component={StudentDashboard}/>
{/*<Route path="/" exact component={Dashboard}/>*/}
......@@ -38,13 +37,10 @@ function App() {
<Route path="/admin"><Dashboard/></Route>
<Route path="/studentDashboard"><StudentDashboard/></Route>
<Route path="/questiondetails" exact component={QuestionDetails}/>
<Route path="/question/:id" exact component={QuestionLayout}/>
<Route path="/questionmanagement/:id" exact component={AdminQuestionManagement}/>
<Route path="/question" exact component={QuestionLayout}/>
{/*<Route path="/questionmanagement" exact component={AdminQuestionManagement}/>*/}
<Route path="/questionbank" exact component={QuestionBank}/>
<Route path="/questionmanagement" exact component={AdminQuestionManagement}/>
<Route path="/lesson" exact component={LessonAndExam}/>
<Route path="/automaticquestion" exact component={AutomaticQuestion}/>
<Route path="/upload" exact component={Upload}/>
{/*<Route path="/edititem/:id" exact component={AdminQuestionManagement}/>*/}
</Switch>
......
......@@ -15,6 +15,7 @@ import * as Icon from 'react-bootstrap-icons';
import axios from "axios";
import * as configs from "../Config/config";
import TutorCard from "./HomePage/TutorCard";
import RightSideAdd from "./HomePage/AdvertisementRightSide";
import swal from "sweetalert";
import Carousel from "react-bootstrap/Carousel";
......@@ -414,20 +415,7 @@ export default class Home extends Component {
let FinalStudentCountScore = (valueForStudentCount * Number(this.state.RVStudentCount)) / 100;
let FinalScore = finalReviewScore + FinalRatingScore + FinalStudentCountScore;
const temp = {
tutor_id: tutor.teacher,
tutor_name: tutor.tutor_name,
tutor_subjects: tutor.tutor_subjects,
tutor_class_type: tutor.tutor_class_type,
tutor_main_district: tutor.tutor_main_district,
tutor_main_city: tutor.tutor_main_city,
tutor_medium: tutor.tutor_medium,
tutor_qualification: tutor.tutor_qualification,
tutor_reviewValue: tutor.tutor_reviewValue,
tutor_avg_rating: tutor.tutor_avg_rating,
tutor_finalScore: FinalScore,
tutor_review_count: tutor.tutor_review_count
}
let oneday = 24 * 60 * 60 * 1000;
let NoOFDays = (todayDate - new Date(tutor.tutor_registered_date));
let NoOFDaysRegistered = Math.ceil(NoOFDays / oneday);
......@@ -437,8 +425,39 @@ export default class Home extends Component {
//
// }
if (NoOFDaysRegistered >= 365 && Number(tutor.tutor_review_count) > 10) {
const temp = {
tutor_id: tutor.teacher,
tutor_name: tutor.tutor_name,
tutor_subjects: tutor.tutor_subjects,
tutor_class_type: tutor.tutor_class_type,
tutor_main_district: tutor.tutor_main_district,
tutor_main_city: tutor.tutor_main_city,
tutor_medium: tutor.tutor_medium,
tutor_qualification: tutor.tutor_qualification,
tutor_reviewValue: tutor.tutor_reviewValue,
tutor_avg_rating: tutor.tutor_avg_rating,
tutor_finalScore: FinalScore,
tutor_review_count: tutor.tutor_review_count,
recommended_ : true
}
TutorRecommendedFinalList.push(temp);
} else {
const temp = {
tutor_id: tutor.teacher,
tutor_name: tutor.tutor_name,
tutor_subjects: tutor.tutor_subjects,
tutor_class_type: tutor.tutor_class_type,
tutor_main_district: tutor.tutor_main_district,
tutor_main_city: tutor.tutor_main_city,
tutor_medium: tutor.tutor_medium,
tutor_qualification: tutor.tutor_qualification,
tutor_reviewValue: tutor.tutor_reviewValue,
tutor_avg_rating: tutor.tutor_avg_rating,
tutor_finalScore: FinalScore,
tutor_review_count: tutor.tutor_review_count,
recommended_ : false
}
TutorOnlyFilterFinalList.push(temp);
}
......@@ -880,50 +899,63 @@ export default class Home extends Component {
}
</div>
<div className="row"
style={{background: '#F5F4ED', marginLeft: '50px', marginRight: '50px', marginTop: '10px'}}>
<h5 style={{margin: '10px'}}>{this.state.TutorFilteredList.length} Results</h5>
style={{background: '#1E4258', marginLeft: '50px', marginRight: '50px', marginTop: '10px'}}>
<h5 style={{color: "white", float: 'left',margin: '15px'}}>{this.state.TutorFilteredList.length} Results</h5>
</div>
{this.state.TutorFilteredRecommendedListFinal.length > 0 ?
<div className="row"
style={{
background: '#F5F4ED',
marginLeft: '50px',
marginRight: '50px',
marginTop: '10px'
}}>
<h4>Recommended List</h4>
</div>
:
<div>
</div>
}
<div className="">
{this.state.TutorFilteredRecommendedListFinal.length > 0 ? this.state.TutorFilteredRecommendedListFinal.map((card) => {
return (<TutorCard data={card}/>)
}) : <div></div>}
<div className="row">
<div className="col-8">
{this.state.TutorFilteredRecommendedListFinal.length > 0 ?
<div className="row"
style={{
background: '#1E4258',
marginLeft: '50px',
marginRight: '0px',
marginTop: '10px'
}}>
<h4 style={{color: "white", float: 'left',margin: '15px'}}>Recommended List</h4>
</div>
:
<div>
</div>
}
<div className="" style={{marginLeft:'50px',marginRight:'0px'}}>
{this.state.TutorFilteredRecommendedListFinal.length > 0 ? this.state.TutorFilteredRecommendedListFinal.map((card) => {
return (<TutorCard data={card}/>)
}) : <div></div>}
</div>
</div>
{this.state.TutorOnlyFilteredListFinal.length > 0 ?
<div className="row" style={{
background: '#F5F4ED',
marginLeft: '50px',
marginRight: '50px',
marginTop: '10px'
}}>
<h4>Filtered List</h4>
</div>
:
<div>
</div>
}
{this.state.TutorOnlyFilteredListFinal.length > 0 ?
<div className="row" style={{
background: '#1E4258',
marginLeft: '50px',
marginRight: '0px',
marginTop: '10px'
}}>
<h4 style={{color: "white", float: 'left',margin: '15px'}}>Filtered List</h4>
</div>
:
<div>
</div>
}
<div className="">
{this.state.TutorOnlyFilteredListFinal.length > 0 ? this.state.TutorOnlyFilteredListFinal.map((card) => {
return (<TutorCard data={card}/>)
}) : <div></div>}
<div className="" style={{marginLeft:'50px',marginRight:'0px'}}>
{this.state.TutorOnlyFilteredListFinal.length > 0 ? this.state.TutorOnlyFilteredListFinal.map((card) => {
return (<TutorCard data={card}/>)
}) : <div></div>}
</div>
</div>
<div className="col-3">
{this.state.TutorOnlyFilteredListFinal.length > 0 ?
<RightSideAdd></RightSideAdd>
:
<div>
</div>
}
</div>
</div>
<div className="app-main__outer">
<HomeFooter/>
......
import React, {Component} from "react";
import Carousel from "react-bootstrap/Carousel";
import AddR1 from "../../Images/ad_r1.jpg";
import AddR2 from "../../Images/ad_r2.jpg";
export default class AdvertisementRightSide extends Component{
constructor(props) {
super(props);
this.state = {
};
//this.FindTutor = this.FindTutor.bind(this);
}
render() {
return(
<div>
<Carousel style={{width:'100%'}} nextLabel={false} prevLabel={false} indicators={false} >
<Carousel.Item>
<img
className="toast-bottom-full-width"
src={AddR1}
alt="First slide"
/>
<Carousel.Caption>
</Carousel.Caption>
</Carousel.Item>
<Carousel.Item>
<img
className="d-block w-100"
src={AddR2}
alt="Second slide"
/>
<Carousel.Caption>
</Carousel.Caption>
</Carousel.Item>
{/*<Carousel.Item>*/}
{/* <img*/}
{/* className="d-block w-100"*/}
{/* src={AddR1}*/}
{/* alt="Third slide"*/}
{/* />*/}
{/* <Carousel.Caption>*/}
{/* </Carousel.Caption>*/}
{/*</Carousel.Item>*/}
</Carousel>
</div>
)
}
}
\ No newline at end of file
import React, {Component} from "react";
import Carousel from "react-bootstrap/Carousel";
import AddR1 from "../../Images/ad_top_s_01.jpg";
import AddR2 from "../../Images/ad_r2.jpg";
export default class AdvertisementTopSmall extends Component{
constructor(props) {
super(props);
this.state = {
};
//this.FindTutor = this.FindTutor.bind(this);
}
render() {
return(
<div className="row">
<div className="col">
<Carousel style={{width:'100%',height:'100px', margin:'10px'}} nextLabel={false} prevLabel={false} indicators={false} >
<Carousel.Item>
<img style={{width:'90%'}}
className="toast-bottom-full-width"
src={AddR1}
alt="First slide"
/>
<Carousel.Caption>
</Carousel.Caption>
</Carousel.Item>
<Carousel.Item>
<img style={{width:'90%'}}
className="d-block w-100"
src={AddR1}
alt="Second slide"
/>
<Carousel.Caption>
</Carousel.Caption>
</Carousel.Item>
{/*<Carousel.Item>*/}
{/* <img*/}
{/* className="d-block w-100"*/}
{/* src={AddR1}*/}
{/* alt="Third slide"*/}
{/* />*/}
{/* <Carousel.Caption>*/}
{/* </Carousel.Caption>*/}
{/*</Carousel.Item>*/}
</Carousel>
</div>
<div className="col">
<Carousel style={{width:'100%',height:'100px', margin:'10px'}} nextLabel={false} prevLabel={false} indicators={false} >
<Carousel.Item>
<img style={{width:'90%'}}
className="toast-bottom-full-width"
src={AddR1}
alt="First slide"
/>
<Carousel.Caption>
</Carousel.Caption>
</Carousel.Item>
<Carousel.Item>
<img style={{width:'90%'}}
className="d-block w-100"
src={AddR1}
alt="Second slide"
/>
<Carousel.Caption>
</Carousel.Caption>
</Carousel.Item>
{/*<Carousel.Item>*/}
{/* <img*/}
{/* className="d-block w-100"*/}
{/* src={AddR1}*/}
{/* alt="Third slide"*/}
{/* />*/}
{/* <Carousel.Caption>*/}
{/* </Carousel.Caption>*/}
{/*</Carousel.Item>*/}
</Carousel>
</div>
</div>
)
}
}
\ No newline at end of file
......@@ -15,8 +15,8 @@ export default class TutorCard extends Component{
render() {
return(
<div className="main-card mb-3 card">
<div className="row" style={{background:'#F5F4ED', marginLeft:'50px', marginRight:'50px', marginTop:'10px', marginBottom:'10px'}}>
<div className="col-9">
<div className="row" style={{background:'#F5F4ED', marginLeft:'10px', marginRight:'10px', marginTop:'10px', marginBottom:'10px'}}>
<div className="col">
<div className="row" style={{background:'#F8F8F8'}}>
<div className="col-8" style={{margin:'5px', border:'solid', padding:'10px', borderColor:'#216E9B'}}>
<div className="row">
......@@ -61,44 +61,53 @@ export default class TutorCard extends Component{
</div>
<div className="col" style={{margin:'5px', border:'solid', padding:'10px', borderColor:'#216E9B'}}>
<div className="row">
<div className="col-1">
<img src={Star} style={{width:'20px', height:'20px'}}/>
</div>
<div className="col" >
<h5 style={{float:"left"}}>{this.props.data.tutor_avg_rating.toFixed(1)}</h5>
</div>
</div>
<div className="row">
<div className="col-1">
<img src={ReviewImg} style={{width:'20px', height:'20px'}}/>
</div>
<div className="col">
<h5 style={{float:"left"}}>{this.props.data.tutor_review_count} reviews</h5>
</div>
</div>
<div className="row">
<div className="col-1">
<br/>
{/*<img src={Calender} style={{width:'20px', height:'20px'}}/>*/}
<div className="row">
<div className="col-1">
<img src={Star} style={{width:'20px', height:'20px'}}/>
</div>
<div className="col" >
<h5 style={{float:"left"}}>{this.props.data.tutor_avg_rating.toFixed(1)}</h5>
</div>
</div>
<div className="row">
<div className="col-1">
<img src={ReviewImg} style={{width:'20px', height:'20px'}}/>
</div>
<div className="col">
<h5 style={{float:"left"}}>{this.props.data.tutor_review_count} reviews</h5>
</div>
</div>
<div className="row">
<div className="col-1">
<br/>
{/*<img src={Calender} style={{width:'20px', height:'20px'}}/>*/}
</div>
<div className="col">
{/*<h5 style={{float:"left"}}>6y experience</h5>*/}
</div>
</div>
<div className="row">
<Link to={`/Home/ViewProfile/${this.props.data.tutor_id}`}> <button className="form-control"
style={{background:"#216E9B", color:"white", marginLeft:'15px', marginRight:'15px'}}><b>View Profile</b></button></Link>
</div>
</div>
<div className="col">
{/*<h5 style={{float:"left"}}>6y experience</h5>*/}
<div className="col-">
{this.props.data.recommended_ ?
<img src={RecommendIcon} style={{width:'80px', height:'70px', float:'left', margin:'10px'}}/>
:
<div>
</div>
}
</div>
</div>
<div className="row">
<Link to={`/Home/ViewProfile/${this.props.data.tutor_id}`}> <button className="form-control"
style={{background:"#216E9B", color:"white", marginLeft:'15px', marginRight:'15px'}}><b>View Profile</b></button></Link>
</div>
</div>
</div>
</div>
<div className="col" style={{background:'#F8F8F8'}}>
<div>
<br/>
</div>
<img src={RecommendIcon} style={{width:'100px', height:'90px', float:'left', margin:'10px'}}/>
</div>
</div>
</div>
......
......@@ -65,8 +65,9 @@ export default class NavBar extends Component {
top: '15px',
right: '120px',
color: '#EAE4E4',
marginRight: '50px'
}}><h5>{this.state.user_name !== null ? <span style={{cursor:'pointer'}} onClick={()=>{ window.location.replace("/studentDashboard");}}> {this.state.user_name}</span> : <label onClick={() => {
marginRight: '50px',
cursor:'pointer'
}}><h5>{this.state.user_name !== null ? <span style={{cursor:'pointer'}} onClick={()=>{ window.location.replace("/studentDashboard");}}> {this.state.user_name}</span> : <label style={{cursor:'pointer'}} onClick={() => {
// window.location.replace("UserLogin");
window.location = '/UserLogin';
}}>Login</label>} </h5></label>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment