File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
commons/assessmentWorkspace Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -929,6 +929,11 @@ It is safe to close this window.`}
929929 ( assessment ! . questions [ questionId ] as IProgrammingQuestion ) . solutionTemplate
930930 ) ;
931931 handleUpdateHasUnsavedChanges ( true ) ;
932+ if ( isVscode ) {
933+
934+ sendToWebview ( Messages . ResetEditor ( workspaceLocation ,
935+ ( assessment ! . questions [ questionId ] as IProgrammingQuestion ) . solutionTemplate ) ) ;
936+ }
932937 } }
933938 options = { { minimal : false , intent : Intent . DANGER } }
934939 />
Original file line number Diff line number Diff line change @@ -90,6 +90,13 @@ const Messages = createMessages({
9090 questionId,
9191 chapter,
9292 variant
93+ } ) ,
94+ ResetEditor : (
95+ workspaceLocation : VscWorkspaceLocation ,
96+ initialCode : string ,
97+ ) => ( {
98+ workspaceLocation,
99+ initialCode,
93100 } )
94101} ) ;
95102
You can’t perform that action at this time.
0 commit comments