Prepare Python20 Course Experiments
This commit is contained in:
@@ -86,6 +86,13 @@ module SubmissionScoring
|
||||
output.except!(:error_messages, :count, :failed, :filename, :message, :passed, :stderr, :stdout)
|
||||
end
|
||||
end
|
||||
outputs
|
||||
|
||||
# Return all test results except for those of a linter if not allowed
|
||||
show_linter = Python20CourseWeek.show_linter? submission.exercise, submission.user_id
|
||||
outputs&.reject do |output|
|
||||
next if show_linter
|
||||
|
||||
output[:file_role] == 'teacher_defined_linter'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@@ -309,6 +309,11 @@ class ExercisesController < ApplicationController
|
||||
else
|
||||
current_user.id
|
||||
end
|
||||
|
||||
# Tips are collected and set with set_available_tips.
|
||||
# Delete tips for those users who should not see them.
|
||||
# Doing this here is beneficial because all other (admin) routes still work.
|
||||
@tips = nil unless Python20CourseWeek.show_tips? @exercise, @user_id
|
||||
end
|
||||
|
||||
def set_course_token
|
||||
|
Reference in New Issue
Block a user