<file_sep>import React from 'react';
import '../App.css';
import Navbar from './Navbar';

function Products() {
  return (
    <>
     <Navbar/>
    {/*<h4 style={{"color":"white","textAlign":"center"}}>Read The Article about Synchronous Online Learning</h4> */}
  <p className='products'><a style={{"color":"white" }} href="https://er.educause.edu/articles/2008/11/asynchronous-and-synchronous-elearning">Article For Synchronous Online Learning</a></p>;
  </>
  );

}
export default Products;<file_sep>import * as actionCreators from "../action/action";

const initialState = {
    returnedMessage: "",
    studentObj: "",
    registrationSuccess: "",
    studentList: [],
    questionList: [],
  questionObj: {
    questionId: "",
    question: "",
    option1: "",
    option2: "",
    option3: "",
    option4: "",
    correctAnswer: "",
  }
}


const reducer = (state = initialState, action) => {
    switch (action.type) {
      case actionCreators.REQUEST_REGISTRATION:
        let message = action.payload;
  
        return {
          registrationStatus: message,
        };

        case actionCreators.CLEAR_STATE:
      return {
        returnedMessage: "",
        studentObj: "",
        studentList : []
      }

      case actionCreators.GET_ALL_QUESTIONS:
        let listOfQuestions = action.payload;
  
        return {
          returnedMessage: "Course Details!",
  
          questionList: listOfQuestions,
        };
  
      case actionCreators.DELETE_QUESTION:
        let listAfterDeletion = action.payload;
  
        return {
          returnedMessage: "Question Deleted",
  
          questionList: listAfterDeletion,
        };
  
      case actionCreators.ADD_QUESTION:
        let listAfterAdditionQuestion = action.data.questions;
  
        return {
          returnedMessage: "Question Added",
          questionList: listAfterAdditionQuestion,
        };
  
      case actionCreators.UPDATE_QUESTION:
        let listAfterUpdationQuestion = action.data.questions;
  
        return {
          returnedMessage: "Question Updated",
          questionList: listAfterUpdationQuestion,
        };
  
      case actionCreators.GET_QUESTION_BY_ID:
        let listOfQuestionById = action.payload;
  
        return {
          questionObj: listOfQuestionById,
        };
  

        default:
      return state;
  }
};
export default reducer;<file_sep>import axios from 'axios';

const STUDENT_API_BASE_URL = "http://ec2-18-191-253-178.us-east-2.compute.amazonaws.com:8080/api/educationsystem/student";

class StudentService {

    getStudents(){
        return axios.get(STUDENT_API_BASE_URL + "/view-all-studnets");
    }

    registerStudent(student){
        return axios.post(STUDENT_API_BASE_URL +  "/add-student", student );
    }

    findStudentById(sId){
        return axios.get(STUDENT_API_BASE_URL + '/view-studnet/' + sId);
    }
}

export default new StudentService()
<file_sep>import React from 'react';
import '../App.css';
import Navbar from './Navbar';

function Shiftings(){

    return (
        <>
        <Navbar/>
       {/* <h4 style={{"color":"white","textAlign":"center"}}>Read The Article about Fixed E-Learning</h4> */}
      <p className='shiftings'><a style={{"color":"white" }} href="https://e-student.org/types-of-e-learning/#fixed-e-learning">Article For Fixed E-Learning</a></p>;
      </>
      );
    

}
export default Shiftings;<file_sep>import React, { Component } from 'react'
import AttendanceService from '../services/AttendanceService'
import '../css/Attendance.css'
import TeacherNavbar from './TeacherNavbar'
import Cards from './Cards'

class Attendance extends Component {
    constructor(props) {
        super(props)

        this.state = {
                attendance: []
        }
    }

    
    componentDidMount(){
        AttendanceService.getAttendance().then((res) => {
            console.log(res.data);
            this.setState({ attendance: res.data});
        });
    }


    render() {
        return (
            <div>
                <TeacherNavbar/>
                 {/* <h2 className="text-center">Student List</h2> */}
                 {/* <div className = "row">
                    <button className="btn btn-primary"> Add Student</button>
                 </div> */}
                 <br></br>
                 <div className = "row">
                        <div className="attendance-table">
                        <h2 className="text-center">Attendance</h2>
                        <table className = "table table-striped table-bordered">

                            <thead>
                                <tr>
                                    <th> Attendance Id</th>
                                    <th>Student Name </th>
                                    <th> Date </th>
                                </tr>
                            </thead>
                            <tbody>
                                {
                                    this.state.attendance.map(
                                        attendance => 
                                        <tr key = {attendance.attendanceId}>
                                              <td> {attendance.attendanceId} </td>   
                                             <td> {attendance.studentUsername} </td>   
                                             <td> {attendance.date}</td>

                                             
                                        </tr>
                                    )
                                }
                            </tbody>
                        </table></div>
                 </div>

             {/* <Cards/> */}
            </div>
        )
    }
}

