Add new file role teacher_defined_linter

This commit is contained in:
Sebastian Serth
2020-10-15 00:43:57 +02:00
parent a5416758eb
commit be3ec82bd4
17 changed files with 41 additions and 28 deletions

View File

@@ -413,7 +413,7 @@ var CodeOceanEditor = {
},
isActiveFileTestable: function () {
return this.isActiveFileExecutable() && ['teacher_defined_test', 'user_defined_test'].includes(this.active_frame.data('role'));
return this.isActiveFileExecutable() && ['teacher_defined_test', 'user_defined_test', 'teacher_defined_linter'].includes(this.active_frame.data('role'));
},
isBrowserSupported: function () {

View File

@@ -195,7 +195,7 @@ $(document).on('turbolinks:load', function () {
var observeFileRoleChanges = function () {
$(document).on('change', 'select[name$="[role]"]', function () {
var is_test_file = $(this).val() === 'teacher_defined_test';
var is_test_file = $(this).val() === 'teacher_defined_test' || $(this).val() === 'teacher_defined_linter';
var parent = $(this).parents('.card');
var fields = parent.find('.test-related-fields');
if (is_test_file) {