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 @@
- - <%= link_to "View handin history", { :action => 'history' }, { :title => "View your submissions, scores, and feedback from the course staff" } %>
-
+ - <%= link_to "View handin history", {:action => 'history'}, {:title=> "View your submissions, scores, and feedback from the course staff" } %>
<% if @assessment.has_writeup? %>
- - <%= link_to "View writeup", { :action => 'writeup' }, { :title => "View the assessment writeup", :class => "" } %>
+ - <%= link_to "View writeup", {:action => 'writeup'}, {:title=> "View the assessment writeup"} %>
+ <% end %>
+ <% if @assessment.has_handout? %>
+ - <%= link_to "Download handout", {:action => 'handout'}, {:title=> "Download handout materials and starter code" } %>
<% end %>
-
- - <%= link_to "Download handout", { :action => 'handout' }, { :title => "Download handout materials and starter code" } %>
<% if @assessment.has_groups? %>
<% if @aud.membership_status != AssessmentUserDatum::UNCONFIRMED then %>
- <%= link_to "Group options", [@course, @assessment, @aud.group], title: "Check your group settings." %>
@@ -147,12 +147,11 @@
<% if @assessment.has_scoreboard? %>
- <%= link_to "View scoreboard", [@course, @assessment, :scoreboard], title: "View the assessment scoreboard" %>
<% end %>
-
- <% @list.sort { |a, b| a[1] <=> b[1] }.each { |key, value| %>
- <% if value.size > 0 then %>
- - <%= link_to value, { :action => key }, { :title => (@list_title[key] || "") } %>
- <% end %>
- <% } %>
+ <% @list.sort { |a,b| a[1] <=> b[1] }.each { |key, value| %>
+ <% if value.size > 0 then %>
+ - <%= link_to value, {:action => key}, {:title=>(@list_title[key] || "")} %>
+ <% end %>
+ <% } %>
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] }