export default Attendance
<file_sep>import React, { Component } from 'react'
import StudentNavbar from './StudentNavbar'
import '../css/ViewProgress.css'
import ProgressService from '../services/ProgressService'

class ViewProgress extends Component {
    constructor(props) {
        super(props)

        this.state = {
            score: 0,
            tests: []
        }


    }



    componentDidMount() {
        ProgressService.getTestsForStudent(5).then((res) => {
            console.log(res.data);
            this.setState({ tests: res.data });
        });
    }


    render() {

        return (
            <div>
                <StudentNavbar />
                
                {/* <div className="progressBar"> 
                     <h2 className="text-center">Progress</h2> 
                     <div class="progress">
                        {this.state.tests.map(
                            test =>
                                
                               
                                 <div class="progress-bar bg-success" role="progressbar" style={{ width: "{test.score}" }} aria-valuenow="30" aria-valuemin="0" aria-valuemax="100"></div>
                            )
                            

                        }
                        <div class="progress-bar" role="progressbar" style={{ width: "15%" }} aria-valuenow="15" aria-valuemin="0" aria-valuemax="100"></div>
                        <div class="progress-bar bg-success" role="progressbar" style={{ width: "30%" }} aria-valuenow="30" aria-valuemin="0" aria-valuemax="100"></div>
                        <div class="progress-bar bg-info" role="progressbar" style={{ width: "20%" }} aria-valuenow="20" aria-valuemin="0" aria-valuemax="100"></div>  
                    </div> */}

                <br></br>
                 <div className = "row">
                        <div className="progress-table">
                        <h2 className="text-center">Progress</h2>
                        <table className = "table table-striped table-bordered">

                            <thead>
                                <tr>
                                    <th> Test Name</th>
                                    <th> Score</th>
                                    <th> Total Score</th>
                                </tr>
                            </thead>
                            <tbody>
                                {
                                    this.state.tests.map(
                                        test => 
                                        <tr key = {test.testId}>
                                              <td> {test.t_name} </td>   
                                             <td> {test.score} </td>   
                                             <td> {test.totalScore}</td>
                                               {/* <td>
                                                  <button className="btn btn-info">Update </button>
                                                 <button style={{marginLeft: "10px"}}  className="btn btn-danger">Delete </button> 
                                                 <button style={{marginLeft: "10px"}}  className="btn btn-info">View </button>
                                             </td>   */}
                                        </tr>
                                    )
                                }
                            </tbody>
                        </table> 
                        </div> 
                 </div>

                </div>
            // </div>
        )
    }
}

export default ViewProgress
<file_sep>import React from 'react';
import '../css/Cards.css';
import CardItem from './CardItem';
import hm1 from '../images/hm1.png'
import hm2 from '../images/hm2.png'
import hm3 from '../images/hm3.png'
 
function HmCard() {
  return (
    <div className='cards'>
      <h3 className= 'studentdash'> Welcome </h3>
      <div className='cards__container'>
        <div className='cards__wrapper'>
          <ul className='cards__items'>
            <CardItem
              src={hm1}
              text='Teachers dont just teach they prepare us for the road ahead....'
              label='Teachers'              
              path="/teacher-list"
            />
            <CardItem
              src={hm2}
              text='Strive for progress, not perfection.'
              label='Students'
              path='/hm-student-list'
            />
            <CardItem
              src={hm3}
              text='A Session is an oral presentation to teach people.'
              label='Sessions'
              path='/hm-show-session'
            />
          </ul>
        </div>
      </div>
    </div>
  );
}
 
export default HmCard;<file_sep>import React, { Component } from 'react'
import SessionService from '../services/SessionService';

class CreateSessionComponent extends Component {

    constructor(props) {
        super(props)

        this.state = {
            // step 2
            sessionId: this.props.match.params.sessionId,
            coursename: '',
             stime: ''
           // emailId: ''
        }
        
        this.changeCoursenameHandler = this.changeCoursenameHandler.bind(this);
        this.changeStimeHandler = this.changeStimeHandler.bind(this);
        this.saveOrUpdateSession = this.saveOrUpdateSession.bind(this);
    }

