complete experiment groups, add view code

This commit is contained in:
Ralf Teusner
2018-03-28 14:55:25 +02:00
parent 3df8af8c60
commit b314bab1e1
2 changed files with 14 additions and 8 deletions

View File

@@ -188,16 +188,21 @@ class ExercisesController < ApplicationController
@experiment_group = UserGroupSeparator.getInterventionGroup(current_user) @experiment_group = UserGroupSeparator.getInterventionGroup(current_user)
showInterventions = (is_experimental_course and not user_solved_exercise and not user_got_enough_interventions) ? "true" : "false"
case @experiment_group case @experiment_group
# todo when :rfc_intervention_stale_rfc
@show_rfc_interventions = showInterventions
when :break_intervention_stale_rfc
@show_break_interventions = showInterventions
when :no_intervention_stale_rfc
when :no_intervention_hide_rfc when :no_intervention_hide_rfc
@hide_rfc_button = "true" @hide_rfc_button = "true"
when :no_intervention_stale_rfc when :break_intervention_show_rfc
when :break_intervention @show_break_interventions = showInterventions
@show_break_interventions = (is_experimental_course and not user_solved_exercise and not user_got_enough_interventions) ? "true" : "false" when :no_intervention_show_rfc
when :rfc_intervention when :rfc_intervention_show_rfc
@show_rfc_interventions = (is_experimental_course and not user_solved_exercise and not user_got_enough_interventions) ? "true" : "false" @show_rfc_interventions = showInterventions
end end

View File

@@ -15,8 +15,9 @@
= render('editor_button', data: {:'data-placement' => 'top', :'data-tooltip' => true}, icon: 'fa fa-stop', id: 'stop', label: t('exercises.editor.stop'), title: t('shared.tooltips.shortcut', shortcut: 'ALT + r')) = render('editor_button', data: {:'data-placement' => 'top', :'data-tooltip' => true}, icon: 'fa fa-stop', id: 'stop', label: t('exercises.editor.stop'), title: t('shared.tooltips.shortcut', shortcut: 'ALT + r'))
= render('editor_button', data: {:'data-placement' => 'top', :'data-tooltip' => true}, icon: 'fa fa-rocket', id: 'test', label: t('exercises.editor.test'), title: t('shared.tooltips.shortcut', shortcut: 'ALT + t')) = render('editor_button', data: {:'data-placement' => 'top', :'data-tooltip' => true}, icon: 'fa fa-rocket', id: 'test', label: t('exercises.editor.test'), title: t('shared.tooltips.shortcut', shortcut: 'ALT + t'))
= render('editor_button', data: {:'data-placement' => 'top', :'data-tooltip' => true}, icon: 'fa fa-trophy', id: 'assess', label: t('exercises.editor.score'), title: t('shared.tooltips.shortcut', shortcut: 'ALT + s')) = render('editor_button', data: {:'data-placement' => 'top', :'data-tooltip' => true}, icon: 'fa fa-trophy', id: 'assess', label: t('exercises.editor.score'), title: t('shared.tooltips.shortcut', shortcut: 'ALT + s'))
//- if not hide_rfc_button // todo: check this
// = render('editor_button', icon: 'fa fa-comment', id: 'requestComments', label: t('exercises.editor.requestComments'), title: t('exercises.editor.requestCommentsTooltip')) - if not hide_rfc_button
= render('editor_button', icon: 'fa fa-comment', id: 'requestComments', label: t('exercises.editor.requestComments'), title: t('exercises.editor.requestCommentsTooltip'))
- @files.each do |file| - @files.each do |file|
= render('editor_frame', exercise: exercise, file: file) = render('editor_frame', exercise: exercise, file: file)
#autosave-label #autosave-label