diff --git a/app/assets/javascripts/editor/evaluation.js b/app/assets/javascripts/editor/evaluation.js index 4f81ac27..ce82f10c 100644 --- a/app/assets/javascripts/editor/evaluation.js +++ b/app/assets/javascripts/editor/evaluation.js @@ -7,6 +7,7 @@ CodeOceanEditorEvaluation = { scoreCode: function (event) { event.preventDefault(); this.clearScoringOutput(); + $('#submit').addClass("d-none"); this.createSubmission('#assess', null, function (response) { this.showSpinner($('#assess')); $('#score_div').removeClass('d-none'); @@ -22,6 +23,7 @@ CodeOceanEditorEvaluation = { }, 0).toFixed(2); $('#score').data('score', score); this.renderScore(); + $('#submit').removeClass("d-none"); }, printScoringResult: function (result, index) { diff --git a/app/views/exercises/_editor_output.html.slim b/app/views/exercises/_editor_output.html.slim index 7948e548..3dc38dce 100644 --- a/app/views/exercises/_editor_output.html.slim +++ b/app/views/exercises/_editor_output.html.slim @@ -31,7 +31,7 @@ div.h-100 id='output_sidebar_uncollapsed' class='d-none col-sm-12 enforce-bottom br - if lti_outcome_service?(@exercise.id, external_user_id, consumer_id) - p.text-center = render('editor_button', classes: 'btn-lg btn-success', data: {:'data-url' => submit_exercise_path(@exercise)}, icon: 'fa fa-send', id: 'submit', label: t('exercises.editor.submit')) + p.text-center = render('editor_button', classes: 'btn-lg btn-success d-none', data: {:'data-url' => submit_exercise_path(@exercise)}, icon: 'fa fa-send', id: 'submit', label: t('exercises.editor.submit')) - else p.text-center = render('editor_button', classes: 'btn-lg btn-secondary disabled', data: {:'data-placement' => 'bottom', :'data-tooltip' => true}, icon: 'fa fa-clock-o', id: 'submit_outdated', label: t('exercises.editor.exercise_deadline_passed'), title: t('exercises.editor.tooltips.exercise_deadline_passed')) hr