    componentDidMount() {
        if (this.state.sessionId === '_add') {
                return
        } else {
            SessionService.findSessionById(this.state.sessionId).then((res) => {
                let sessionSchedule = res.data;
                this.setState({
                    userName:sessionSchedule.coursename,
                    stime: sessionSchedule.stime,
                   // quantity: sessionSchedule.quantity,
                    //quotePrice: sessionSchedule.quotePrice,
                });
            });
        }
    }

    saveOrUpdateSession = (e) => {
        e.preventDefault();
        let sessionSchedule = { coursename: this.state.coursename,stime: this.state.stime }; //product: this.state.product
        console.log('sessionSchedule => ' + JSON.stringify(sessionSchedule));
        
        if(this.state.sessionId === '_add'){
            SessionService.createSession(sessionSchedule).then(res =>{
                this.props.history.push('/session');
            });
        }else{
            SessionService.updateSession(sessionSchedule, this.state.sessionId).then( res => {
                this.props.history.push('/session');
            });
        }
        
    }    

    changeCoursenameHandler = (event) => {
        this.setState({ coursename: event.target.value });
    }

    changeStimeHandler = (event) => {
        this.setState({ stime: event.target.value });
    }
/*
    addSession() {
        this.props.history.push('/add-session/_add');
    }
*/
    cancel() {
        this.props.history.push('/session');
    }

    getTitle(){
        if(this.state.sessionId === '_add'){
            return <h3 className="text-center">Add Session</h3>
        }else{
            return <h3 className="text-center">Update Session</h3>
        }
    }
   
    /*
    componentDidMount() {
        fetch('http://localhost:8081/api/v1/addStudent')
            .then(response => response.json())
            .then(student => this.setState({ student: student }))
    }
    */
    render() {
        return (
            <div>
                <br></br>
                <div className="container">
                    <div className="row">
                    <div className = "card col-md-6 offset-md-3 offset-md-3">
                                {
                                    this.getTitle()
                                }
        
                            <div className="card-body">
                            <form>
                                        <div className = "form-group">
                                            <label> Course Name: </label>
                                            <input placeholder="Course Name" name="coursename" className="form-control" 
                                                value={this.state.coursename} onChange={this.changeCoursenameHandler}/>
                                        </div>
                                        <div className = "form-group">
                                            <label> Session Time: </label>
                                            <input placeholder="Session Time" name="stime" className="form-control" 
                                                value={this.state.stime} onChange={this.changeStimeHandler}/>
                                        </div>
                                        
                                        <button className="btn btn-success" onClick={this.saveOrUpdateSession}>Save</button>
                                        <button className="btn btn-danger" onClick={this.cancel.bind(this)} style={{marginLeft: "10px"}}>Cancel</button>
                                    </form>
                                  
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        )
    }


}
export default CreateSessionComponent

<file_sep>import React from 'react';
import '../css/Footer.css';
import { Button } from './Button';
import { Link } from 'react-router-dom';
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faPhone, faEnvelope, faLock, faUndo, faUserPlus, faUser, faUsers,faAddressCard,faMapMarker } from "@fortawesome/free-solid-svg-icons";

function Footer() {
  return (
    <div className='footer-container'>
      <section className='footer-subscription'>
        <p className='footer-subscription-heading'>
         
        </p>
        <p className='footer-subscription-text'>
          
        </p>
      
      </section>
      <div class='footer-links'>
        <div className='footer-link-wrapper'>
          <div class='footer-link-items'>
            <h2>About Us</h2>
            <Link to='/'>Added Flexibility and Self-Paced Learning.</Link>
            <Link to='/'> Better Time Management </Link>
            <Link to='/'>Improved Virtual Communication and Collaboration</Link>
            
            <Link to='/about'>Refined Critical-thinking Skills</Link>
            
          </div>
          <div class='footer-link-items'>
            <h2><Link to="/"></Link>Contact Us</h2>
            <Link to='/'>
              <FontAwesomeIcon icon={faMapMarker} />
               &nbsp;Address</Link> 
            <Link to='/'>4321 California St, San Francisco, CA 12345</Link>
            <Link to='/'>
               <FontAwesomeIcon icon={faPhone} />
                &nbsp; Phone</Link> 
            <Link to='/'> +1 123 456 1234</Link>
            <Link to='/'> 
            <FontAwesomeIcon icon={faEnvelope} />
            &nbsp; Email</Link>
            <Link to='/'><EMAIL></Link>
            
          </div>
        </div>
       
      </div>
      <section class='social-media'>
        <div class='social-media-wrap'>
          <div class='footer-logo'>
            <Link to='/' className='social-logo'>
              Educare
              <i class='fab fa-typo3' />
            </Link>
          </div>
          <small class='website-rights'>Educare © 2021</small>
          <div class='social-icons'>
            <Link
              class='social-icon-link facebook'
              to='/'
              target='_blank'
              aria-label='Facebook'
            >
              <i class='fab fa-facebook-f' />
            </Link>
            <Link
              class='social-icon-link instagram'
              to='/'
              target='_blank'
              aria-label='Instagram'
            >
              <i class='fab fa-instagram' />
            </Link>
            <Link
              class='social-icon-link youtube'
              to='/'
              target='_blank'
              aria-label='Youtube'
            >
              <i class='fab fa-youtube' />
            </Link>
            <Link
              class='social-icon-link twitter'
              to='/'
              target='_blank'
              aria-label='Twitter'
            >
              <i class='fab fa-twitter' />
            </Link>
            <Link
              class='social-icon-link twitter'
              to='/'
              target='_blank'
              aria-label='LinkedIn'
            >
              <i class='fab fa-linkedin' />
            </Link>
          </div>
        </div>
      </section>
    </div>
  );
}

