Skip to content

Commit

Permalink
Allow putting a box around the iframes
Browse files Browse the repository at this point in the history
  • Loading branch information
nygrenh committed Nov 8, 2023
1 parent c10ae96 commit 0f7a753
Show file tree
Hide file tree
Showing 11 changed files with 332 additions and 348 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ const ExerciseTaskEditor: React.FC<
exerciseTaskId={attributes.id}
onPrivateSpecChange={(x) => setAttributes({ private_spec: x })}
privateSpec={privateSpecToPostToIframe}
url={`${url}?width=${narrowContainerWidthPx}`}
url={url}
/>
)}
</ExerciseTaskEditorCard>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { CourseMaterialExerciseTask } from "../../../../shared-module/bindings"
import LoginStateContext from "../../../../shared-module/contexts/LoginStateContext"
import { IframeState } from "../../../../shared-module/exercise-service-protocol-types"
import { baseTheme } from "../../../../shared-module/styles"
import { narrowContainerWidthPx } from "../../../../shared-module/styles/constants"

import ExerciseTaskIframe from "./ExerciseTaskIframe"

Expand Down Expand Up @@ -63,7 +62,7 @@ const ExerciseTask: React.FC<React.PropsWithChildren<ExerciseTaskProps>> = ({
<ExerciseTaskIframe
exerciseServiceSlug={exerciseTask.exercise_service_slug}
postThisStateToIFrame={postThisStateToIFrame}
url={`${url}?width=${narrowContainerWidthPx}`}
url={url}
setAnswer={setAnswer}
title={t("exercise-task-content", {
"exercise-number": exerciseNumber + 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import PeerReviewProgress from "../../../../../shared-module/components/PeerRevi
import Spinner from "../../../../../shared-module/components/Spinner"
import LoginStateContext from "../../../../../shared-module/contexts/LoginStateContext"
import useToastMutation from "../../../../../shared-module/hooks/useToastMutation"
import { narrowContainerWidthPx } from "../../../../../shared-module/styles/constants"
import getGuestPseudonymousUserId from "../../../../../shared-module/utils/getGuestPseudonymousUserId"
import { exerciseTaskGradingToExerciseTaskGradingResult } from "../../../../../shared-module/utils/typeMappter"
import ExerciseTaskIframe from "../ExerciseTaskIframe"
Expand Down Expand Up @@ -227,7 +226,7 @@ const PeerReviewViewImpl: React.FC<React.PropsWithChildren<PeerReviewViewProps>>
model_solution_spec: course_material_exercise_task.model_solution_spec,
},
}}
url={`${course_material_exercise_task.exercise_iframe_url}?width=${narrowContainerWidthPx}`}
url={course_material_exercise_task.exercise_iframe_url ?? ""}
setAnswer={null}
title={t("exercise-task-content", {
"exercise-number": exerciseNumber + 1,
Expand Down
Loading

0 comments on commit 0f7a753

Please sign in to comment.