complete experiment groups, add view code
This commit is contained in:
@ -188,16 +188,21 @@ class ExercisesController < ApplicationController
|
||||
|
||||
@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
|
||||
# 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
|
||||
@hide_rfc_button = "true"
|
||||
when :no_intervention_stale_rfc
|
||||
when :break_intervention
|
||||
@show_break_interventions = (is_experimental_course and not user_solved_exercise and not user_got_enough_interventions) ? "true" : "false"
|
||||
when :rfc_intervention
|
||||
@show_rfc_interventions = (is_experimental_course and not user_solved_exercise and not user_got_enough_interventions) ? "true" : "false"
|
||||
when :break_intervention_show_rfc
|
||||
@show_break_interventions = showInterventions
|
||||
when :no_intervention_show_rfc
|
||||
when :rfc_intervention_show_rfc
|
||||
@show_rfc_interventions = showInterventions
|
||||
end
|
||||
|
||||
|
||||
|
@ -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-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'))
|
||||
//- if not hide_rfc_button
|
||||
// = render('editor_button', icon: 'fa fa-comment', id: 'requestComments', label: t('exercises.editor.requestComments'), title: t('exercises.editor.requestCommentsTooltip'))
|
||||
// todo: check this
|
||||
- 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|
|
||||
= render('editor_frame', exercise: exercise, file: file)
|
||||
#autosave-label
|
||||
|
Reference in New Issue
Block a user