export default Footer;
<file_sep>import React, { Component } from 'react'
import TeacherService from '../services/TeacherService'
import '../css/ListTeachers.css'
import HmNavbar from './HmNavbar'


class ListTeachers extends Component {
    constructor(props) {
        super(props)

        this.state = {
                teachers: []
        }
    }

    
    componentDidMount(){
        TeacherService.getTeachers().then((res) => {
            console.log(res.data);
            this.setState({ teachers: res.data});
        });
    }


    render() {
        return (
            <div>
                <HmNavbar/>
                 {/* <h2 className="text-center">Student List</h2> */}
                 {/* <div className = "row">
                    <button className="btn btn-primary"> Add Student</button>
                 </div> */}
                 <br></br>
                 <div className = "row">
                        <div className="teacher-table">
                        <h2 className="text-center">Teacher List</h2>
                        <table className = "table table-striped table-bordered">

                            <thead>
                                <tr>
                                    <th> Teacher Id</th>
                                    <th> Username</th>
                                    <th> Password</th>
                                </tr>
                            </thead>
                            <tbody>
                                {
                                    this.state.teachers.map(
                                        teacher => 
                                        <tr key = {teacher.teacherId}>
                                            <td> {teacher.teacherId}</td>
                                             <td> {teacher.userName}</td>
                                             <td> {teacher.password}</td>

                                               
                                        </tr>
                                    )
                                }
                            </tbody>
                        </table>
                        </div>
                 </div>

            </div>
        )
    }
}

export default ListTeachers
<file_sep>import React from 'react';
import '../App.css';
import HmCard from './HmCard';
import HmNavbar from './HmNavbar';
 
function HmHome() {
  return (
    <>
    <HmNavbar/>
    <HmCard/>
      
    </>
  );
}
 
export default HmHome;<file_sep>import React, { Component } from 'react'
import SessionService from '../services/SessionService'
import "../css/ListSession.css";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faHome, faUserGraduate, faUserCog, faTrashAlt,faEdit,faPhone, faEnvelope, faLock, faUndo, faUserPlus, faUser, faLaptopHouse, faLaptopCode } from "@fortawesome/free-solid-svg-icons";
import { Link } from 'react-router-dom';
import HmNavbar from './HmNavbar';


class HmViewSessionListComponent extends Component {
    constructor(props) {
        super(props)

        this.state = {
                session: []
        }
        this.addSession = this.addSession.bind(this);
        this.editSession = this.editSession.bind(this);
        this.deleteSession = this.deleteSession.bind(this);
    }
    
  deleteSession(sessionId) {
      SessionService.deleteSession(sessionId).then(res =>{
          this.setState({session:this.state.session.filter(sessionSchedule => sessionSchedule.sessionId !==sessionId)});
      });
  }

  viewSession(sessionId) {
    this.props.history.push(`/view-session/${sessionId}`);
}

editSession(sessionId) {
    this.props.history.push(`/add-session/${sessionId}`);
}

    componentDidMount(){
        
          SessionService.getAllSession().then((res) => {
            console.log("service ");
          this.setState({ session: res.data });
      
        });
    }

