diff --git a/backend/TE/TakeExercise.php b/backend/TE/TakeExercise.php index cc0b02885c9d9c5b54911bb6c55f9809fb9ac026..167ee6b0c98b0ee6a23e45dbd2f45a85f8dde217 100644 --- a/backend/TE/TakeExercise.php +++ b/backend/TE/TakeExercise.php @@ -316,8 +316,42 @@ class TakeExerciseFrame extends ExerciseFrame $moreSettings[ 'updatedMinutiaeTimestamp' ] = $db->getAssignmentSubmissionTime( $aid, 'ANALYSIS' ); } - if( ! $isTutorReview && $progress[ 'step' ] == 'ANALYSIS' ) - $moreSettings[ 'defaultSuitabilityApproach' ] = $db->getSuitabilityApproach(); + if( ! $isTutorReview ) + { + if( $progress[ 'step' ] == 'ANALYSIS' ) + { + $moreSettings[ 'defaultSuitabilityApproach' ] = $db->getSuitabilityApproach(); + } else if( $progress[ 'step' ] == 'COMPARISON' && $progress[ 'status' ] < 4 ) + { + if( $db->isMarkOfNoValue( $aid ) ) + { + $jsCode .= " + settings[ 'onExerciseStartup' ] = function( pianos, params ) + { + if ( params.phase == 'comparison' ) + { + var dlg = $( '
' ) + .text( 'The latent has been declared as no-value. No comparison is needed in this case.' ); + + pianos.dialog( dlg, { + modal: true, + title: 'Information', + close: function() { + $( this ).remove(); + window.location.href = '?'; + }, + buttons: { + 'Return to the homepage': function() { + $( this ).dialog( 'close' ); + window.location.href = '?'; + } + } + } ); + } + };"; + } + } + } if( isset( $moreSettings ) ) $settings = array_merge( $settings, $moreSettings );