Skip to content

Commit

Permalink
Merge pull request #594 from all-rit/573-story-create-quiz-service
Browse files Browse the repository at this point in the history
573 Story to Create Quiz Service
  • Loading branch information
AndreasLc1103 committed Apr 22, 2024
2 parents 43debc7 + 1dc4c54 commit 16b590c
Show file tree
Hide file tree
Showing 42 changed files with 2,710 additions and 3,993 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ client/build
# misc
.env.local
.env.development.local
.env.test.local
.env.test
.env.production.local

### macOS ###
Expand Down
2 changes: 1 addition & 1 deletion client/public/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand Down
3 changes: 1 addition & 2 deletions client/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,8 @@ const App = () => {
path={`/Lab${lab}/Quiz`}
labId={lab}
user={state.main.user}
isFinalQuiz
isFinalQuiz={true}
hideCertificate={false}
submitData={() => {}}
quizCompleted={quizCompleted}
setQuizCompleted={setQuizCompleted}
/>
Expand Down
20 changes: 16 additions & 4 deletions client/src/assets/stylesheets/components/Header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,19 @@

#all-header-text {
color: #fed136;
font-family: "Calibri", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
"Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
"Segoe UI Symbol", "Noto Color Emoji";
font-family:
"Calibri",
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
Roboto,
"Helvetica Neue",
Arial,
sans-serif,
"Apple Color Emoji",
"Segoe UI Emoji",
"Segoe UI Symbol",
"Noto Color Emoji";
font-size: 30px;
margin-left: -15px;
margin-top: -10px;
Expand Down Expand Up @@ -100,7 +110,9 @@
.labnav {
// padding-top: 0.8rem;
padding-bottom: 0.8rem;
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
box-shadow:
0 14px 28px rgba(0, 0, 0, 0.25),
0 10px 10px rgba(0, 0, 0, 0.22);
}

.nav-last {
Expand Down
4 changes: 3 additions & 1 deletion client/src/assets/stylesheets/pages/quiz.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@
}

.answerOption:hover {
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
box-shadow:
0 10px 20px rgba(0, 0, 0, 0.19),
0 6px 6px rgba(0, 0, 0, 0.23);
}

.checkboxCustomButton {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import React, { useEffect, useState } from "react";
import PropTypes from "prop-types";
import { default as Quiz } from "../../../../quiz/components/QuizHandler";
import { EXERCISE_IDLE } from "src/constants/index";
import { navigate } from "@reach/router";
import { MathComponent } from "mathjax-react";
import ExerciseService from "../../../../../services/lab7/ExerciseService";
import useMainStateContext from "src/reducers/MainContext";
import alterationQuizQuestions from "src/constants/lab7/alterationQuestions";

/**
* Renders the Alteration Quiz component.
Expand All @@ -13,7 +15,7 @@ import useMainStateContext from "src/reducers/MainContext";
*/
const AlterationQuiz = () => {
const [showContinue, setShowContinue] = useState(false);
const [quizComplete, setQuizComplete] = useState(false);
const [, setQuizComplete] = useState(false);
const { state: mainState, actions: mainActions } = useMainStateContext();

useEffect(() => {
Expand Down Expand Up @@ -51,8 +53,10 @@ const AlterationQuiz = () => {
hideCertificate
isFinalQuiz={false}
submitData={handleSubmitData}
quizCompleted={quizComplete}
setQuizCompleted={setQuizComplete}
quizQuestions={alterationQuizQuestions}
setQuizCompleted={() => {
return true;
}}
/>
{showContinue && (
<button
Expand All @@ -66,5 +70,8 @@ const AlterationQuiz = () => {
</div>
);
};
AlterationQuiz.propTypes = {
setQuizCompleted: PropTypes.func.isRequired,
};

export default AlterationQuiz;
50 changes: 0 additions & 50 deletions client/src/components/quiz/App.css

This file was deleted.

0 comments on commit 16b590c

Please sign in to comment.