    addSession(){
        this.props.history.push('/add-session/_add');
}
    /*
    componentDidMount(){
        //PurchaseService.getPurchase().then((res) => {
          //  this.setState({ purchase: res.data});
          SessionService.getAllTeacher().then((res) => {
            console.log("service ");
          this.setState({ session: res.data });
      
        });
    }
    */

    
    addSession() {
        this.props.history.push('/add-session/_add');
    }

    
    redirect = () => {
    window.location.href = 'http://ec2-18-191-253-178.us-east-2.compute.amazonaws.com:8080';
    // maybe can add spinner while loading
    return null;
  }
    
    
    render(){
        return(
            <div>
            <HmNavbar/>
            <div className="body_wrap ">
            <div>
            <h2 className="box_title">Session List (Timetable)</h2>
            <div className = "row">
               {/* <button className="btn btn-primary" onClick={this.addSession}> Add Session</button> */}
               <button className="btn btn-primary" onClick={this.redirect}> Go to chat</button>
            </div>
            <br></br>
            <div className = "row">
                   <table className = "table table-striped table-bordered">

                       <thead>
                           <tr>
                               <th> Session Course Name</th>
                               <th> Session Time</th>
                              
                               <th> Actions</th>
                           </tr>
                       </thead>
                      <tbody>
                           {
                               this.state.session.map(
                                   student => 
                                   <tr key = {student.sessionId}>
                                        <td> { student.coursename} </td>   
                                        <td> {student.stime}</td>
                                        
                                        <td>
                                            {/* <button onClick={ () => this.editSession(student.sessionId)} className="btn btn-info">Update </button>
                                            <button style={{marginLeft: "10px"}} onClick={ () => this.deleteSession(student.sessionId)} className="btn btn-danger">Delete </button> */}
                                            <button style={{marginLeft: "10px"}} onClick={ () => this.viewSession(student.sessionId)} className="btn btn-info">View </button>
                                        </td>
                                   </tr>
                               )
                           }
                        </tbody> 
                   </table>

            </div>

       </div>
       </div>
       </div>
        )
        

    }


}
export default HmViewSessionListComponent
<file_sep>import axios from 'axios';

const PROGRESS_API_BASE_URL = "http://ec2-18-191-253-178.us-east-2.compute.amazonaws.com:8080/api/educationsystem/student";

class ProgressService {

    getTestsForStudent(studentId){
        return axios.get(PROGRESS_API_BASE_URL + "/view-tests/" + studentId);
        
    }

   
}

export default new ProgressService()
<file_sep>import React from 'react';
import './App.css';
import { BrowserRouter as Router, Route } from 'react-router-dom'

import Home from './components/Home';
import ListStudents from './components/ListStudents';
import ListTeachers from './components/ListTeachers';
import ViewProgress from './components/ViewProgress';
import StudentRegistration from './components/StudentRegistration';
import StudentLogin from './components/StudentLogin';
import AdminLogin from './components/AdminLogin';
import TeacherLogin from './components/TeacherLogin';
import StudentHome from './components/StudentHome';
import TeacherHome from './components/TeacherHome';
import Test from './components/Test';
import AttemptTest from './components/AttemptTest';
import TestQuestion from './components/TestQuestion';
import AddTest from './components/AddTest';
import Attendance from './components/Attendance';
import ListSessionComponent from './components/ListSessionComponent';
import HmHome from './components/HmHome';
import StudentViewSessionListComponent from './components/StudentViewSessionListComponent';
import HmViewSessionListComponent from './components/HmViewSessionListComponent';
import HmViewStudents from './components/HmViewStudents';
import Services from './components/Services';
import Products from './components/Products';
import Organics from './components/Organics';
import SignUp from './components/SignUp';
import Shiftings from './components/Shiftings';
import SubmitTest from './components/SubmitTest';
import CreateSessionComponent from './components/CreateSessionComponent';
import ViewSessionComponent from './components/ViewSessionComponent';
import UpdateSessionComponent from './components/UpdateSessionComponent';

