File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
src/commons/assessmentWorkspace Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -239,10 +239,7 @@ const AssessmentWorkspace: React.FC<AssessmentWorkspaceProps> = props => {
239239 */
240240 useEffect ( ( ) => {
241241 checkWorkspaceReset ( ) ;
242- if ( assessment != undefined && question . type == 'voting' ) {
243- dispatch ( LeaderboardActions . setWorkspaceInitialRun ( votingId ) ) ;
244- }
245- } , [ dispatch , assessment ] ) ;
242+ } ) ;
246243
247244 /**
248245 * Handles toggling enabling and disabling token counter depending on assessment properties
@@ -386,6 +383,8 @@ const AssessmentWorkspace: React.FC<AssessmentWorkspaceProps> = props => {
386383 options . programPrependValue = votingQuestionData . prepend ;
387384 if ( props . fromContestLeaderboard ) options . editorValue = code ;
388385 options . programPostpendValue = votingQuestionData . postpend ;
386+ // maybe the following dispatch can be placed in a better location
387+ dispatch ( LeaderboardActions . setWorkspaceInitialRun ( votingId ) ) ;
389388 break ;
390389 case QuestionTypes . mcq :
391390 // Do nothing
You can’t perform that action at this time.
0 commit comments