Show tips when implementing an exercise
This commit is contained in:
@@ -55,6 +55,8 @@ div.h-100 id='output_sidebar_uncollapsed' class='d-none col-sm-12 enforce-bottom
|
||||
ul.body
|
||||
#output.mt-2
|
||||
pre = t('exercises.implement.no_output_yet')
|
||||
- unless @embed_options[:disable_hints] or @tips.blank?
|
||||
= render(partial: 'tips_content')
|
||||
- if CodeOcean::Config.new(:code_ocean).read[:flowr][:enabled] && !@embed_options[:disable_hints] && !@embed_options[:hide_test_results]
|
||||
#flowrHint.card.text-white.bg-info data-url=CodeOcean::Config.new(:code_ocean).read[:flowr][:url] role='tab'
|
||||
.card-header = t('exercises.implement.flowr.heading')
|
||||
|
13
app/views/exercises/_tips_content.html.slim
Normal file
13
app/views/exercises/_tips_content.html.slim
Normal file
@@ -0,0 +1,13 @@
|
||||
- content_for :head do
|
||||
// Force a full page reload, see https://github.com/turbolinks/turbolinks/issues/326.
|
||||
Otherwise, code might not be highlighted correctly (race condition)
|
||||
meta name='turbolinks-visit-control' content='reload'
|
||||
= javascript_pack_tag('highlight', 'data-turbolinks-track': true)
|
||||
= stylesheet_pack_tag('highlight', media: 'all', 'data-turbolinks-track': true)
|
||||
|
||||
#tips.card.text-white.bg-info.mt-2 role="tab" style="display: block;"
|
||||
.card-header.py-2
|
||||
i.fa.fa-lightbulb
|
||||
= t('exercises.implement.tips.heading')
|
||||
.card-body.text-dark.bg-white.p-2
|
||||
= render(partial: 'tips/collapsed_card', collection: @tips, as: :exercise_tip)
|
Reference in New Issue
Block a user