function App() {
  return (
    <div>
      <Router>

        <Route path='/' exact component={Home} />
        <Route path='/student-list' exact component={ListStudents} />
        <Route path='/hm-student-list' exact component={HmViewStudents} />
        <Route path='/teacher-list' exact component={ListTeachers} />
        <Route path='/progress' exact component={ViewProgress} />
        <Route path='/registration' exact component={StudentRegistration} />
        <Route path='/student-login' exact component={StudentLogin} />
        <Route path='/admin-login' exact component={AdminLogin} />
        <Route path='/teacher-login' exact component={TeacherLogin} />
        <Route path='/studentdash' component={StudentHome} />
        <Route path='/teacherdash' component={TeacherHome} />
        <Route path='/hmdash' component={HmHome} />
        <Route exact path="/add-test" component={AddTest} />
        <Route exact path="/submit" component={SubmitTest} />
        <Route exact path="/attempt-test" component={AttemptTest} />
        <Route exact path="/test" component={Test} />
        <Route exact path="/test-question" component={TestQuestion} />
        <Route exact path="/attendance" component={Attendance} />
        <Route exact path="/session" component={ListSessionComponent} />
        <Route exact path="/show-session" component={StudentViewSessionListComponent} />
        <Route exact path="/hm-show-session" component={HmViewSessionListComponent} />
        <Route path='/services' component={Services} />
        <Route path='/products' component={Products} />
        <Route path='/organics' component={Organics} />
        <Route path='/sign-up' component={SignUp} />
        <Route path='/shiftings' component={Shiftings} />
        <Route path = "/add-session/:sessionId" component = {CreateSessionComponent}></Route>
        <Route path = "/view-session/:sessionId" component = {ViewSessionComponent}></Route>
        <Route path = "/update-session/:sessionId" component = {UpdateSessionComponent}></Route>
      </Router>
    </div>

  );
}

export default App;<file_sep>import React, { Component } from "react";
import logo from "../images/test.jpg";
// import avtar from "../images/avatar.svg";
import { Link } from "react-router-dom";
import StudentNavbar from "./StudentNavbar";
import Footer from "./Footer";
import "../css/Test.css";

class Test extends Component {
  constructor(props) {
    super(props);
    this._onButtonClick = this._onButtonClick.bind(this);
  }

  _onButtonClick() {
    window.open("/attempttest");
  }
 
  render() {
    return (
      <div>
        <StudentNavbar/>
        <img src={logo} className="wave" alt="logo" />
        <div className="container-fluid">
          <div className="row">
            <div className="col">
              <div className="test-container">
                {/* <img src={avtar} className="avatar" alt="avtar" /> */}
              </div>
              <div className="div-welcome">
              <b><h2 className="h2"> Begin the Quiz</h2></b>
              </div>
              <br />
              <div className="div-instruct">
                <h3 className="h3"> Instructions Before Proceeding </h3> <hr />
                <ol>
                  <li className="li">
                    Please read all the questions carefully.
                  </li>
                  <li className="li">No use of calculators are allowed.</li>
                  <li className="li">
                    Do not minimize the screen or switch to other tabs.
                  </li>
                  <li className="li">
                    Total Duration of examination is 30 minutes.
                  </li>
                  <li className="li">
                    Number of Questions : 10 with <u>1 mark each.</u>
                  </li>
                </ol>
              </div>
              <br />
              <div className="div-btn">
                <Link to="/attempt-test">
                  <button className="float-left btn btn-primary btn-block rounded-pill submit-button">
                    Begin Test
                  </button>
                </Link>
              </div>
            </div>
          </div>
        </div>
      </div>
    );
  }
}

export default Test;
<file_sep>import React from 'react';
import '../App.css';
import Navbar from './Navbar';

function Services() {
  
  //<p className='services'>Read The Article about Organic Farming</p>
  return (
    <>
    <Navbar/>
    {/*<h4 style={{"color":"white","textAlign":"center"}}>Read The Article about Computer Managed Learning</h4>*/}
  <p className='services'><a style={{"color":"white" }} href="https://educationaltechnologyjournal.springeropen.com/articles/10.1186/s41239-017-0063-0">Article For Computer Managed Learning</a></p>;
  </>
  );
}
export default Services;<file_sep>import React, { Component } from "react";
import { connect } from "react-redux";
import { Link } from "react-router-dom";
import Navbar from "./Navbar";
import Footer from "./Footer";

class Result extends Component{
    render() {
        return (
    <div className="div-btn">
                     <div className="mb-3 row">
                       <label htmlFor="score" className="col-sm-4 col-form-label">
                        Score
                      </label>
                    </div>
                    </div>

        );
    }

}<file_sep>import React from 'react';
import '../css/Cards.css';
import CardItem from './CardItem';
import im8 from '../images/img8.jpg';
import im9 from '../images/img9.jpg';
import im10 from '../images/img10.jpg';
 
function TeacherCard() {
  return (
    <div className='cards'>
      <h3 className= 'studentdash'> Welcome </h3>
      <div className='cards__container'>
        <div className='cards__wrapper'>
          <ul className='cards__items'>
            <CardItem
              src={im8}
              text='A Session is an oral presentation to teach people'
              label='Sessions'              
              path="/session"
            />
            <CardItem
              src={im9}
              text='Dont watch the clock. Do what it does....'
              label='Tests'
              path='/add-test'
            />
            <CardItem
              src={im10}
              text='"Attend today, and achieve tomorrow.” ....'
              label='Attendance'
              path='/attendance'
            />
          </ul>
        </div>
      </div>
    </div>
  );
}
 
