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

@@ -37,7 +37,7 @@ li.card.mt-2
label.form-check-label
= f.check_box(:read_only, class: 'form-check-input')
= t('activerecord.attributes.file.read_only')
.test-related-fields style="display: #{f.object.teacher_defined_test? ? 'initial' : 'none'};"
.test-related-fields style="display: #{f.object.teacher_defined_assessment? ? 'initial' : 'none'};"
.form-group
= f.label(:name, t('activerecord.attributes.file.feedback_message'))
= f.text_area(:feedback_message, class: 'form-control', maxlength: 255)

View File

@@ -30,7 +30,7 @@ h1 = Exercise.model_name.human(count: 2)
tr data-id=exercise.id
td.p-1.pt-2 = link_to_if(policy(exercise).show?, exercise.title, exercise, 'data-turbolinks' => "false")
td.p-1.pt-2 = link_to_if(exercise.execution_environment && policy(exercise.execution_environment).show?, exercise.execution_environment, exercise.execution_environment)
td.p-1.pt-2 = exercise.files.teacher_defined_tests.count
td.p-1.pt-2 = exercise.files.teacher_defined_assessments.count
td.p-1.pt-2 = exercise.maximum_score
td.p-1.pt-2 = exercise.exercise_tags.count
td.p-1.pt-2 = exercise.expected_difficulty