Render submit button once results are available
This commit is contained in:
@ -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) {
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user