export default TeacherCard;<file_sep>import React, { Component } from 'react'
import SessionService from '../services/SessionService';

class UpdateSessionComponent extends Component {
    constructor(props) {
        super(props)

        this.state = {
            sessionId: this.props.match.params.sessionId,
            coursename: '',
            stime: '',
            //emailId: ''
        }
        this.changeCoursenameHandler = this.changeCoursenameHandler.bind(this);
        this.changeStimeHandler = this.changeStimeHandler.bind(this);
        this.updateSession = this.updateSession.bind(this);
    }

    componentDidMount(){
        SessionService.findSessionById(this.state.sessionId).then( (res) =>{
            let sessionSchedule = res.data;
            this.setState({coursename: sessionSchedule.coursename,
                stime: sessionSchedule.stime,
                //emailId : employee.emailId
            });
        });
    }

    updateSession = (e) => {
        e.preventDefault();
        let sessionSchedule = {coursename: this.state.coursename, stime: this.state.stime};
        console.log('sessionSchedule => ' + JSON.stringify(sessionSchedule));
        console.log('sessionId => ' + JSON.stringify(this.state.sessionId));
        SessionService.updateSession(sessionSchedule, this.state.sessionId).then( res => {
            this.props.history.push('/session');
        });
    }
    
    changeCoursenameHandler= (event) => {
        this.setState({coursename: event.target.value});
    }

    changeStimeHandler= (event) => {
        this.setState({stime: event.target.value});
    }

    

    cancel(){
        this.props.history.push('/session');
    }

    render() {
        return (
            <div>
                <br></br>
                   <div className = "container">
                        <div className = "row">
                            <div className = "card col-md-6 offset-md-3 offset-md-3">
                                <h3 className="text-center">Update Session</h3>
                                <div className = "card-body">
                                    <form>
                                        <div className = "form-group">
                                            <label> Course Name: </label>
                                            <input placeholder="course Name" name="coursename" className="form-control" 
                                                value={this.state.coursename} onChange={this.changeCoursenameHandler}/>
                                        </div>
                                        <div className = "form-group">
                                            <label> Session Time: </label>
                                            <input placeholder="Session Time" name="stime" className="form-control" 
                                                value={this.state.stime} onChange={this.changeStimeHandler}/>
                                        </div>
                                        
                                        <button className="btn btn-success" onClick={this.updateSession}>Save</button>
                                        <button className="btn btn-danger" onClick={this.cancel.bind(this)} style={{marginLeft: "10px"}}>Cancel</button>
                                    </form>
                                </div>
                            </div>
                        </div>

                   </div>
            </div>
        )
    }
}

export default UpdateSessionComponent
<file_sep>import React, { Component } from "react";

import TeacherNavbar from "./TeacherNavbar";


class SubmitTest extends Component {
  
  componentDidMount() {
   
  }

  componentDidUpdate() {
    
  }
  
  submit(){
    this.props.history.push('/teacherdash');
  }

  render() {
    return (
      <div>
        <TeacherNavbar/>
      <div className="container mt-5">
        <div className="row">
          <div className="col">
            <form className="form-group">
            <div className="mb-3 row">
                <label htmlFor="questionId" className="col-sm-4 col-form-label">
                  Test Name
                </label>
                <div className="col-sm-5">
                  <input
                    type="text"
                    className="form-control form-control-sm"
                    ref={this.testName}
                    id="questionId"
                  />
                </div>
              </div>
             
              <button
                style = {{"marginLeft":"380px"}}
                className="btn btn-success mr-5"
                onClick={this.submit.bind(this)}
              >
                Submit
              </button>
              
            </form>
          </div>
        </div>
      </div>
      </div>
    );
  }
}

export default SubmitTest;
<file_sep>import React from 'react';
import '../css/Cards.css';
import CardItem from './CardItem';
import a1 from '../images/a1.jpeg';
import im5 from '../images/im5.jpg';
import im4 from '../images/img4.png';

