diff --git a/src/exams/pdf/list.item.tsx b/src/exams/pdf/list.item.tsx
new file mode 100644
index 00000000..8652d6ae
--- /dev/null
+++ b/src/exams/pdf/list.item.tsx
@@ -0,0 +1,24 @@
+import { Text, View, StyleSheet } from "@react-pdf/renderer";
+
+const styles = StyleSheet.create({
+ row: {
+ display: "flex",
+ flexDirection: "row",
+ },
+ bullet: {
+ height: "100%",
+ },
+});
+
+const ListItem = ({ text, textStyle }: { text: string, textStyle: any[] }) => {
+ return (
+
+
+ {"\u2022" + " "}
+
+ {text}
+
+ );
+};
+
+export default ListItem;
diff --git a/src/exams/pdf/test.report.tsx b/src/exams/pdf/test.report.tsx
index df1479d7..58d51a06 100644
--- a/src/exams/pdf/test.report.tsx
+++ b/src/exams/pdf/test.report.tsx
@@ -6,11 +6,17 @@ import { styles } from "./styles";
import { StyleSheet } from "@react-pdf/renderer";
import TestReportFooter from "./test.report.footer";
+import ListItem from "./list.item";
+
const customStyles = StyleSheet.create({
testDetails: {
display: "flex",
gap: 4,
},
+ testDetailsContainer: {
+ display: "flex",
+ gap: 16,
+ },
});
interface Props {
@@ -124,7 +130,7 @@ const TestReport = ({
-
+
@@ -149,15 +155,46 @@ const TestReport = ({
.filter(
({ suggestions, evaluation }) => suggestions || evaluation
)
- .map(({ module, suggestions, evaluation }) => (
-
-
- {module}
-
- {evaluation}
- {suggestions}
-
- ))}
+ .map(
+ ({
+ module,
+ suggestions,
+ evaluation,
+ bullet_points = [],
+ }) => (
+
+
+
+ {module}
+
+ {evaluation}
+ {suggestions}
+
+
+ {bullet_points.length > 0 && (
+ <>
+
+ How to Improve:
+
+
+ {bullet_points.map((text: string) => (
+
+ ))}
+
+ >
+ )}
+
+
+ )
+ )}
@@ -165,7 +202,7 @@ const TestReport = ({
-
+
);
diff --git a/src/interfaces/module.scores.ts b/src/interfaces/module.scores.ts
index 144ed6aa..f46e61e5 100644
--- a/src/interfaces/module.scores.ts
+++ b/src/interfaces/module.scores.ts
@@ -8,6 +8,7 @@ export interface ModuleScore {
png?: string;
evaluation?: string;
suggestions?: string;
+ bullet_points?: string[];
}
export interface StudentData {
diff --git a/src/pages/api/stats/[id]/export.tsx b/src/pages/api/stats/[id]/export.tsx
index ce71d899..7906da63 100644
--- a/src/pages/api/stats/[id]/export.tsx
+++ b/src/pages/api/stats/[id]/export.tsx
@@ -79,6 +79,7 @@ interface SkillsFeedbackRequest {
interface SkillsFeedbackResponse extends SkillsFeedbackRequest {
evaluation: string;
suggestions: string;
+ bullet_points?: string[];
}
const getSkillsFeedback = async (sections: SkillsFeedbackRequest[]) => {
@@ -225,6 +226,7 @@ async function post(req: NextApiRequest, res: NextApiResponse) {
...result,
evaluation: feedback?.evaluation,
suggestions: feedback?.suggestions,
+ bullet_points: feedback?.bullet_points,
};
}