Show current submission for exercise statistics

This commit is contained in:
Sebastian Serth
2022-08-15 23:24:15 +02:00
parent a56b61d4bc
commit 7d0c3aef4f
2 changed files with 12 additions and 0 deletions

View File

@ -10,6 +10,8 @@ $(document).on('turbolinks:load', function() {
var fileTypeById = {};
var showActiveFile = function() {
$('tr.active').removeClass('active');
$('tr#submission-' + currentSubmission).addClass('active');
var session = editor.getSession();
var fileType = fileTypeById[active_file.file_type_id];
session.setMode(fileType.editor_mode);
@ -81,6 +83,7 @@ $(document).on('turbolinks:load', function() {
$('tr[data-id]>.clickable').each(function(index, element) {
element = $(element);
element.parent().attr('id', 'submission-' + index);
element.click(function() {
slider.val(index);
slider.change()

View File

@ -58,6 +58,15 @@ div.negative-result {
box-shadow: 0px 0px 11px 1px rgba(222,0,0,1);
}
tr.active {
filter: brightness(85%);
color: #000000;
}
tr:not(.before_deadline,.within_grace_period,.after_late_deadline) {
background-color: #ffffff;
}
tr.highlight {
border-top: 2px solid rgba(222,0,0,1);
}