Skip to content

Commit

Permalink
Merge branch 'main' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronshiel committed Sep 19, 2023
2 parents 105de8e + e6556cd commit 2ac06ba
Show file tree
Hide file tree
Showing 27 changed files with 1,436 additions and 63 deletions.
29 changes: 14 additions & 15 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@emotion/react": "^11.10.5",
"@emotion/styled": "^11.10.5",
"@gatsbyjs/reach-router": "^2.0.1",
"@iostindex/gatsby-plugin-material-ui": "^5.0.0",
"@mediapipe/camera_utils": "^0.3.1640029074",
"@mediapipe/control_utils": "^0.6.1629159505",
"@mediapipe/drawing_utils": "^0.3.1620248257",
Expand Down Expand Up @@ -52,8 +53,8 @@
"draft-js": "^0.11.7",
"draftjs-md-converter": "^1.5.2",
"gatsby": "^5.5.0",
"@iostindex/gatsby-plugin-material-ui": "^5.0.0",
"jsonschema": "^1.4.1",
"papaparse": "^5.4.1",
"react": "^18.2.0",
"react-beautiful-dnd": "^13.1.1",
"react-color": "^2.19.3",
Expand All @@ -78,6 +79,7 @@
},
"devDependencies": {
"@types/node": "^18.11.18",
"@types/papaparse": "^5.3.8",
"@types/react-beautiful-dnd": "^13.1.3",
"@types/react-color": "^3.0.6",
"@types/recordrtc": "^5.6.10",
Expand Down
48 changes: 48 additions & 0 deletions client/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@ export async function updateSubject(
categories: subject?.categories,
topics: subject?.topics,
questions: subject?.questions,
deleted: subject?.deleted,
},
},
},
Expand Down Expand Up @@ -1127,6 +1128,53 @@ export async function fetchMentorById(
videoDuration
}
}
orphanedCompleteAnswers {
_id
question {
_id
clientId
mentor
}
hasEditedTranscript
markdownTranscript
transcript
status
hasUntransferredMedia
webMedia {
type
tag
url
transparentVideoUrl
needsTransfer
hash
duration
}
mobileMedia{
type
tag
url
transparentVideoUrl
needsTransfer
hash
duration
}
vttMedia{
type
tag
url
needsTransfer
hash
duration
vttText
}
previousVersions{
transcript
dateVersioned
vttText
webVideoHash
videoDuration
}
}
}
}
`,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
/*
This software is Copyright ©️ 2020 The University of Southern California. All Rights Reserved.
Permission to use, copy, modify, and distribute this software and its documentation for educational, research and non-profit purposes, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and subject to the full license file found in the root of this software deliverable. Permission to make commercial use of this software may be obtained by contacting: USC Stevens Center for Innovation University of Southern California 1150 S. Olive Street, Suite 2300, Los Angeles, CA 90115, USA Email: [email protected]
The full terms of this copyright and license should always be found in the root directory of this software deliverable as "license.txt" and if these terms are not found with this software, please contact the USC Stevens Center for the full license.
*/
import React from "react";
import { Card, CardContent, Typography } from "@mui/material";
import { IgnoredImportedQuestion } from "pages/author/subject/importquestions";

export function IgnoredQuestionItem(props: {
classes: Record<string, string>;
question: IgnoredImportedQuestion;
}): JSX.Element {
const { question } = props;

return (
<Card
elevation={0}
style={{
width: "100%",
}}
>
<CardContent
style={{
display: "flex",
flexDirection: "column",
justifyContent: "space-around",
}}
>
<Typography style={{ alignSelf: "center", margin: "10px" }}>
<span style={{ fontWeight: "bold" }}>Reason: </span>
<span style={{ color: "red", fontWeight: "bold" }}>
{question.question === question.existingQuestion.question.question
? "Question already exists"
: "Paraphrase Match"}
</span>
</Typography>
<div
style={{
display: "flex",
flexDirection: "row",
justifyContent: "space-around",
}}
>
<div
data-cy="ignored-imported-question"
style={{
display: "flex",
flexDirection: "column",
width: "40%",
border: "1px solid #ccc",
borderRadius: 10,
padding: "10px",
height: "fit-content",
}}
>
<Typography style={{ alignSelf: "center", marginBottom: "10px" }}>
<span style={{ fontWeight: "bold" }}>Imported Question</span>
</Typography>
<Typography>
<span style={{ fontWeight: "bold" }}>Question: </span>
{question.question}
</Typography>
{question.paraphrases.length > 0 && (
<Typography>
<span style={{ fontWeight: "bold" }}>Paraphrases: </span>
<ul>
{question.paraphrases.map((p) => {
return <li key={p}>{p}</li>;
})}
</ul>
</Typography>
)}
</div>

<div
data-cy="existing-question"
style={{
display: "flex",
flexDirection: "column",
width: "40%",
border: "1px solid #ccc",
borderRadius: 10,
padding: "10px",
height: "fit-content",
}}
>
<Typography style={{ alignSelf: "center", marginBottom: "10px" }}>
<span style={{ fontWeight: "bold" }}>Existing Question</span>
</Typography>
<Typography>
<span style={{ fontWeight: "bold" }}>Question: </span>
{question.existingQuestion.question.question}
</Typography>
{question.existingQuestion.question.paraphrases.length > 0 && (
<Typography>
<span style={{ fontWeight: "bold" }}>Paraphrases: </span>
<ul>
{question.existingQuestion.question.paraphrases.map((p) => {
return <li key={p}>{p}</li>;
})}
</ul>
</Typography>
)}
</div>
</div>
</CardContent>
</Card>
);
}

export default IgnoredQuestionItem;
Loading

0 comments on commit 2ac06ba

Please sign in to comment.