diff --git a/app/controllers/assessment/handout.rb b/app/controllers/assessment/handout.rb index 8f749f2fb..7021649c9 100644 --- a/app/controllers/assessment/handout.rb +++ b/app/controllers/assessment/handout.rb @@ -11,6 +11,7 @@ def mime_type_from_ext(ext) end def handout + # If the logic here changes, do update assessment#has_handout? extend_config_module(@assessment, nil, @cud) if @assessment.overwrites_method?(:handout) diff --git a/app/models/assessment.rb b/app/models/assessment.rb index b7fb60aec..6d47171b4 100755 --- a/app/models/assessment.rb +++ b/app/models/assessment.rb @@ -340,6 +340,10 @@ def has_writeup? writeup_is_url? || writeup_is_file? end + def has_handout? + overwrites_method?(:handout) || handout_is_url? || handout_is_file? + end + def groups Group.joins(:assessment_user_data).where(assessment_user_data: { assessment_id: id }).distinct end diff --git a/app/views/assessments/show.html.erb b/app/views/assessments/show.html.erb index 456c2e78a..82c52fb5a 100755 --- a/app/views/assessments/show.html.erb +++ b/app/views/assessments/show.html.erb @@ -130,13 +130,13 @@
Options
diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index fc49fa099..29a2a45d2 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -45,6 +45,10 @@ Capybara::Selenium::Driver.new(app, browser: :chrome) end + # Temporary fix for chromedriver version issue, until we can update Selenium + # https://github.com/titusfortner/webdrivers/issues/247 + Webdrivers::Chromedriver.required_version = "114.0.5735.90" + Capybara.register_driver :headless_chrome do |app| capabilities = Selenium::WebDriver::Remote::Capabilities.chrome( 'goog:chromeOptions': { args: %w[headless] }