Skip to content

Commit

Permalink
SCRUM-124 Removed extraneous code in backend calls
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammadfadhli committed Sep 18, 2024
1 parent b934a64 commit 3d854db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
9 changes: 1 addition & 8 deletions frontend/iQMA-Skills-Builder/app/Assessment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,14 @@ export default function Assessment() {


// Hardcoded for now until routing confirmed
const isFinal: boolean = true;
const isFinal: boolean = false;
const sectionID = 'SEC0001';
const unitID = 'UNIT0001';

useEffect(() => {
if (isFinal) {
(async () => {
try {
const unitDetails = await unitEndpoints.getUnitDetails(
sectionID as string,
unitID as string
);
setUnitName(unitDetails.unitName);
setUnitScenario(unitDetails.scenario);

const sectionDetails =
await sectionEndpoints.getSectionDetails(
sectionID as string
Expand Down
6 changes: 1 addition & 5 deletions frontend/iQMA-Skills-Builder/helpers/quizEndpoints.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,7 @@ export const getFinalAssessmentQuestions = async (
const response = await fetch(url);
const assessmentQuestions = await response.json();

const filteredQuestions = assessmentQuestions.filter(
(question: any) => !question.isSelfReflection
); // only return questions that are not Self Reflection

return filteredQuestions;
return assessmentQuestions;
} catch (error) {
console.error('Error fetching Final Assessment Questions:', error);
return;
Expand Down

0 comments on commit 3d854db

Please sign in to comment.