Prepare Python20 Course Experiments

This commit is contained in:
Sebastian Serth
2020-10-25 13:29:26 +01:00
parent 380b1a5ba1
commit fda120559c
4 changed files with 81 additions and 1 deletions

View File

@ -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