@@ -357,7 +357,7 @@ const AssessmentWorkspace: React.FC<AssessmentWorkspaceProps> = props => {
357357 } = { } ;
358358
359359 switch ( question . type ) {
360- case QuestionTypes . programming :
360+ case QuestionTypes . programming : {
361361 const programmingQuestionData : IProgrammingQuestion = question ;
362362 options . autogradingResults = programmingQuestionData . autogradingResults ;
363363 options . programPrependValue = programmingQuestionData . prepend ;
@@ -378,14 +378,16 @@ const AssessmentWorkspace: React.FC<AssessmentWorkspaceProps> = props => {
378378 ) ;
379379 }
380380 break ;
381- case QuestionTypes . voting :
381+ }
382+ case QuestionTypes . voting : {
382383 const votingQuestionData : IContestVotingQuestion = question ;
383384 options . programPrependValue = votingQuestionData . prepend ;
384385 if ( props . fromContestLeaderboard ) options . editorValue = code ;
385386 options . programPostpendValue = votingQuestionData . postpend ;
386387 // maybe the following dispatch can be placed in a better location
387388 dispatch ( LeaderboardActions . setWorkspaceInitialRun ( votingId ) ) ;
388389 break ;
390+ }
389391 case QuestionTypes . mcq :
390392 // Do nothing
391393 break ;
@@ -413,7 +415,7 @@ const AssessmentWorkspace: React.FC<AssessmentWorkspaceProps> = props => {
413415 const questionType = question . type ;
414416
415417 switch ( questionType ) {
416- case QuestionTypes . mcq :
418+ case QuestionTypes . mcq : {
417419 const mcqQuestionData = question ;
418420 sendToWebview (
419421 Messages . McqQuestion (
@@ -425,7 +427,8 @@ const AssessmentWorkspace: React.FC<AssessmentWorkspaceProps> = props => {
425427 )
426428 ) ;
427429 break ;
428- case QuestionTypes . programming || QuestionTypes . voting :
430+ }
431+ case QuestionTypes . programming || QuestionTypes . voting : {
429432 const prepend = question . prepend ;
430433 const code = question . answer ?? question . solutionTemplate ;
431434 const breakpoints = editorTabs [ 0 ] ?. breakpoints ?? [ ] ;
@@ -441,6 +444,7 @@ const AssessmentWorkspace: React.FC<AssessmentWorkspaceProps> = props => {
441444 )
442445 ) ;
443446 break ;
447+ }
444448 }
445449 if ( options . editorValue ) {
446450 // TODO: Hardcoded to make use of the first editor tab. Refactoring is needed for this workspace to enable Folder mode.
0 commit comments