function StudentCard() {
  return (
    <div className='cards'>
      <h3 className= 'studentdash'> Welcome Students </h3>
      <div className='cards__container'>
        <div className='cards__wrapper'>
          <ul className='cards__items'>
            <CardItem
              src={a1}
              text='A Session is an oral presentation to teach people'
              label='Sessions'              
              path="/show-session"
            />
            <CardItem
              src={im5}
              text='Dont watch the clock. Do what it does....'
              label='Tests'
              path='/test'
            />
            <CardItem
              src={im4}
              text='If there is no struggle, there is no progress.'
              label='Progress'
              path='/progress'
            />
          </ul>
        </div>
      </div>
    </div>
  );
}

export default StudentCard;
<file_sep>import React from 'react';
import '../css/Cards.css';
import CardItem from './CardItem';
import im1 from '../images/im1.png'
import im2 from '../images/im2.png'
import im6 from '../images/im6.png'
import im5 from '../images/im5.png'
import im4 from '../images/im4.png'


function Cards() {
  return (
    <div className='cards'>
      <h1>Some Interesting Fatcts Of Online Education System!</h1>
      <div className='cards__container'>
        <div className='cards__wrapper'>
          <ul className='cards__items'>
            <CardItem
              src={im1}
              text='System is a suite of computer programs for MS​-DOS'
              label='Computer Managed'              
              to="https://www.britannica.com/topic/shifting-agriculture"
              path="/services"
            />
            <CardItem
              src= {im2}
              text='interact in a specific virtual place at a set time'
              label='Synchronous Online Learning'
              path='/products'
            />
          </ul>
          <ul className='cards__items'>
            <CardItem
              src={im6}
              text='Take a more non-traditional approach'
              label='ASynchronous Online Learning'              
              path="/sign-up"
            />
            <CardItem
              src={im5}
              text='Set of techniques oriented to offer online students'
              label='Adaptive E-Learning'
              path='/organics'
            />
            <CardItem
              src= {im4}
              text='Uses a traditional structure of passing down information to students'
              label='Fixed E-Learning'
              path='/shiftings'
            />
          </ul>
        </div>
      </div>
    </div>
  );
}

export default Cards;
<file_sep>import axios from 'axios';

const ATTENDANCE_API_BASE_URL = "http://ec2-18-191-253-178.us-east-2.compute.amazonaws.com:8080/api/educationsystem/attendance";

class AttendanceService {

    getAttendance(){
        return axios.get(ATTENDANCE_API_BASE_URL + "/view-all-attendance");
    }

    

   
}

export default new AttendanceService()
<file_sep>import React from 'react';
import '../App.css';
import StudentCard from './StudentCard';
import StudentNavbar from './StudentNavbar';

function StudentHome() {
  return (
    <>
      <StudentNavbar/>
      <StudentCard/>
      
    </>
  );
}

export default StudentHome;
<file_sep>import React, { Component } from 'react'
import StudentService from '../services/StudentService'
import '../css/ListStudents.css'
import HmNavbar from './HmNavbar'
import Cards from './Cards'

class HmViewStudents extends Component {
    constructor(props) {
        super(props)

        this.state = {
                students: []
        }
    }

    
    componentDidMount(){
        StudentService.getStudents().then((res) => {
            console.log(res.data);
            this.setState({ students: res.data});
        });
    }


    render() {
        return (
            <div>
                <HmNavbar/>
                 {/* <h2 className="text-center">Student List</h2> */}
                 {/* <div className = "row">
                    <button className="btn btn-primary"> Add Student</button>
                 </div> */}
                 <br></br>
                 <div className = "row">
                        <div className="student-table">
                        <h2 className="text-center">Student List</h2>
                        <table className = "table table-striped table-bordered">

                            <thead>
                                <tr>
                                    <th> Student Id</th>
                                    <th> First Name</th>
                                    <th> Middle Name</th>
                                    <th> Last Name</th>
                                    <th> Email Id</th>
                                    <th> Username</th>
                                </tr>
                            </thead>
                            <tbody>
                                {
                                    this.state.students.map(
                                        student => 
                                        <tr key = {student.studentId}>
                                              <td> { student.studentId} </td>   
                                             <td> { student.firstName} </td>   
                                             <td> {student.middleName}</td>
                                             <td> {student.lastName}</td>
                                             <td> {student.emailId}</td>
                                             <td> {student.userName}</td>

                                               <td>
                                                 {/* <button className="btn btn-info">Update </button>
                                                 <button style={{marginLeft: "10px"}}  className="btn btn-danger">Delete </button> */}
                                                 <button style={{marginLeft: "10px"}}  className="btn btn-info">View </button>
                                             </td>  
                                        </tr>
                                    )
                                }
                            </tbody>
                        </table></div>
                 </div>

             {/* <Cards/> */}
            </div>
        )
    }
}

export default HmViewStudents
