Skip to content

Commit 03b83cb

Browse files
committed
Contest code view functionality
1 parent 8b47473 commit 03b83cb

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/commons/assessmentWorkspace/AssessmentWorkspace.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,18 @@ const AssessmentWorkspace: React.FC<AssessmentWorkspaceProps> = props => {
448448
const handleContestEntryClick = (_submissionId: number, answer: string) => {
449449
// TODO: Hardcoded to make use of the first editor tab. Refactoring is needed for this workspace to enable Folder mode.
450450
handleEditorValueChange(0, answer);
451+
// Hacky way to view the editor, might cause issues
452+
sendToWebview(
453+
Messages.NewEditor(
454+
workspaceLocation,
455+
`submission${_submissionId}`,
456+
questionId,
457+
question.library.chapter,
458+
"",
459+
answer
460+
)
461+
);
462+
//
451463
};
452464

453465
const tabs: SideContentTab[] = [

0 commit comments

Comments
 (0)