Lint Slim files and fix offenses
The fixing was partially done manually and partially automatically.
This commit is contained in:

committed by
Dominic Sauer

parent
ddfa06ffaa
commit
9a9efd5caa
@ -9,16 +9,16 @@ h1 = t('breadcrumbs.dashboard.show')
|
|||||||
|
|
||||||
h2 Version
|
h2 Version
|
||||||
|
|
||||||
div.mb-4
|
.mb-4
|
||||||
= application_name
|
= application_name
|
||||||
=< t("admin.dashboard.show.release")
|
=< t('admin.dashboard.show.release')
|
||||||
| :
|
| :
|
||||||
pre = Sentry.configuration.release
|
pre = Sentry.configuration.release
|
||||||
|
|
||||||
- if Runner.management_active?
|
- if Runner.management_active?
|
||||||
div.mb-4
|
.mb-4
|
||||||
= Runner.strategy_class.name.demodulize
|
= Runner.strategy_class.name.demodulize
|
||||||
=< t("admin.dashboard.show.release")
|
=< t('admin.dashboard.show.release')
|
||||||
| :
|
| :
|
||||||
pre = Admin::DashboardHelper.runner_management_release
|
pre = Admin::DashboardHelper.runner_management_release
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
- model = controller_path.classify.constantize rescue nil
|
- model = controller_path.classify.constantize rescue nil # rubocop:disable Style/RescueModifier
|
||||||
- if model
|
- if model
|
||||||
- object = model.find_by(id: params[:id])
|
- object = model.find_by(id: params[:id])
|
||||||
- if (parent_model = model.try(:parent_resource))
|
- if (parent_model = model.try(:parent_resource))
|
||||||
@ -26,7 +26,7 @@
|
|||||||
- active_action = t("breadcrumbs.#{controller_name}.#{params[:action]}")
|
- active_action = t("breadcrumbs.#{controller_name}.#{params[:action]}")
|
||||||
|
|
||||||
|
|
||||||
- title = "#{application_name}"
|
- title = application_name.to_s
|
||||||
- title = "#{active_action} - #{title}" unless %w[index show].include? params[:action]
|
- title = "#{active_action} - #{title}" unless %w[index show].include? params[:action]
|
||||||
- content_for :breadcrumbs do
|
- content_for :breadcrumbs do
|
||||||
.container.mb-4
|
.container.mb-4
|
||||||
|
@ -4,14 +4,14 @@ li.nav-item.dropdown
|
|||||||
span.caret
|
span.caret
|
||||||
ul.dropdown-menu.p-0.mt-1 role='menu'
|
ul.dropdown-menu.p-0.mt-1 role='menu'
|
||||||
li
|
li
|
||||||
button.dropdown-item.d-flex.align-items-center data={ 'bs-theme-value': 'light' }
|
button.dropdown-item.d-flex.align-items-center data={'bs-theme-value': 'light'}
|
||||||
i.fa-fw.fa-solid.fa-sun
|
i.fa-fw.fa-solid.fa-sun
|
||||||
= t('shared.color_mode.light')
|
= t('shared.color_mode.light')
|
||||||
li
|
li
|
||||||
button.dropdown-item.d-flex.align-items-center data={ 'bs-theme-value': 'dark' }
|
button.dropdown-item.d-flex.align-items-center data={'bs-theme-value': 'dark'}
|
||||||
i.fa-fw.fa-solid.fa-moon
|
i.fa-fw.fa-solid.fa-moon
|
||||||
= t('shared.color_mode.dark')
|
= t('shared.color_mode.dark')
|
||||||
li
|
li
|
||||||
button.dropdown-item.d-flex.align-items-center data={ 'bs-theme-value': 'auto' }
|
button.dropdown-item.d-flex.align-items-center data={'bs-theme-value': 'auto'}
|
||||||
i.fa-fw.fa-solid.fa-wand-magic-sparkles
|
i.fa-fw.fa-solid.fa-wand-magic-sparkles
|
||||||
= t('shared.color_mode.auto')
|
= t('shared.color_mode.auto')
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
#flash.container.fixed_error_messages data-message-failure=t('shared.message_failure') data-websocket-failure=t('shared.websocket_failure')
|
#flash.container.fixed_error_messages data-message-failure=t('shared.message_failure') data-websocket-failure=t('shared.websocket_failure')
|
||||||
- ApplicationController._flash_types.each do |severity|
|
- ApplicationController._flash_types.each do |severity|
|
||||||
- flash_mapping = {alert: :warning, notice: :success}
|
- flash_mapping = {alert: :warning, notice: :success}
|
||||||
div.alert.flash class="alert-#{flash_mapping.fetch(severity, severity)} alert-dismissible fade show"
|
.alert.flash class="alert-#{flash_mapping.fetch(severity, severity)} alert-dismissible fade show"
|
||||||
p.mb-0 id="flash-#{severity}" == flash[severity]
|
p.mb-0 id="flash-#{severity}" == flash[severity]
|
||||||
button.btn-close type="button" data-bs-dismiss="alert" aria-label="Close"
|
button.btn-close type='button' data-bs-dismiss='alert' aria-label='Close'
|
||||||
|
@ -3,5 +3,5 @@ li.nav-item.dropdown
|
|||||||
= t("locales.#{I18n.locale}")
|
= t("locales.#{I18n.locale}")
|
||||||
span.caret
|
span.caret
|
||||||
ul.dropdown-menu.p-0.mt-1 role='menu'
|
ul.dropdown-menu.p-0.mt-1 role='menu'
|
||||||
- I18n.available_locales.sort_by { |locale| t("locales.#{locale}") }.each do |locale|
|
- I18n.available_locales.sort_by {|locale| t("locales.#{locale}") }.each do |locale|
|
||||||
li = link_to(t("locales.#{locale}"), AuthenticatedUrlHelper.add_query_parameters(request.url, locale: locale), 'data-turbolinks' => "false", class: 'dropdown-item')
|
li = link_to(t("locales.#{locale}"), AuthenticatedUrlHelper.add_query_parameters(request.url, locale:), 'data-turbolinks': 'false', class: 'dropdown-item')
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
- if current_user.try(:admin?) or current_user.try(:teacher?)
|
- if current_user.try(:admin?) || current_user.try(:teacher?)
|
||||||
ul.nav.navbar-nav
|
ul.nav.navbar-nav
|
||||||
li.nav-item.dropdown
|
li.nav-item.dropdown
|
||||||
a.nav-link.dropdown-toggle.mx-3 data-bs-toggle='dropdown' href='#'
|
a.nav-link.dropdown-toggle.mx-3 data-bs-toggle='dropdown' href='#'
|
||||||
@ -6,8 +6,8 @@
|
|||||||
span.caret
|
span.caret
|
||||||
ul.dropdown-menu.p-0.mt-1 role='menu'
|
ul.dropdown-menu.p-0.mt-1 role='menu'
|
||||||
- if current_user.admin?
|
- if current_user.admin?
|
||||||
li = link_to(t('breadcrumbs.dashboard.show'), admin_dashboard_path, class: 'dropdown-item', 'data-turbolinks' => "false") if policy([:admin, :dashboard]).show?
|
li = link_to(t('breadcrumbs.dashboard.show'), admin_dashboard_path, class: 'dropdown-item', 'data-turbolinks': 'false') if policy(%i[admin dashboard]).show?
|
||||||
li = link_to(t('breadcrumbs.rails_admin.show'), rails_admin.dashboard_path, class: 'dropdown-item', 'data-turbolinks' => "false") if policy([:admin, :dashboard]).show?
|
li = link_to(t('breadcrumbs.rails_admin.show'), rails_admin.dashboard_path, class: 'dropdown-item', 'data-turbolinks': 'false') if policy(%i[admin dashboard]).show?
|
||||||
li = link_to(t('breadcrumbs.statistics.show'), statistics_path, class: 'dropdown-item') if policy(:statistics).show?
|
li = link_to(t('breadcrumbs.statistics.show'), statistics_path, class: 'dropdown-item') if policy(:statistics).show?
|
||||||
li.dropdown-divider role='separator'
|
li.dropdown-divider role='separator'
|
||||||
= render('navigation_submenu', title: t('activerecord.models.exercise.other'),
|
= render('navigation_submenu', title: t('activerecord.models.exercise.other'),
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
- if models.any? { |model| policy(model).index? }
|
- if models.any? {|model| policy(model).index? }
|
||||||
li.dropdown-submenu
|
li.dropdown-submenu
|
||||||
- link = link.nil? ? "#" : link
|
- link = '#' if link.nil?
|
||||||
a.dropdown-item.dropdown-toggle href=link data-bs-toggle="dropdown" = title
|
a.dropdown-item.dropdown-toggle href=link data-bs-toggle='dropdown' = title
|
||||||
ul.dropdown-menu.p-0
|
ul.dropdown-menu.p-0
|
||||||
- models.each do |model|
|
- models.each do |model|
|
||||||
= render('navigation_collection_link', model: model, cached: true)
|
= render('navigation_collection_link', model:, cached: true)
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
li = link_to(t('request_for_comments.index.all'), request_for_comments_path, class: 'dropdown-item') if policy(:request_for_comment).index?
|
li = link_to(t('request_for_comments.index.all'), request_for_comments_path, class: 'dropdown-item') if policy(:request_for_comment).index?
|
||||||
li = link_to(t('request_for_comments.index.my_rfc_activity'), my_rfc_activity_path, class: 'dropdown-item')
|
li = link_to(t('request_for_comments.index.my_rfc_activity'), my_rfc_activity_path, class: 'dropdown-item')
|
||||||
li = link_to(t('request_for_comments.index.my_comment_requests'), my_request_for_comments_path, class: 'dropdown-item')
|
li = link_to(t('request_for_comments.index.my_comment_requests'), my_request_for_comments_path, class: 'dropdown-item')
|
||||||
- if current_user.try(:admin?) or current_user.try(:teacher?) or current_user.try(:internal_user?)
|
- if current_user.try(:admin?) || current_user.try(:teacher?) || current_user.try(:internal_user?)
|
||||||
li = link_to(t('consumers.show.link'), current_user.consumer, class: 'dropdown-item') if current_user.consumer and policy(current_user.consumer).show?
|
li = link_to(t('consumers.show.link'), current_user.consumer, class: 'dropdown-item') if current_user.consumer && policy(current_user.consumer).show?
|
||||||
li = link_to(t('internal_users.show.link'), current_user, class: 'dropdown-item') if policy(current_user).show?
|
li = link_to(t('internal_users.show.link'), current_user, class: 'dropdown-item') if policy(current_user).show?
|
||||||
li = link_to(t('sessions.destroy.link'), sign_out_path, method: :delete, class: 'dropdown-item')
|
li = link_to(t('sessions.destroy.link'), sign_out_path, method: :delete, class: 'dropdown-item')
|
||||||
- else
|
- else
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
- unless local_assigns[:modal]
|
- unless local_assigns[:modal]
|
||||||
h1 = t('shared.help.headline')
|
h1 = t('shared.help.headline')
|
||||||
|
|
||||||
- if local_assigns.has_key?(:execution_environment)
|
- if local_assigns.key?(:execution_environment)
|
||||||
h2 = t('shared.help.execution_environment_specific_help', execution_environment: execution_environment)
|
h2 = t('shared.help.execution_environment_specific_help', execution_environment:)
|
||||||
= render_markdown(execution_environment.help)
|
= render_markdown(execution_environment.help)
|
||||||
|
|
||||||
- content_for :modal_footer do
|
- content_for :modal_footer do
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
h1 = t('.title', application_name: application_name)
|
h1 = t('.title', application_name:)
|
||||||
|
|
||||||
- if current_user.try(:admin?) or current_user.try(:teacher?)
|
- if current_user.try(:admin?) || current_user.try(:teacher?)
|
||||||
p = t('.text_signed_in_as_internal_user', user_name: current_user.displayname)
|
p = t('.text_signed_in_as_internal_user', user_name: current_user.displayname)
|
||||||
- elsif current_user.try(:external_user?)
|
- elsif current_user.try(:external_user?)
|
||||||
p = t('.text_signed_in_as_external_user', application_name: application_name)
|
p = t('.text_signed_in_as_external_user', application_name:)
|
||||||
- else
|
- else
|
||||||
p == t('.text_signed_out', application_name: application_name, sign_in_path: sign_in_path)
|
p == t('.text_signed_out', application_name:, sign_in_path:)
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
- if FileTemplate.any?
|
- if FileTemplate.any?
|
||||||
.mb-3
|
.mb-3
|
||||||
= f.label(:file_template_id, t('activerecord.attributes.file.file_template_id'), class: 'form-label')
|
= f.label(:file_template_id, t('activerecord.attributes.file.file_template_id'), class: 'form-label')
|
||||||
= f.collection_select(:file_template_id, FileTemplate.all.order(:name), :id, :name, {:include_blank => true}, class: 'form-control')
|
= f.collection_select(:file_template_id, FileTemplate.order(:name), :id, :name, {include_blank: true}, class: 'form-control')
|
||||||
= f.hidden_field(:context_id)
|
= f.hidden_field(:context_id)
|
||||||
.d-none#noTemplateLabel data-text=t('file_template.no_template_label')
|
.d-none#noTemplateLabel data-text=t('file_template.no_template_label')
|
||||||
.actions = render('shared/submit_button', f: f, object: CodeOcean::File.new)
|
.actions = render('shared/submit_button', f:, object: CodeOcean::File.new)
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
.input-group-btn
|
.input-group-btn
|
||||||
= button_tag t('codeharbor_link.generate'), type: 'button', class: 'generate-api_key btn btn-default'
|
= button_tag t('codeharbor_link.generate'), type: 'button', class: 'generate-api_key btn btn-default'
|
||||||
.actions
|
.actions
|
||||||
= render('shared/submit_button', f: f, object: @codeharbor_link)
|
= render('shared/submit_button', f:, object: @codeharbor_link)
|
||||||
- if @codeharbor_link.persisted?
|
- if @codeharbor_link.persisted?
|
||||||
= link_to(t('codeharbor_link.delete'), codeharbor_link_path(@codeharbor_link), data: {confirm: t('shared.confirm_destroy')}, method: :delete, class: 'btn btn-danger float-end')
|
= link_to(t('codeharbor_link.delete'), codeharbor_link_path(@codeharbor_link), data: {confirm: t('shared.confirm_destroy')}, method: :delete, class: 'btn btn-danger float-end')
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
.exercise.clearfix
|
.exercise.clearfix
|
||||||
div
|
div
|
||||||
h1 id="exercise-headline"
|
h1#exercise-headline
|
||||||
i id="description-symbol" class=(@embed_options[:collapse_exercise_description] ? 'fa-solid fa-chevron-right' : 'fa-solid fa-chevron-down')
|
i#description-symbol class=(@embed_options[:collapse_exercise_description] ? 'fa-solid fa-chevron-right' : 'fa-solid fa-chevron-down')
|
||||||
=> @community_solution.model_name.human(count: 1)
|
=> @community_solution.model_name.human(count: 1)
|
||||||
= @community_solution.exercise.title
|
= @community_solution.exercise.title
|
||||||
|
|
||||||
@ -20,7 +20,7 @@
|
|||||||
hr
|
hr
|
||||||
= render_markdown(@community_solution.exercise.description)
|
= render_markdown(@community_solution.exercise.description)
|
||||||
|
|
||||||
a#toggle href="#" data-show=t('shared.show') data-hide=t('shared.hide')
|
a#toggle href='#' data-show=t('shared.show') data-hide=t('shared.hide')
|
||||||
- if @embed_options[:collapse_exercise_description]
|
- if @embed_options[:collapse_exercise_description]
|
||||||
= t('shared.show')
|
= t('shared.show')
|
||||||
- else
|
- else
|
||||||
@ -37,12 +37,12 @@
|
|||||||
.card-body.pt-0.pe-0.ps-1.pb-1
|
.card-body.pt-0.pe-0.ps-1.pb-1
|
||||||
#files data-entries=FileTree.new(@files).to_js_tree_in_json
|
#files data-entries=FileTree.new(@files).to_js_tree_in_json
|
||||||
div class=(@community_solution.exercise.hide_file_tree ? 'col-sm-12' : 'col-sm-9')
|
div class=(@community_solution.exercise.hide_file_tree ? 'col-sm-12' : 'col-sm-9')
|
||||||
div.editor-col.col.p-0 id='frames'
|
.editor-col.col.p-0#frames
|
||||||
- @files.each do |file|
|
- @files.each do |file|
|
||||||
= render('exercises/editor_frame', exercise: @community_solution.exercise, file: file)
|
= render('exercises/editor_frame', exercise: @community_solution.exercise, file:)
|
||||||
|
|
||||||
.col-xl-6.container-fluid
|
.col-xl-6.container-fluid
|
||||||
div.bg-contrast.h-100.float-start.row style="width: 1px"
|
.bg-contrast.h-100.float-start.row style="width: 1px"
|
||||||
div
|
div
|
||||||
h4
|
h4
|
||||||
= t('community_solutions.your_submission')
|
= t('community_solutions.your_submission')
|
||||||
@ -54,11 +54,11 @@
|
|||||||
.card-body.pt-0.pe-0.ps-1.pb-1
|
.card-body.pt-0.pe-0.ps-1.pb-1
|
||||||
#own-files data-entries=FileTree.new(@own_files).to_js_tree_in_json
|
#own-files data-entries=FileTree.new(@own_files).to_js_tree_in_json
|
||||||
div class=(@community_solution.exercise.hide_file_tree ? 'col-sm-12' : 'col-sm-9')
|
div class=(@community_solution.exercise.hide_file_tree ? 'col-sm-12' : 'col-sm-9')
|
||||||
div.editor-col.col.p-0 id='own-frames'
|
.editor-col.col.p-0#own-frames
|
||||||
- @own_files.each do |file|
|
- @own_files.each do |file|
|
||||||
= render('exercises/editor_frame', exercise: @community_solution.exercise, file: file, own_solution: true)
|
= render('exercises/editor_frame', exercise: @community_solution.exercise, file:, own_solution: true)
|
||||||
#statusbar.visible.mt-2 style="height: 5em"
|
#statusbar.visible.mt-2 style="height: 5em"
|
||||||
p.text-center
|
p.text-center
|
||||||
= render('exercises/editor_button', classes: 'btn-lg btn-success ms-5 me-3', data: {'data-url': community_solution_path(@community_solution), 'data-http-method': 'PUT', 'data-cause': 'change-community-solution', 'data-exercise-id': @community_solution.exercise.id}, icon: 'fa-solid fa-paper-plane', id: 'submit', label: t('community_solutions.change_community_solution'))
|
= render('exercises/editor_button', classes: 'btn-lg btn-success ms-5 me-3', data: {'data-url': community_solution_path(@community_solution), 'data-http-method': 'PUT', 'data-cause': 'change-community-solution', 'data-exercise-id': @community_solution.exercise.id}, icon: 'fa-solid fa-paper-plane', id: 'submit', label: t('community_solutions.change_community_solution'))
|
||||||
= render('exercises/editor_button', classes: 'btn-lg btn-secondary ms-5', data: {'data-url': community_solution_path(@community_solution), 'data-http-method': 'PUT', 'data-cause': 'accept-community-solution', 'data-exercise-id': @community_solution.exercise.id}, icon: 'fa-solid fa-check', id: 'accept', label: t('community_solutions.accept_community_solution'))
|
= render('exercises/editor_button', classes: 'btn-lg btn-secondary ms-5', data: {'data-url': community_solution_path(@community_solution), 'data-http-method': 'PUT', 'data-cause': 'accept-community-solution', 'data-exercise-id': @community_solution.exercise.id}, icon: 'fa-solid fa-check', id: 'accept', label: t('community_solutions.accept_community_solution'))
|
||||||
button style="display:none" id="autosave" data-url=community_solution_path(@community_solution) data-http-method='PUT' data-cause='autosave-community-solution' data-exercise-id=@community_solution.exercise.id
|
button#autosave style="display:none" data-url=community_solution_path(@community_solution) data-http-method='PUT' data-cause='autosave-community-solution' data-exercise-id=@community_solution.exercise.id
|
||||||
|
@ -11,5 +11,5 @@
|
|||||||
= f.text_field(:oauth_secret, class: 'form-control', required: true)
|
= f.text_field(:oauth_secret, class: 'form-control', required: true)
|
||||||
.mb-3
|
.mb-3
|
||||||
= f.label(:rfc_visibility, class: 'form-label')
|
= f.label(:rfc_visibility, class: 'form-label')
|
||||||
= f.collection_select(:rfc_visibility, Consumer.rfc_visibilities.map { |rfc_visibility, _id| [t("activerecord.attributes.consumer.rfc_visibility_type.#{rfc_visibility}"), rfc_visibility] }, :second, :first, {}, class: 'form-control form-control-sm')
|
= f.collection_select(:rfc_visibility, Consumer.rfc_visibilities.map {|rfc_visibility, _id| [t("activerecord.attributes.consumer.rfc_visibility_type.#{rfc_visibility}"), rfc_visibility] }, :second, :first, {}, class: 'form-control form-control-sm')
|
||||||
.actions = render('shared/submit_button', f: f, object: @consumer)
|
.actions = render('shared/submit_button', f:, object: @consumer)
|
||||||
|
@ -14,4 +14,4 @@
|
|||||||
label.form-check-label
|
label.form-check-label
|
||||||
= f.check_box(:important, class: 'form-check-input')
|
= f.check_box(:important, class: 'form-check-input')
|
||||||
= t('activerecord.attributes.error_template_attribute.important')
|
= t('activerecord.attributes.error_template_attribute.important')
|
||||||
.actions = render('shared/submit_button', f: f, object: @error_template_attribute)
|
.actions = render('shared/submit_button', f:, object: @error_template_attribute)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
h1 = ErrorTemplateAttribute.model_name.human(count: 2)
|
h1 = ErrorTemplateAttribute.model_name.human(count: 2)
|
||||||
|
|
||||||
.table-responsive
|
.table-responsive
|
||||||
table.table class="#{@error_template_attributes.present? ? 'sortable' : ''}"
|
table.table class=(@error_template_attributes.present? ? 'sortable' : '')
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
th
|
th
|
||||||
@ -14,9 +14,9 @@ h1 = ErrorTemplateAttribute.model_name.human(count: 2)
|
|||||||
tr
|
tr
|
||||||
td
|
td
|
||||||
- if error_template_attribute.important
|
- if error_template_attribute.important
|
||||||
span class="fa-solid fa-star" aria-hidden="true"
|
span.fa-solid.fa-star aria-hidden='true'
|
||||||
- else
|
- else
|
||||||
span class="fa-regular fa-star" aria-hidden="true"
|
span.fa-regular.fa-star aria-hidden='true'
|
||||||
td = link_to_if(policy(error_template_attribute).show?, error_template_attribute.key, error_template_attribute)
|
td = link_to_if(policy(error_template_attribute).show?, error_template_attribute.key, error_template_attribute)
|
||||||
td = error_template_attribute.description
|
td = error_template_attribute.description
|
||||||
td
|
td
|
||||||
|
@ -2,10 +2,10 @@ h1
|
|||||||
= @error_template_attribute
|
= @error_template_attribute
|
||||||
= render('shared/edit_button', object: @error_template_attribute)
|
= render('shared/edit_button', object: @error_template_attribute)
|
||||||
|
|
||||||
- [:key, :description].each do |attribute|
|
- %i[key description].each do |attribute|
|
||||||
= row(label: "error_template_attribute.#{attribute}", value: @error_template_attribute.send(attribute))
|
= row(label: "error_template_attribute.#{attribute}", value: @error_template_attribute.send(attribute))
|
||||||
= row(label: "error_template_attribute.key") do
|
= row(label: 'error_template_attribute.key') do
|
||||||
code = @error_template_attribute.key
|
code = @error_template_attribute.key
|
||||||
= row(label: "error_template_attribute.important", value: @error_template_attribute.important)
|
= row(label: 'error_template_attribute.important', value: @error_template_attribute.important)
|
||||||
|
|
||||||
// todo: used by
|
// todo: used by
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
= f.text_field(:name, class: 'form-control', required: true)
|
= f.text_field(:name, class: 'form-control', required: true)
|
||||||
.mb-3
|
.mb-3
|
||||||
= f.label(:execution_environment_id, class: 'form-label')
|
= f.label(:execution_environment_id, class: 'form-label')
|
||||||
= f.collection_select(:execution_environment_id, ExecutionEnvironment.all.order(:name), :id, :name, {include_blank: false}, class: 'form-control')
|
= f.collection_select(:execution_environment_id, ExecutionEnvironment.order(:name), :id, :name, {include_blank: false}, class: 'form-control')
|
||||||
.mb-3
|
.mb-3
|
||||||
= f.label(:signature, class: 'form-label')
|
= f.label(:signature, class: 'form-label')
|
||||||
= f.text_field(:signature, class: 'form-control')
|
= f.text_field(:signature, class: 'form-control')
|
||||||
@ -17,4 +17,4 @@
|
|||||||
= f.label(:hint, class: 'form-label')
|
= f.label(:hint, class: 'form-label')
|
||||||
= f.text_field(:hint, class: 'form-control')
|
= f.text_field(:hint, class: 'form-control')
|
||||||
.help-block.form-text == t('error_templates.hints.hint_templates')
|
.help-block.form-text == t('error_templates.hints.hint_templates')
|
||||||
.actions = render('shared/submit_button', f: f, object: @error_template)
|
.actions = render('shared/submit_button', f:, object: @error_template)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
h1 = ErrorTemplate.model_name.human(count: 2)
|
h1 = ErrorTemplate.model_name.human(count: 2)
|
||||||
|
|
||||||
.table-responsive
|
.table-responsive
|
||||||
table.table class="#{@error_templates.present? ? 'sortable' : ''}"
|
table.table class=(@error_templates.present? ? 'sortable' : '')
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
th = t('activerecord.attributes.error_template.name')
|
th = t('activerecord.attributes.error_template.name')
|
||||||
|
@ -4,16 +4,16 @@ h1
|
|||||||
|
|
||||||
= row(label: 'error_template.name', value: @error_template.name)
|
= row(label: 'error_template.name', value: @error_template.name)
|
||||||
= row(label: 'exercise.execution_environment', value: link_to_if(policy(@error_template.execution_environment).show?, @error_template.execution_environment))
|
= row(label: 'exercise.execution_environment', value: link_to_if(policy(@error_template.execution_environment).show?, @error_template.execution_environment))
|
||||||
= row(label: "error_template.signature") do
|
= row(label: 'error_template.signature') do
|
||||||
code = @error_template.signature
|
code = @error_template.signature
|
||||||
- [:description, :hint].each do |attribute|
|
- %i[description hint].each do |attribute|
|
||||||
= row(label: "error_template.#{attribute}", value: @error_template.send(attribute))
|
= row(label: "error_template.#{attribute}", value: @error_template.send(attribute))
|
||||||
|
|
||||||
h2.mt-4
|
h2.mt-4
|
||||||
= t 'error_templates.attributes'
|
= t 'error_templates.attributes'
|
||||||
|
|
||||||
.table-responsive
|
.table-responsive
|
||||||
table.table class="#{@error_template.error_template_attributes.present? ? 'sortable' : ''}"
|
table.table class=(@error_template.error_template_attributes.present? ? 'sortable' : '')
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
th
|
th
|
||||||
@ -26,16 +26,16 @@ h2.mt-4
|
|||||||
tr
|
tr
|
||||||
td
|
td
|
||||||
- if attribute.important
|
- if attribute.important
|
||||||
span class="fa-solid fa-star" aria-hidden="true"
|
span.fa-solid.fa-star aria-hidden='true'
|
||||||
- else
|
- else
|
||||||
span class="fa-regular fa-star" aria-hidden="true"
|
span.fa-regular.fa-star aria-hidden='true'
|
||||||
td = link_to_if(policy(attribute).show?, attribute.key, attribute)
|
td = link_to_if(policy(attribute).show?, attribute.key, attribute)
|
||||||
td = attribute.description
|
td = attribute.description
|
||||||
td
|
td
|
||||||
code = attribute.regex
|
code = attribute.regex
|
||||||
td = link_to(t('shared.show'), attribute) if policy(attribute).show?
|
td = link_to(t('shared.show'), attribute) if policy(attribute).show?
|
||||||
td = link_to(t('shared.edit'), edit_error_template_attribute_path(attribute)) if policy(attribute).edit?
|
td = link_to(t('shared.edit'), edit_error_template_attribute_path(attribute)) if policy(attribute).edit?
|
||||||
td = link_to(t('shared.destroy'), attribute_error_template_url(:error_template_attribute_id => attribute.id), :method => :delete) if policy(attribute).destroy?
|
td = link_to(t('shared.destroy'), attribute_error_template_url(error_template_attribute_id: attribute.id), method: :delete) if policy(attribute).destroy?
|
||||||
|
|
||||||
#add-attribute
|
#add-attribute
|
||||||
= collection_select({}, :error_template_attribute_id,
|
= collection_select({}, :error_template_attribute_id,
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
= f.text_field(:name, class: 'form-control', required: true)
|
= f.text_field(:name, class: 'form-control', required: true)
|
||||||
.mb-3
|
.mb-3
|
||||||
= f.label(:file_type_id, class: 'form-label')
|
= f.label(:file_type_id, class: 'form-label')
|
||||||
= f.collection_select(:file_type_id, FileType.all.order(:name), :id, :name, {include_blank: true}, class: 'form-control')
|
= f.collection_select(:file_type_id, FileType.order(:name), :id, :name, {include_blank: true}, class: 'form-control')
|
||||||
.mb-3
|
.mb-3
|
||||||
= f.label(:docker_image, class: 'form-label')
|
= f.label(:docker_image, class: 'form-label')
|
||||||
|
|
|
|
||||||
@ -53,4 +53,4 @@
|
|||||||
= f.label(:help, class: 'form-label')
|
= f.label(:help, class: 'form-label')
|
||||||
= f.hidden_field(:help)
|
= f.hidden_field(:help)
|
||||||
.form-control.markdown
|
.form-control.markdown
|
||||||
.actions = render('shared/submit_button', f: f, object: @execution_environment)
|
.actions = render('shared/submit_button', f:, object: @execution_environment)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
h1.d-inline-block = ExecutionEnvironment.model_name.human(count: 2)
|
h1.d-inline-block = ExecutionEnvironment.model_name.human(count: 2)
|
||||||
|
|
||||||
- if Runner.management_active? && policy(ExecutionEnvironment).sync_all_to_runner_management?
|
- if Runner.management_active? && policy(ExecutionEnvironment).sync_all_to_runner_management?
|
||||||
= button_to( { action: :sync_all_to_runner_management }, { form_class: 'float-end mb-2', class: 'btn btn-success' })
|
= button_to({action: :sync_all_to_runner_management}, {form_class: 'float-end mb-2', class: 'btn btn-success'})
|
||||||
i.fa-solid.fa-upload
|
i.fa-solid.fa-upload
|
||||||
= t('execution_environments.index.synchronize_all.button')
|
= t('execution_environments.index.synchronize_all.button')
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
h1 = @execution_environment
|
h1 = @execution_environment
|
||||||
|
|
||||||
#shell data-message-timeout=t('exercises.editor.timeout', permitted_execution_time: @execution_environment.permitted_execution_time) data-message-out-of-memory=t('exercises.editor.out_of_memory', memory_limit: @execution_environment.memory_limit) data-id=@execution_environment.id
|
#shell data-message-timeout=t('exercises.editor.timeout', permitted_execution_time: @execution_environment.permitted_execution_time) data-message-out-of-memory=t('exercises.editor.out_of_memory', memory_limit: @execution_environment.memory_limit) data-id=@execution_environment.id
|
||||||
label.form-label for='command' = t('execution_environments.shell.command')
|
label.form-label for='command' = t('execution_environments.shell.command')
|
||||||
.input-group.mb-3
|
.input-group.mb-3
|
||||||
.input-group-text.form-switch.ps-5 class=('text-body-secondary' unless @execution_environment.privileged_execution?)
|
.input-group-text.form-switch.ps-5 class=('text-body-secondary' unless @execution_environment.privileged_execution?)
|
||||||
@ -9,14 +9,14 @@ h1 = @execution_environment
|
|||||||
input#command.form-control type='text'
|
input#command.form-control type='text'
|
||||||
|
|
||||||
.card.mb-3
|
.card.mb-3
|
||||||
.card-header#download-files role="tab"
|
.card-header#download-files role='tab'
|
||||||
a.file-heading.collapsed.d-flex.justify-content-between.align-items-center data-bs-toggle="collapse" href="#collapse_files" aria-expanded="false"
|
a.file-heading.collapsed.d-flex.justify-content-between.align-items-center data-bs-toggle='collapse' href='#collapse_files' aria-expanded='false'
|
||||||
div.clearfix role="button"
|
.clearfix role='button'
|
||||||
i.fa-solid aria-hidden="true"
|
i.fa-solid aria-hidden='true'
|
||||||
span = t('execution_environments.shell.file_tree.headline')
|
span = t('execution_environments.shell.file_tree.headline')
|
||||||
div
|
div
|
||||||
= render('exercises/editor_button', classes: 'btn-default btn-sm', data: {:'data-bs-toggle' => 'tooltip', :'data-url' => list_files_in_execution_environment_path(@execution_environment)}, icon: 'fa-solid fa-arrows-rotate', id: 'reload-files', label: t('execution_environments.shell.file_tree.reload'), title: t('execution_environments.shell.file_tree.reload_tooltip'))
|
= render('exercises/editor_button', classes: 'btn-default btn-sm', data: {'data-bs-toggle': 'tooltip', 'data-url': list_files_in_execution_environment_path(@execution_environment)}, icon: 'fa-solid fa-arrows-rotate', id: 'reload-files', label: t('execution_environments.shell.file_tree.reload'), title: t('execution_environments.shell.file_tree.reload_tooltip'))
|
||||||
.card-collapse.collapse id="collapse_files" role="tabpanel"
|
.card-collapse.collapse#collapse_files role='tabpanel'
|
||||||
.card-body.pt-0.pe-0.ps-1.pb-1
|
.card-body.pt-0.pe-0.ps-1.pb-1
|
||||||
#download-file-tree.justify-content-center.d-flex.my-3
|
#download-file-tree.justify-content-center.d-flex.my-3
|
||||||
span.mx-1 = t('execution_environments.shell.file_tree.empty')
|
span.mx-1 = t('execution_environments.shell.file_tree.empty')
|
||||||
@ -26,5 +26,5 @@ h1 = @execution_environment
|
|||||||
i.fa-solid.fa-info
|
i.fa-solid.fa-info
|
||||||
span.ms-2 = t('execution_environments.shell.file_tree.root_notice')
|
span.ms-2 = t('execution_environments.shell.file_tree.root_notice')
|
||||||
|
|
||||||
pre#output data-message-no-output=t('exercises.implement.no_output', timestamp: l(Time.now, format: :short))
|
pre#output data-message-no-output=t('exercises.implement.no_output', timestamp: l(Time.zone.now, format: :short))
|
||||||
p = t('exercises.implement.no_output_yet')
|
p = t('exercises.implement.no_output_yet')
|
||||||
|
@ -5,15 +5,15 @@ h1.d-inline-block = @execution_environment
|
|||||||
ul.dropdown-menu.dropdown-menu-end role='menu'
|
ul.dropdown-menu.dropdown-menu-end role='menu'
|
||||||
li = link_to(t('execution_environments.index.synchronize.button'), sync_to_runner_management_execution_environment_path(@execution_environment), method: :post, class: 'dropdown-item') if policy(@execution_environment).sync_to_runner_management?
|
li = link_to(t('execution_environments.index.synchronize.button'), sync_to_runner_management_execution_environment_path(@execution_environment), method: :post, class: 'dropdown-item') if policy(@execution_environment).sync_to_runner_management?
|
||||||
li = link_to(t('execution_environments.index.shell'), shell_execution_environment_path(@execution_environment), class: 'dropdown-item') if policy(@execution_environment).shell?
|
li = link_to(t('execution_environments.index.shell'), shell_execution_environment_path(@execution_environment), class: 'dropdown-item') if policy(@execution_environment).shell?
|
||||||
li = link_to(t('shared.statistics'), statistics_execution_environment_path(@execution_environment), 'data-turbolinks' => "false", class: 'dropdown-item') if policy(@execution_environment).statistics?
|
li = link_to(t('shared.statistics'), statistics_execution_environment_path(@execution_environment), 'data-turbolinks': 'false', class: 'dropdown-item') if policy(@execution_environment).statistics?
|
||||||
li = link_to(t('shared.destroy'), @execution_environment, data: {confirm: t('shared.confirm_destroy')}, method: :delete, class: 'dropdown-item') if policy(@execution_environment).destroy?
|
li = link_to(t('shared.destroy'), @execution_environment, data: {confirm: t('shared.confirm_destroy')}, method: :delete, class: 'dropdown-item') if policy(@execution_environment).destroy?
|
||||||
|
|
||||||
= row(label: 'execution_environment.name', value: @execution_environment.name)
|
= row(label: 'execution_environment.name', value: @execution_environment.name)
|
||||||
= row(label: 'execution_environment.user', value: link_to_if(policy(@execution_environment.author).show?, @execution_environment.author, @execution_environment.author))
|
= row(label: 'execution_environment.user', value: link_to_if(policy(@execution_environment.author).show?, @execution_environment.author, @execution_environment.author))
|
||||||
= row(label: 'execution_environment.file_type', value: @execution_environment.file_type.present? ? link_to(@execution_environment.file_type, @execution_environment.file_type) : nil)
|
= row(label: 'execution_environment.file_type', value: @execution_environment.file_type.present? ? link_to(@execution_environment.file_type, @execution_environment.file_type) : nil)
|
||||||
- [:docker_image, :exposed_ports_list, :memory_limit, :cpu_limit, :network_enabled, :privileged_execution, :permitted_execution_time, :pool_size].each do |attribute|
|
- %i[docker_image exposed_ports_list memory_limit cpu_limit network_enabled privileged_execution permitted_execution_time pool_size].each do |attribute|
|
||||||
= row(label: "execution_environment.#{attribute}", value: @execution_environment.send(attribute))
|
= row(label: "execution_environment.#{attribute}", value: @execution_environment.send(attribute))
|
||||||
- [:run_command, :test_command].each do |attribute|
|
- %i[run_command test_command].each do |attribute|
|
||||||
= row(label: "execution_environment.#{attribute}") do
|
= row(label: "execution_environment.#{attribute}") do
|
||||||
code = @execution_environment.send(attribute)
|
code = @execution_environment.send(attribute)
|
||||||
= row(label: 'execution_environment.testing_framework', value: @testing_framework_adapter.try(:framework_name))
|
= row(label: 'execution_environment.testing_framework', value: @testing_framework_adapter.try(:framework_name))
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
h1 = @execution_environment
|
h1 = @execution_environment
|
||||||
|
|
||||||
.table-responsive
|
.table-responsive
|
||||||
table.table.table-striped class="#{@execution_environment.present? ? 'sortable' : ''}"
|
table.table.table-striped class=(@execution_environment.present? ? 'sortable' : '')
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
- ['.exercise', '.users_and_programming_groups', '.score', '.maximum_score', '.stddev_score', '.percentage_correct', '.runs', '.worktime', '.stddev_worktime'].each do |title|
|
- ['.exercise', '.users_and_programming_groups', '.score', '.maximum_score', '.stddev_score', '.percentage_correct', '.runs', '.worktime', '.stddev_worktime'].each do |title|
|
||||||
@ -9,17 +9,17 @@ h1 = @execution_environment
|
|||||||
tbody
|
tbody
|
||||||
- @execution_environment.exercises.each do |exercise|
|
- @execution_environment.exercises.each do |exercise|
|
||||||
- us = contributor_statistics[exercise.id]
|
- us = contributor_statistics[exercise.id]
|
||||||
- if not us then us = {"contributors" => 0, "average_score" => 0.0, "maximum_score" => 0, "stddev_score" => 0.0, "percent_correct" => nil, "average_submission_count" => 0}
|
- us ||= {'contributors' => 0, 'average_score' => 0.0, 'maximum_score' => 0, 'stddev_score' => 0.0, 'percent_correct' => nil, 'average_submission_count' => 0}
|
||||||
- wts = working_time_statistics[exercise.id]
|
- wts = working_time_statistics[exercise.id]
|
||||||
- if wts then average_time = wts["average_time"] else 0
|
- if wts then average_time = wts['average_time'] else 0 # rubocop:disable Lint/ElseLayout
|
||||||
- if wts then stddev_time = wts["stddev_time"] else 0
|
- if wts then stddev_time = wts['stddev_time'] else 0 # rubocop:disable Lint/ElseLayout
|
||||||
tr
|
tr
|
||||||
td = link_to_if policy(exercise).statistics?, exercise.title, controller: "exercises", action: "statistics", id: exercise.id, 'data-turbolinks' => "false"
|
td = link_to_if policy(exercise).statistics?, exercise.title, controller: 'exercises', action: 'statistics', id: exercise.id, 'data-turbolinks': 'false'
|
||||||
td = us["contributors"]
|
td = us['contributors']
|
||||||
td = us["average_score"].to_f.round(4)
|
td = us['average_score'].to_f.round(4)
|
||||||
td = us["maximum_score"].to_f.round(2)
|
td = us['maximum_score'].to_f.round(2)
|
||||||
td = us["stddev_score"].to_f.round(4)
|
td = us['stddev_score'].to_f.round(4)
|
||||||
td = (us["percent_correct"].to_f or 0).round(4)
|
td = (us['percent_correct'].to_f || 0).round(4)
|
||||||
td = us["average_submission_count"].to_f.round(2)
|
td = us['average_submission_count'].to_f.round(2)
|
||||||
td = average_time
|
td = average_time
|
||||||
td = stddev_time
|
td = stddev_time
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
td
|
td
|
||||||
span.fa-solid.fa-bars
|
span.fa-solid.fa-bars
|
||||||
td = item.exercise.title
|
td = item.exercise.title
|
||||||
td = link_to(t('shared.show'), item.exercise, 'data-turbolinks' => "false")
|
td = link_to(t('shared.show'), item.exercise, 'data-turbolinks': 'false')
|
||||||
td
|
td
|
||||||
a.remove-exercise href='#' = t('shared.destroy')
|
a.remove-exercise href='#' = t('shared.destroy')
|
||||||
.d-none
|
.d-none
|
||||||
@ -33,6 +33,6 @@
|
|||||||
button.btn.btn-outline-primary type='button' data-bs-toggle='modal' data-bs-target='#add-exercise-modal' = t('exercise_collections.form.add_exercises')
|
button.btn.btn-outline-primary type='button' data-bs-toggle='modal' data-bs-target='#add-exercise-modal' = t('exercise_collections.form.add_exercises')
|
||||||
button.btn.btn-secondary#sort-button type='button' = t('exercise_collections.form.sort_by_title')
|
button.btn.btn-secondary#sort-button type='button' = t('exercise_collections.form.sort_by_title')
|
||||||
|
|
||||||
.actions = render('shared/submit_button', f: f, object: @exercise_collection)
|
.actions = render('shared/submit_button', f:, object: @exercise_collection)
|
||||||
|
|
||||||
= render('shared/modal', id: 'add-exercise-modal', title: t('.add_exercises'), template: 'exercise_collections/_add_exercise_modal')
|
= render('shared/modal', id: 'add-exercise-modal', title: t('.add_exercises'), template: 'exercise_collections/_add_exercise_modal')
|
||||||
|
@ -18,11 +18,11 @@ h4.mt-4 = t('activerecord.attributes.exercise_collections.exercises')
|
|||||||
th = t('activerecord.attributes.exercise.user')
|
th = t('activerecord.attributes.exercise.user')
|
||||||
th = t('shared.actions')
|
th = t('shared.actions')
|
||||||
tbody
|
tbody
|
||||||
- @exercise_collection.items.sort_by{|item| item.position}.each do |exercise_collection_item|
|
- @exercise_collection.items.sort_by(&:position).each do |exercise_collection_item|
|
||||||
- exercise = exercise_collection_item.exercise
|
- exercise = exercise_collection_item.exercise
|
||||||
tr
|
tr
|
||||||
td = exercise_collection_item.position
|
td = exercise_collection_item.position
|
||||||
td = link_to_if(policy(exercise).show?, exercise.title, exercise)
|
td = link_to_if(policy(exercise).show?, exercise.title, exercise)
|
||||||
td = link_to_if(exercise.execution_environment && policy(exercise.execution_environment).show?, exercise.execution_environment, exercise.execution_environment)
|
td = link_to_if(exercise.execution_environment && policy(exercise.execution_environment).show?, exercise.execution_environment, exercise.execution_environment)
|
||||||
td = link_to_if(exercise.user && policy(exercise.user).show?, exercise.user.displayname, exercise.user)
|
td = link_to_if(exercise.user && policy(exercise.user).show?, exercise.user.displayname, exercise.user)
|
||||||
td = link_to(t('shared.statistics'), statistics_exercise_path(exercise), 'data-turbolinks' => "false") if policy(exercise).statistics?
|
td = link_to(t('shared.statistics'), statistics_exercise_path(exercise), 'data-turbolinks': 'false') if policy(exercise).statistics?
|
||||||
|
@ -13,7 +13,7 @@ h1 = @exercise_collection
|
|||||||
/ Only before specific date: date = DateTime.parse("2015-01-01 00:00:00.000000") ; @exercise_collection.exercises.joins(:submissions).where(["submissions.created_at > ?", date]).group("submissions.contributor_id", "submissions.contributor_type").count.count
|
/ Only before specific date: date = DateTime.parse("2015-01-01 00:00:00.000000") ; @exercise_collection.exercises.joins(:submissions).where(["submissions.created_at > ?", date]).group("submissions.contributor_id", "submissions.contributor_type").count.count
|
||||||
/ Only with specific cause: @exercise_collection.exercises.joins(:submissions).where("submissions.cause" == 'assess').count
|
/ Only with specific cause: @exercise_collection.exercises.joins(:submissions).where("submissions.cause" == 'assess').count
|
||||||
|
|
||||||
= row(label: 'exercises.statistics.average_worktime', value: @exercise_collection.average_working_time.round(3).to_s + 's')
|
= row(label: 'exercises.statistics.average_worktime', value: "#{@exercise_collection.average_working_time.round(3)}s")
|
||||||
|
|
||||||
#graph
|
#graph
|
||||||
#data.d-none(data-working-times=ActiveSupport::JSON.encode(@exercise_collection.collection_statistics) data-average-working-time=@exercise_collection.average_working_time)
|
#data.d-none(data-working-times=ActiveSupport::JSON.encode(@exercise_collection.collection_statistics) data-average-working-time=@exercise_collection.average_working_time)
|
||||||
@ -28,7 +28,7 @@ h1 = @exercise_collection
|
|||||||
|
|
||||||
h4.mt-4 = t('activerecord.attributes.exercise_collections.exercises')
|
h4.mt-4 = t('activerecord.attributes.exercise_collections.exercises')
|
||||||
.table-responsive#exercise-list
|
.table-responsive#exercise-list
|
||||||
table.table class="#{@exercise_collection.items.present? ? 'sortable' : ''}"
|
table.table class=(@exercise_collection.items.present? ? 'sortable' : '')
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
th = '#'
|
th = '#'
|
||||||
@ -39,7 +39,7 @@ h4.mt-4 = t('activerecord.attributes.exercise_collections.exercises')
|
|||||||
th = t('activerecord.attributes.exercise.average_score_percentage')
|
th = t('activerecord.attributes.exercise.average_score_percentage')
|
||||||
th = t('shared.actions')
|
th = t('shared.actions')
|
||||||
tbody
|
tbody
|
||||||
- @exercise_collection.items.sort_by{|item| item.position}.each do |exercise_collection_item|
|
- @exercise_collection.items.sort_by(&:position).each do |exercise_collection_item|
|
||||||
- exercise = exercise_collection_item.exercise
|
- exercise = exercise_collection_item.exercise
|
||||||
tr
|
tr
|
||||||
td = exercise_collection_item.position
|
td = exercise_collection_item.position
|
||||||
@ -48,4 +48,4 @@ h4.mt-4 = t('activerecord.attributes.exercise_collections.exercises')
|
|||||||
td = exercise.submissions.send(:final).distinct.count(:contributor_id)
|
td = exercise.submissions.send(:final).distinct.count(:contributor_id)
|
||||||
td = exercise.finishers_percentage
|
td = exercise.finishers_percentage
|
||||||
td = exercise.average_percentage
|
td = exercise.average_percentage
|
||||||
td = link_to(t('shared.statistics'), statistics_exercise_path(exercise), 'data-turbolinks' => "false") if policy(exercise).statistics?
|
td = link_to(t('shared.statistics'), statistics_exercise_path(exercise), 'data-turbolinks': 'false') if policy(exercise).statistics?
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
.mb-3
|
.mb-3
|
||||||
= form.label(attribute, label, class: 'form-label')
|
= form.label(attribute, label, class: 'form-label')
|
||||||
= form.text_area(attribute, class: 'code-field form-control', rows: 16, style: "display:none;")
|
= form.text_area(attribute, class: 'code-field form-control', rows: 16, style: 'display:none;')
|
||||||
= render partial: 'editor_edit', locals: { exercise: @exercise }
|
= render partial: 'editor_edit', locals: {exercise: @exercise}
|
||||||
.card.border-warning.p-2.my-2
|
.card.border-warning.p-2.my-2
|
||||||
= form.file_field(attribute, class: 'form-control', style: "display: inline-block;")
|
= form.file_field(attribute, class: 'form-control', style: 'display: inline-block;')
|
||||||
.help-block.form-text = t('exercises.file_form.hints.upload')
|
.help-block.form-text = t('exercises.file_form.hints.upload')
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#otherComments
|
#otherComments
|
||||||
h5 =t('exercises.implement.comment.others')
|
h5 = t('exercises.implement.comment.others')
|
||||||
.container
|
.container
|
||||||
|
|
||||||
label
|
label
|
||||||
@ -7,6 +7,6 @@ label
|
|||||||
= t('request_for_comments.subscribe_to_author')
|
= t('request_for_comments.subscribe_to_author')
|
||||||
|
|
||||||
#myComment.d-grid
|
#myComment.d-grid
|
||||||
h5 =t('exercises.implement.comment.addyours')
|
h5 = t('exercises.implement.comment.addyours')
|
||||||
textarea.form-control
|
textarea.form-control
|
||||||
button#addCommentButton.btn.btn-primary(type='button') =t('exercises.implement.comment.addCommentButton')
|
button#addCommentButton.btn.btn-primary(type='button') = t('exercises.implement.comment.addCommentButton')
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
div.enforce-bottom-margin.overflow-scroll.d-none#download-files
|
.enforce-bottom-margin.overflow-scroll.d-none#download-files
|
||||||
.card.border-secondary
|
.card.border-secondary
|
||||||
.card-header.d-flex.justify-content-between.align-items-center.px-0.py-1
|
.card-header.d-flex.justify-content-between.align-items-center.px-0.py-1
|
||||||
.px-2 = t('exercises.download_file_tree.file_root')
|
.px-2 = t('exercises.download_file_tree.file_root')
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
- external_user_external_id = current_user.respond_to?(:external_id) ? current_user.external_id : ''
|
- external_user_external_id = current_user.respond_to?(:external_id) ? current_user.external_id : ''
|
||||||
- show_break_interventions = @show_break_interventions || "false"
|
- show_break_interventions = @show_break_interventions || 'false'
|
||||||
- show_rfc_interventions = @show_rfc_interventions || "false"
|
- show_rfc_interventions = @show_rfc_interventions || 'false'
|
||||||
- show_tips_interventions = @show_tips_interventions || "false"
|
- show_tips_interventions = @show_tips_interventions || 'false'
|
||||||
- hide_rfc_button = @hide_rfc_button || false
|
- hide_rfc_button = @hide_rfc_button || false
|
||||||
|
|
||||||
#editor.row data-exercise-id=@exercise.id data-message-depleted=t('exercises.editor.depleted') data-message-timeout=t('exercises.editor.timeout', permitted_execution_time: @exercise.execution_environment.permitted_execution_time) data-message-out-of-memory=t('exercises.editor.out_of_memory', memory_limit: @exercise.execution_environment.memory_limit) data-submissions-url=submissions_path data-user-external-id=external_user_external_id data-working-times-url=working_times_exercise_path(@exercise) data-intervention-save-url=intervention_exercise_path(@exercise) data-rfc-interventions=show_rfc_interventions data-break-interventions=show_break_interventions data-tips-interventions=show_tips_interventions
|
#editor.row data-exercise-id=@exercise.id data-message-depleted=t('exercises.editor.depleted') data-message-timeout=t('exercises.editor.timeout', permitted_execution_time: @exercise.execution_environment.permitted_execution_time) data-message-out-of-memory=t('exercises.editor.out_of_memory', memory_limit: @exercise.execution_environment.memory_limit) data-submissions-url=submissions_path data-user-external-id=external_user_external_id data-working-times-url=working_times_exercise_path(@exercise) data-intervention-save-url=intervention_exercise_path(@exercise) data-rfc-interventions=show_rfc_interventions data-break-interventions=show_break_interventions data-tips-interventions=show_tips_interventions
|
||||||
- unless @embed_options[:hide_sidebar]
|
- unless @embed_options[:hide_sidebar]
|
||||||
- additional_classes = 'sidebar-col'
|
- additional_classes = 'sidebar-col'
|
||||||
- if @tips.blank?
|
- if @tips.blank?
|
||||||
@ -12,24 +12,23 @@
|
|||||||
- additional_classes = 'sidebar-col-collapsed'
|
- additional_classes = 'sidebar-col-collapsed'
|
||||||
- else
|
- else
|
||||||
- additional_classes = 'sidebar-col w-25'
|
- additional_classes = 'sidebar-col w-25'
|
||||||
div id="sidebar" class=additional_classes = render('editor_file_tree', exercise: @exercise, files: @files)
|
#sidebar class=additional_classes = render('editor_file_tree', exercise: @exercise, files: @files)
|
||||||
|
|
||||||
|
.editor-col.col.p-0#frames
|
||||||
div.editor-col.col.p-0 id='frames'
|
|
||||||
#editor-buttons.btn-group.enforce-bottom-margin
|
#editor-buttons.btn-group.enforce-bottom-margin
|
||||||
= render('editor_button', disabled: true, icon: 'fa-solid fa-ban', id: 'dummy', label: t('exercises.editor.dummy'))
|
= render('editor_button', disabled: true, icon: 'fa-solid fa-ban', id: 'dummy', label: t('exercises.editor.dummy'))
|
||||||
= render('editor_button', icon: 'fa-solid fa-desktop', id: 'render', label: t('exercises.editor.render')) unless @embed_options[:hide_run_button]
|
= render('editor_button', icon: 'fa-solid fa-desktop', id: 'render', label: t('exercises.editor.render')) unless @embed_options[:hide_run_button]
|
||||||
span.flex-grow-1.d-inline-flex#run-stop-button-group data-bs-placement='top' data-bs-toggle='tooltip' data-bs-container='body' title=t('shared.tooltips.shortcut', shortcut: 'ALT + r')
|
span.flex-grow-1.d-inline-flex#run-stop-button-group data-bs-placement='top' data-bs-toggle='tooltip' data-bs-container='body' title=t('shared.tooltips.shortcut', shortcut: 'ALT + r')
|
||||||
= render('editor_button', data: {:'data-message-failure' => t('exercises.editor.run_failure'), :'data-message-network' => t('exercises.editor.network'), :'data-message-success' => t('exercises.editor.run_success'),}, icon: 'fa-solid fa-play', id: 'run', label: t('exercises.editor.run'), classes: 'w-100 h-100 btn-primary') unless @embed_options[:disable_run]
|
= render('editor_button', data: {'data-message-failure': t('exercises.editor.run_failure'), 'data-message-network': t('exercises.editor.network'), 'data-message-success': t('exercises.editor.run_success')}, icon: 'fa-solid fa-play', id: 'run', label: t('exercises.editor.run'), classes: 'w-100 h-100 btn-primary') unless @embed_options[:disable_run]
|
||||||
= render('editor_button', icon: 'fa-solid fa-stop', id: 'stop', label: t('exercises.editor.stop'), classes: 'w-100 h-100 btn-primary') unless @embed_options[:disable_run]
|
= render('editor_button', icon: 'fa-solid fa-stop', id: 'stop', label: t('exercises.editor.stop'), classes: 'w-100 h-100 btn-primary') unless @embed_options[:disable_run]
|
||||||
= render('editor_button', data: {:'data-bs-placement' => 'top', :'data-bs-toggle' => 'tooltip', :'data-bs-container' => 'body'}, icon: 'fa-solid fa-rocket', id: 'test', label: t('exercises.editor.test'), title: t('shared.tooltips.shortcut', shortcut: 'ALT + t')) unless @embed_options[:disable_run]
|
= render('editor_button', data: {'data-bs-placement': 'top', 'data-bs-toggle': 'tooltip', 'data-bs-container': 'body'}, icon: 'fa-solid fa-rocket', id: 'test', label: t('exercises.editor.test'), title: t('shared.tooltips.shortcut', shortcut: 'ALT + t')) unless @embed_options[:disable_run]
|
||||||
= render('editor_button', data: {:'data-bs-placement' => 'top', :'data-bs-toggle' => 'tooltip', :'data-bs-container' => 'body'}, icon: 'fa-solid fa-trophy', id: 'assess', label: t('exercises.editor.score'), title: t('shared.tooltips.shortcut', shortcut: 'ALT + s')) unless @embed_options[:disable_score]
|
= render('editor_button', data: {'data-bs-placement': 'top', 'data-bs-toggle': 'tooltip', 'data-bs-container': 'body'}, icon: 'fa-solid fa-trophy', id: 'assess', label: t('exercises.editor.score'), title: t('shared.tooltips.shortcut', shortcut: 'ALT + s')) unless @embed_options[:disable_score]
|
||||||
- unless hide_rfc_button
|
- unless hide_rfc_button
|
||||||
= render('editor_button', data: {:'data-bs-placement' => 'top', :'data-bs-toggle' => 'tooltip', :'data-bs-container' => 'body'}, icon: 'fa-solid fa-comment', id: 'requestComments', label: t('exercises.editor.requestComments'), title: t('exercises.editor.requestCommentsTooltip'))
|
= render('editor_button', data: {'data-bs-placement': 'top', 'data-bs-toggle': 'tooltip', 'data-bs-container': 'body'}, icon: 'fa-solid fa-comment', id: 'requestComments', label: t('exercises.editor.requestComments'), title: t('exercises.editor.requestCommentsTooltip'))
|
||||||
|
|
||||||
- @files.each do |file|
|
- @files.each do |file|
|
||||||
- file.read_only = true if @embed_options[:read_only]
|
- file.read_only = true if @embed_options[:read_only]
|
||||||
= render('editor_frame', exercise: exercise, file: file)
|
= render('editor_frame', exercise:, file:)
|
||||||
|
|
||||||
#statusbar.d-flex.justify-content-between
|
#statusbar.d-flex.justify-content-between
|
||||||
div
|
div
|
||||||
@ -50,11 +49,11 @@
|
|||||||
- if current_contributor.programming_group?
|
- if current_contributor.programming_group?
|
||||||
span#pg_session
|
span#pg_session
|
||||||
= t('exercises.editor.is_offline', name: @programming_partners_name)
|
= t('exercises.editor.is_offline', name: @programming_partners_name)
|
||||||
= " | "
|
= ' | '
|
||||||
= t('exercises.editor.lastsaved')
|
= t('exercises.editor.lastsaved')
|
||||||
span id="autosave"
|
span#autosave
|
||||||
|
|
||||||
= " | "
|
= ' | '
|
||||||
|
|
||||||
button#start-over-active-file.p-0.border-0.btn-link.bg-body.text-primary data-message-confirm=t('exercises.editor.confirm_start_over_active_file') data-url=reload_exercise_path(@exercise)
|
button#start-over-active-file.p-0.border-0.btn-link.bg-body.text-primary data-message-confirm=t('exercises.editor.confirm_start_over_active_file') data-url=reload_exercise_path(@exercise)
|
||||||
i.fa-solid.fa-circle-notch.fa-spin.d-none
|
i.fa-solid.fa-circle-notch.fa-spin.d-none
|
||||||
@ -62,9 +61,8 @@
|
|||||||
= t('exercises.editor.start_over_active_file')
|
= t('exercises.editor.start_over_active_file')
|
||||||
|
|
||||||
- unless @embed_options[:disable_run] && @embed_options[:disable_score]
|
- unless @embed_options[:disable_run] && @embed_options[:disable_score]
|
||||||
div id='output_sidebar' class='output-col-collapsed' = render('exercises/editor_output')
|
.output-col-collapsed#output_sidebar = render('exercises/editor_output')
|
||||||
|
|
||||||
|
|
||||||
= render('shared/modal', id: 'comment-modal', title: t('exercises.implement.comment.request'), template: 'exercises/_request_comment_dialogcontent') unless @embed_options[:disable_rfc]
|
= render('shared/modal', id: 'comment-modal', title: t('exercises.implement.comment.request'), template: 'exercises/_request_comment_dialogcontent') unless @embed_options[:disable_rfc]
|
||||||
= render('shared/modal', id: 'break-intervention-modal', title: t('exercises.implement.break_intervention.title'), template: 'interventions/_break_intervention_modal') unless @embed_options[:disable_interventions]
|
= render('shared/modal', id: 'break-intervention-modal', title: t('exercises.implement.break_intervention.title'), template: 'interventions/_break_intervention_modal') unless @embed_options[:disable_interventions]
|
||||||
= render('shared/modal', id: 'tips-intervention-modal', title: t('exercises.implement.tips.heading'), template: 'interventions/_tips_intervention_modal') unless @embed_options[:disable_hints] or @tips.blank?
|
= render('shared/modal', id: 'tips-intervention-modal', title: t('exercises.implement.tips.heading'), template: 'interventions/_tips_intervention_modal') unless @embed_options[:disable_hints] || @tips.blank?
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
button.btn class=local_assigns.fetch(:classes, 'btn-primary') *local_assigns.fetch(:data, {}) disabled=local_assigns.fetch(:disabled, false) id=id title=local_assigns[:title] type='button'
|
button.btn class=local_assigns.fetch(:classes, 'btn-primary') *local_assigns.fetch(:data, {}) disabled=local_assigns.fetch(:disabled, false) id=id title=local_assigns[:title] type='button'
|
||||||
i.fa-solid.fa-circle-notch.fa-spin.d-none class=(label.blank? ? "m-0" : '')
|
i.fa-solid.fa-circle-notch.fa-spin.d-none class=(label.blank? ? 'm-0' : '')
|
||||||
i class=(label.present? ? icon : "#{icon} m-0")
|
i class=(label.present? ? icon : "#{icon} m-0")
|
||||||
= label
|
= label
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
#frames
|
#frames
|
||||||
.edit-frame
|
.edit-frame
|
||||||
.editor-content.d-none
|
.editor-content.d-none
|
||||||
.editor.allow_ace_tooltip
|
.editor.allow_ace_tooltip
|
||||||
|
@ -1,24 +1,24 @@
|
|||||||
div.d-grid.gap-2 id='sidebar-collapsed' class=(@exercise.hide_file_tree && @tips.blank? ? '' : 'd-none')
|
.d-grid.gap-2#sidebar-collapsed class=(@exercise.hide_file_tree && @tips.blank? ? '' : 'd-none')
|
||||||
= render('editor_button', classes: 'btn-outline-contrast', data: {:'data-bs-toggle' => 'tooltip', :'data-bs-placement' => 'right'}, icon: 'fa-solid fa-square-plus', id: 'sidebar-collapse-collapsed', label:'', title:t('exercises.editor.expand_action_sidebar'))
|
= render('editor_button', classes: 'btn-outline-contrast', data: {'data-bs-toggle': 'tooltip', 'data-bs-placement': 'right'}, icon: 'fa-solid fa-square-plus', id: 'sidebar-collapse-collapsed', label: '', title: t('exercises.editor.expand_action_sidebar'))
|
||||||
|
|
||||||
- unless @embed_options[:disable_hints] or @tips.blank?
|
- unless @embed_options[:disable_hints] || @tips.blank?
|
||||||
= render('editor_button', classes: 'btn-secondary btn mb-4', data: {:'data-bs-toggle' => 'tooltip', :'data-bs-placement' => 'right'}, icon: 'fa-solid fa-lightbulb', id: 'tips-collapsed', label:'', title: t('exercises.form.tips'))
|
= render('editor_button', classes: 'btn-secondary btn mb-4', data: {'data-bs-toggle': 'tooltip', 'data-bs-placement': 'right'}, icon: 'fa-solid fa-lightbulb', id: 'tips-collapsed', label: '', title: t('exercises.form.tips'))
|
||||||
|
|
||||||
div.d-grid.enforce-bottom-margin id='sidebar-uncollapsed' class=(@exercise.hide_file_tree && @tips.blank? ? 'd-none' : '')
|
.d-grid.enforce-bottom-margin#sidebar-uncollapsed class=(@exercise.hide_file_tree && @tips.blank? ? 'd-none' : '')
|
||||||
= render('editor_button', classes: 'btn-outline-contrast overflow-hidden mb-2', icon: 'fa-solid fa-square-minus', id: 'sidebar-collapse', label: t('exercises.editor.collapse_action_sidebar'))
|
= render('editor_button', classes: 'btn-outline-contrast overflow-hidden mb-2', icon: 'fa-solid fa-square-minus', id: 'sidebar-collapse', label: t('exercises.editor.collapse_action_sidebar'))
|
||||||
#content-left-sidebar.overflow-scroll
|
#content-left-sidebar.overflow-scroll
|
||||||
- unless @exercise.hide_file_tree
|
- unless @exercise.hide_file_tree
|
||||||
div.overflow-scroll
|
.overflow-scroll
|
||||||
.card.border-secondary
|
.card.border-secondary
|
||||||
.card-header.d-flex.justify-content-between.align-items-center.px-0.py-1
|
.card-header.d-flex.justify-content-between.align-items-center.px-0.py-1
|
||||||
.px-2 = I18n.t('exercises.editor_file_tree.file_root')
|
.px-2 = I18n.t('exercises.editor_file_tree.file_root')
|
||||||
div
|
div
|
||||||
- if @exercise.allow_file_creation
|
- if @exercise.allow_file_creation
|
||||||
= render('editor_button', classes: 'btn-default btn-sm', data: {:'data-bs-toggle' => 'tooltip', :'data-cause' => 'file'}, icon: 'fa-solid fa-plus', id: 'create-file', label: '', title: t('exercises.editor.create_file'))
|
= render('editor_button', classes: 'btn-default btn-sm', data: {'data-bs-toggle': 'tooltip', 'data-cause': 'file'}, icon: 'fa-solid fa-plus', id: 'create-file', label: '', title: t('exercises.editor.create_file'))
|
||||||
= render('editor_button', classes: 'btn-default btn-sm', data: {:'data-bs-toggle' => 'tooltip', :'data-cause' => 'file' }, icon: 'fa-regular fa-trash-can', id: 'destroy-file', label: '', title: t('exercises.editor.destroy_file'))
|
= render('editor_button', classes: 'btn-default btn-sm', data: {'data-bs-toggle': 'tooltip', 'data-cause': 'file'}, icon: 'fa-regular fa-trash-can', id: 'destroy-file', label: '', title: t('exercises.editor.destroy_file'))
|
||||||
- unless @embed_options[:disable_download]
|
- unless @embed_options[:disable_download]
|
||||||
= render('editor_button', classes: 'btn-default btn-sm', data: {:'data-bs-toggle' => 'tooltip'}, icon: 'fa-solid fa-arrow-down', id: 'download', label:'', title: t('exercises.editor.download'))
|
= render('editor_button', classes: 'btn-default btn-sm', data: {'data-bs-toggle': 'tooltip'}, icon: 'fa-solid fa-arrow-down', id: 'download', label: '', title: t('exercises.editor.download'))
|
||||||
= render('editor_button', classes: 'btn-default btn-sm', data: {:'data-bs-toggle' => 'tooltip', :'data-message-confirm' => t('exercises.editor.confirm_start_over'), :'data-url' => reload_exercise_path(@exercise)}, icon: 'fa-solid fa-clock-rotate-left', id: 'start-over', label: '', title: t('exercises.editor.start_over'))
|
= render('editor_button', classes: 'btn-default btn-sm', data: {'data-bs-toggle': 'tooltip', 'data-message-confirm': t('exercises.editor.confirm_start_over'), 'data-url': reload_exercise_path(@exercise)}, icon: 'fa-solid fa-clock-rotate-left', id: 'start-over', label: '', title: t('exercises.editor.start_over'))
|
||||||
|
|
||||||
.card-body.pt-0.pe-0.ps-1.pb-1
|
.card-body.pt-0.pe-0.ps-1.pb-1
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ div.d-grid.enforce-bottom-margin id='sidebar-uncollapsed' class=(@exercise.hide_
|
|||||||
|
|
||||||
hr
|
hr
|
||||||
|
|
||||||
- unless @embed_options[:disable_hints] or @tips.blank?
|
- unless @embed_options[:disable_hints] || @tips.blank?
|
||||||
= render(partial: 'tips_content')
|
= render(partial: 'tips_content')
|
||||||
|
|
||||||
- if @exercise.allow_file_creation?
|
- if @exercise.allow_file_creation?
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
div class=(defined?(own_solution) ? "own-frame" : "frame") data-executable=file.file_type.executable? data-filename=file.filepath data-renderable=file.file_type.renderable? data-role=file.role data-binary=file.file_type.binary? data-read-only=file.read_only
|
div class=(defined?(own_solution) ? 'own-frame' : 'frame') data-executable=file.file_type.executable? data-filename=file.filepath data-renderable=file.file_type.renderable? data-role=file.role data-binary=file.file_type.binary? data-read-only=file.read_only
|
||||||
- if file.file_type.binary?
|
- if file.file_type.binary?
|
||||||
- file_path = protected_upload_path(id: file.id, filename: file.filepath)
|
- file_path = protected_upload_path(id: file.id, filename: file.filepath)
|
||||||
.binary-file data-file-id=file.ancestor_id
|
.binary-file data-file-id=file.ancestor_id
|
||||||
@ -13,4 +13,4 @@ div class=(defined?(own_solution) ? "own-frame" : "frame") data-executable=file.
|
|||||||
= link_to(file.native_file.file.filename, file_path)
|
= link_to(file.native_file.file.filename, file_path)
|
||||||
- else
|
- else
|
||||||
.editor-content.d-none data-file-id=file.ancestor_id = file.content
|
.editor-content.d-none data-file-id=file.ancestor_id = file.content
|
||||||
div class=(defined?(own_solution) ? "own-editor" : "editor") data-file-id=file.ancestor_id data-indent-size=file.file_type.indent_size data-mode=file.file_type.editor_mode data-allow-auto-completion=exercise.allow_auto_completion.to_s data-id=file.id
|
div class=(defined?(own_solution) ? 'own-editor' : 'editor') data-file-id=file.ancestor_id data-indent-size=file.file_type.indent_size data-mode=file.file_type.editor_mode data-allow-auto-completion=exercise.allow_auto_completion.to_s data-id=file.id
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
div.d-grid id='output_sidebar_collapsed'
|
.d-grid#output_sidebar_collapsed
|
||||||
= render('editor_button', classes: 'btn-outline-contrast btn', data: {:'data-bs-toggle' => 'tooltip', :'data-bs-placement' => 'left'}, title: t('exercises.editor.expand_output_sidebar'), icon: 'fa-solid fa-square-plus', id: 'toggle-sidebar-output-collapsed', label: '')
|
= render('editor_button', classes: 'btn-outline-contrast btn', data: {'data-bs-toggle': 'tooltip', 'data-bs-placement': 'left'}, title: t('exercises.editor.expand_output_sidebar'), icon: 'fa-solid fa-square-plus', id: 'toggle-sidebar-output-collapsed', label: '')
|
||||||
div.d-grid id='output_sidebar_uncollapsed' class='d-none col-sm-12 enforce-bottom-margin' data-message-no-output=t('exercises.implement.no_output_yet')
|
.d-grid.d-none.col-sm-12.enforce-bottom-margin#output_sidebar_uncollapsed data-message-no-output=t('exercises.implement.no_output_yet')
|
||||||
= render('editor_button', classes: 'btn-outline-contrast btn overflow-hidden mb-2', icon: 'fa-solid fa-square-minus', id: 'toggle-sidebar-output', label: t('exercises.editor.collapse_output_sidebar'))
|
= render('editor_button', classes: 'btn-outline-contrast btn overflow-hidden mb-2', icon: 'fa-solid fa-square-minus', id: 'toggle-sidebar-output', label: t('exercises.editor.collapse_output_sidebar'))
|
||||||
|
|
||||||
|
|
||||||
#content-right-sidebar.overflow-scroll
|
#content-right-sidebar.overflow-scroll
|
||||||
= render('download_file_tree')
|
= render('download_file_tree')
|
||||||
|
|
||||||
div.enforce-bottom-margin.overflow-auto.d-none id='score_div'
|
.enforce-bottom-margin.overflow-auto.d-none#score_div
|
||||||
#results
|
#results
|
||||||
h2 = t('exercises.implement.results')
|
h2 = t('exercises.implement.results')
|
||||||
p.test-count == t('exercises.implement.test_count', count: 0)
|
p.test-count == t('exercises.implement.test_count', count: 0)
|
||||||
@ -67,12 +66,12 @@ div.d-grid id='output_sidebar_uncollapsed' class='d-none col-sm-12 enforce-botto
|
|||||||
hr
|
hr
|
||||||
#turtlediv.enforce-big-bottom-margin.overflow-auto.d-none
|
#turtlediv.enforce-big-bottom-margin.overflow-auto.d-none
|
||||||
canvas#turtlecanvas width=400 height=400
|
canvas#turtlecanvas width=400 height=400
|
||||||
div.enforce-big-bottom-margin.overflow-auto
|
.enforce-big-bottom-margin.overflow-auto
|
||||||
#prompt.input-group.mb-2.d-none
|
#prompt.input-group.mb-2.d-none
|
||||||
span.input-group-text data-prompt=t('exercises.editor.input') = t('exercises.editor.input')
|
span.input-group-text data-prompt=t('exercises.editor.input') = t('exercises.editor.input')
|
||||||
input#prompt-input.form-control type='text'
|
input#prompt-input.form-control type='text'
|
||||||
span.input-group-btn
|
span.input-group-btn
|
||||||
button#prompt-submit.btn.btn-primary type="button" = t('exercises.editor.send')
|
button#prompt-submit.btn.btn-primary type='button' = t('exercises.editor.send')
|
||||||
- unless @embed_options[:disable_hints]
|
- unless @embed_options[:disable_hints]
|
||||||
#error-hints.mb-2.p-2
|
#error-hints.mb-2.p-2
|
||||||
.heading = t('exercises.implement.error_hints.heading')
|
.heading = t('exercises.implement.error_hints.heading')
|
||||||
|
@ -2,12 +2,10 @@
|
|||||||
= button_tag type: 'button', class: 'btn btn-primary float-end export-button export-retry-button', data: {exercise_id: exercise.id} do
|
= button_tag type: 'button', class: 'btn btn-primary float-end export-button export-retry-button', data: {exercise_id: exercise.id} do
|
||||||
i.fa-solid.fa-arrows-rotate.confirm-icon
|
i.fa-solid.fa-arrows-rotate.confirm-icon
|
||||||
= t('exercises.export_codeharbor.buttons.retry')
|
= t('exercises.export_codeharbor.buttons.retry')
|
||||||
- else
|
- elsif !exported && (!uuid_found || update_right)
|
||||||
- unless exported
|
= button_tag type: 'button', class: 'btn btn-primary float-end export-action export-button', data: {exercise_id: exercise.id} do
|
||||||
- if !uuid_found || update_right
|
i.fa-solid.fa-check.confirm-icon
|
||||||
= button_tag type: 'button', class: 'btn btn-primary float-end export-action export-button', data: {exercise_id: exercise.id} do
|
= t('exercises.export_codeharbor.buttons.export')
|
||||||
i.fa-solid.fa-check.confirm-icon
|
|
||||||
= t('exercises.export_codeharbor.buttons.export')
|
|
||||||
|
|
||||||
= button_tag type: 'submit', class: 'btn btn-secondary float-end export-button', data: {bs_dismiss: 'modal'} do
|
= button_tag type: 'submit', class: 'btn btn-secondary float-end export-button', data: {bs_dismiss: 'modal'} do
|
||||||
i.fa-solid.fa-xmark.abort-icon
|
i.fa-solid.fa-xmark.abort-icon
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
- id = f.object.id
|
- id = f.object.id
|
||||||
|
|
||||||
li.card.mt-2
|
li.card.mt-2
|
||||||
.card-header role="tab" id="heading"
|
.card-header#heading role='tab'
|
||||||
- collapsed_class = f.index != 'index' ? 'collapsed' : nil
|
- collapsed_class = f.index == 'index' ? nil : 'collapsed'
|
||||||
- aria_expanded = f.index != 'index' ? 'false' : 'true'
|
- aria_expanded = f.index == 'index' ? 'true' : 'false'
|
||||||
a class=['file-heading', collapsed_class] data-bs-toggle="collapse" href="#collapse#{f.index}" aria-expanded="#{aria_expanded}"
|
a class=['file-heading', collapsed_class] data-bs-toggle='collapse' href="#collapse#{f.index}" aria-expanded=aria_expanded
|
||||||
div.clearfix role="button"
|
.clearfix role='button'
|
||||||
i.fa-solid aria-hidden="true"
|
i.fa-solid aria-hidden='true'
|
||||||
span = f.object.filepath
|
span = f.object.filepath
|
||||||
.card-collapse.collapse class=('in' if f.object.name.nil?) id="collapse#{f.index}" role="tabpanel"
|
.card-collapse.collapse class=('in' if f.object.name.nil?) id="collapse#{f.index}" role='tabpanel'
|
||||||
.card-body
|
.card-body
|
||||||
- if policy(f.object).destroy? && id.present?
|
- if policy(f.object).destroy? && id.present?
|
||||||
.clearfix
|
.clearfix
|
||||||
@ -25,7 +25,7 @@ li.card.mt-2
|
|||||||
= f.collection_select(:file_type_id, @file_types, :id, :name, {}, class: 'form-control')
|
= f.collection_select(:file_type_id, @file_types, :id, :name, {}, class: 'form-control')
|
||||||
.mb-3
|
.mb-3
|
||||||
= f.label(:role, t('activerecord.attributes.file.role'), class: 'form-label')
|
= f.label(:role, t('activerecord.attributes.file.role'), class: 'form-label')
|
||||||
= f.select(:role, CodeOcean::File::TEACHER_DEFINED_ROLES.map { |role| [t("files.roles.#{role}"), role] }, {}, class: 'form-control')
|
= f.select(:role, CodeOcean::File::TEACHER_DEFINED_ROLES.map {|role| [t("files.roles.#{role}"), role] }, {}, class: 'form-control')
|
||||||
.form-check
|
.form-check
|
||||||
label.form-check-label
|
label.form-check-label
|
||||||
= f.check_box(:hidden, class: 'form-check-input')
|
= f.check_box(:hidden, class: 'form-check-input')
|
||||||
|
@ -4,10 +4,10 @@
|
|||||||
meta name='turbolinks-visit-control' content='reload'
|
meta name='turbolinks-visit-control' content='reload'
|
||||||
- append_javascript_pack_tag('sortable')
|
- append_javascript_pack_tag('sortable')
|
||||||
|
|
||||||
- execution_environments = ExecutionEnvironment.where('file_type_id IS NOT NULL').select(:file_type_id, :id)
|
- execution_environments = ExecutionEnvironment.where.not(file_type_id: nil).select(:file_type_id, :id)
|
||||||
- file_types = FileType.where('file_extension IS NOT NULL').select(:file_extension, :id)
|
- file_types = FileType.where.not(file_extension: nil).select(:file_extension, :id)
|
||||||
|
|
||||||
= form_for(@exercise, data: {execution_environments: execution_environments, file_types: file_types}, multipart: true, builder: PagedownFormBuilder) do |f|
|
= form_for(@exercise, data: {execution_environments:, file_types:}, multipart: true, builder: PagedownFormBuilder) do |f|
|
||||||
= render('shared/form_errors', object: @exercise)
|
= render('shared/form_errors', object: @exercise)
|
||||||
.mb-3
|
.mb-3
|
||||||
= f.label(:title, class: 'form-label')
|
= f.label(:title, class: 'form-label')
|
||||||
@ -18,7 +18,7 @@
|
|||||||
.help-block.form-text == t('.hints.internal_title')
|
.help-block.form-text == t('.hints.internal_title')
|
||||||
.mb-3
|
.mb-3
|
||||||
= f.label(:description, class: 'form-label')
|
= f.label(:description, class: 'form-label')
|
||||||
= f.pagedown :description, input_html: { preview: true, rows: 10 }
|
= f.pagedown :description, input_html: {preview: true, rows: 10}
|
||||||
.mb-3
|
.mb-3
|
||||||
= f.label(:execution_environment_id, class: 'form-label')
|
= f.label(:execution_environment_id, class: 'form-label')
|
||||||
= f.collection_select(:execution_environment_id, @execution_environments, :id, :name, {include_blank: t('exercises.form.none')}, class: 'form-control')
|
= f.collection_select(:execution_environment_id, @execution_environments, :id, :name, {include_blank: t('exercises.form.none')}, class: 'form-control')
|
||||||
@ -63,11 +63,11 @@
|
|||||||
h2 = t('exercises.form.tags')
|
h2 = t('exercises.form.tags')
|
||||||
ul.list-unstyled.card-group
|
ul.list-unstyled.card-group
|
||||||
li.card
|
li.card
|
||||||
.card-header role="tab" id="heading"
|
.card-header#heading role='tab'
|
||||||
a.file-heading data-bs-toggle="collapse" href="#tag-collapse"
|
a.file-heading data-bs-toggle='collapse' href='#tag-collapse'
|
||||||
div.clearfix role="button"
|
.clearfix role='button'
|
||||||
span = t('exercises.form.click_to_collapse')
|
span = t('exercises.form.click_to_collapse')
|
||||||
.card-collapse.collapse id="tag-collapse" role="tabpanel"
|
.card-collapse.collapse#tag-collapse role='tabpanel'
|
||||||
.table-responsive
|
.table-responsive
|
||||||
table.table#tags-table
|
table.table#tags-table
|
||||||
thead
|
thead
|
||||||
@ -79,17 +79,17 @@
|
|||||||
tr
|
tr
|
||||||
td = b.check_box class: 'form-check-input'
|
td = b.check_box class: 'form-check-input'
|
||||||
td = b.object.tag.name
|
td = b.object.tag.name
|
||||||
td = number_field "tag_factors[#{b.object.tag.id}]", :factor, :value => b.object.factor, in: 1..10, step: 1, class: 'form-control form-control-sm'
|
td = number_field "tag_factors[#{b.object.tag.id}]", :factor, value: b.object.factor, in: 1..10, step: 1, class: 'form-control form-control-sm'
|
||||||
|
|
||||||
h2 = t('.tips')
|
h2 = t('.tips')
|
||||||
ul.list-unstyled.card-group
|
ul.list-unstyled.card-group
|
||||||
li.card
|
li.card
|
||||||
.card-header role="tab" id="tip-heading"
|
.card-header#tip-heading role='tab'
|
||||||
a.file-heading data-bs-toggle="collapse" href="#tip-collapse"
|
a.file-heading data-bs-toggle='collapse' href='#tip-collapse'
|
||||||
div.clearfix role="button"
|
.clearfix role='button'
|
||||||
span = t('exercises.form.click_to_collapse')
|
span = t('exercises.form.click_to_collapse')
|
||||||
.card-collapse.collapse.mx-2 id="tip-collapse" role="tabpanel"
|
.card-collapse.collapse.mx-2#tip-collapse role='tabpanel'
|
||||||
= f.hidden_field(:tips, id: "tips-json", value: "")
|
= f.hidden_field(:tips, id: 'tips-json', value: '')
|
||||||
.list-group.nested-sortable-list.mt-2#tip-list
|
.list-group.nested-sortable-list.mt-2#tip-list
|
||||||
= render(partial: 'tips/sortable_tip', collection: @tips, as: :exercise_tip)
|
= render(partial: 'tips/sortable_tip', collection: @tips, as: :exercise_tip)
|
||||||
button.btn.btn-outline-primary.my-2.w-100 type='button' data-bs-toggle='modal' data-bs-target='#add-tips-modal' = t('.add_tips')
|
button.btn.btn-outline-primary.my-2.w-100 type='button' data-bs-toggle='modal' data-bs-target='#add-tips-modal' = t('.add_tips')
|
||||||
@ -103,6 +103,6 @@
|
|||||||
ul#dummies.d-none = f.fields_for(:files, CodeOcean::File.new, child_index: 'index') do |files_form|
|
ul#dummies.d-none = f.fields_for(:files, CodeOcean::File.new, child_index: 'index') do |files_form|
|
||||||
= render('file_form', f: files_form)
|
= render('file_form', f: files_form)
|
||||||
|
|
||||||
.actions = render('shared/submit_button', f: f, object: @exercise)
|
.actions = render('shared/submit_button', f:, object: @exercise)
|
||||||
|
|
||||||
= render('shared/modal', id: 'add-tips-modal', title: t('.add_tips'), template: 'exercises/_add_tip_modal')
|
= render('shared/modal', id: 'add-tips-modal', title: t('.add_tips'), template: 'exercises/_add_tip_modal')
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#rfc_intervention_text style='display: none;' == t('exercises.implement.rfc_intervention.text')
|
#rfc_intervention_text style='display: none;' == t('exercises.implement.rfc_intervention.text')
|
||||||
== t('exercises.implement.comment.question')
|
== t('exercises.implement.comment.question')
|
||||||
|
|
||||||
|
|
||||||
textarea.form-control.flex-grow-1#question(style='resize:none; height: 15vh;')
|
textarea.form-control.flex-grow-1#question(style='resize:none; height: 15vh;')
|
||||||
p = ''
|
p = ''
|
||||||
/ data-cause='requestComments' is not used here right now, we pass the button #requestComments (not askForCommentsButton) as initiator of the action.
|
/ data-cause='requestComments' is not used here right now, we pass the button #requestComments (not askForCommentsButton) as initiator of the action.
|
||||||
@ -9,5 +8,5 @@ p = ''
|
|||||||
.d-grid.gap-2
|
.d-grid.gap-2
|
||||||
button#askForCommentsButton.btn.btn-primary(type='button' data-cause='requestComments' data-message-success=t('exercises.editor.request_for_comments_sent'))
|
button#askForCommentsButton.btn.btn-primary(type='button' data-cause='requestComments' data-message-success=t('exercises.editor.request_for_comments_sent'))
|
||||||
i.fa-solid.fa-circle-notch.fa-spin.d-none
|
i.fa-solid.fa-circle-notch.fa-spin.d-none
|
||||||
=t('exercises.implement.comment.request')
|
= t('exercises.implement.comment.request')
|
||||||
button#closeAskForCommentsButton.btn.btn-warning(type='button') =t('activerecord.attributes.request_for_comments.close')
|
button#closeAskForCommentsButton.btn.btn-warning(type='button') = t('activerecord.attributes.request_for_comments.close')
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
- append_javascript_pack_tag('highlight')
|
- append_javascript_pack_tag('highlight')
|
||||||
- append_stylesheet_pack_tag('highlight')
|
- append_stylesheet_pack_tag('highlight')
|
||||||
|
|
||||||
#tips.card.d-block.overflow-scroll role="tab"
|
#tips.card.d-block.overflow-scroll role='tab'
|
||||||
.card-header.py-2
|
.card-header.py-2
|
||||||
i.fa-solid.fa-lightbulb
|
i.fa-solid.fa-lightbulb
|
||||||
= t('exercises.implement.tips.heading')
|
= t('exercises.implement.tips.heading')
|
||||||
.card-body.p-2
|
.card-body.p-2
|
||||||
= render(partial: 'tips/collapsed_card', collection: @tips, as: :exercise_tip, locals: { tip_prefix: '' })
|
= render(partial: 'tips/collapsed_card', collection: @tips, as: :exercise_tip, locals: {tip_prefix: ''})
|
||||||
|
@ -3,19 +3,17 @@ h1
|
|||||||
' (external user
|
' (external user
|
||||||
= link_to_if(policy(@external_user).show?, @external_user.displayname, @external_user)
|
= link_to_if(policy(@external_user).show?, @external_user.displayname, @external_user)
|
||||||
' )
|
' )
|
||||||
- submissions = @all_events.filter{|event| event.is_a? Submission}
|
- submissions = @all_events.filter {|event| event.is_a? Submission }
|
||||||
- current_submission = submissions.first
|
- current_submission = submissions.first
|
||||||
- if current_submission
|
- if current_submission
|
||||||
- initial_files = current_submission.files.to_a
|
|
||||||
|
|
||||||
- all_files = []
|
- all_files = []
|
||||||
- file_types = Set.new()
|
- file_types = Set.new
|
||||||
- submissions.each do |submission|
|
- submissions.each do |submission|
|
||||||
- submission.files.each do |file|
|
- submission.files.each do |file|
|
||||||
- file_types.add(ActiveSupport::JSON.encode(file.file_type))
|
- file_types.add(ActiveSupport::JSON.encode(file.file_type))
|
||||||
- all_files.push(submission.files)
|
- all_files.push(submission.files)
|
||||||
- all_files.reject!(&:blank?)
|
- all_files.compact_blank!
|
||||||
- file_types.reject!(&:blank?)
|
- file_types.reject!(&:blank?) # rubocop:disable Rails/CompactBlank because it's a set
|
||||||
|
|
||||||
.d-none#data data-submissions=ActiveSupport::JSON.encode(submissions) data-files=ActiveSupport::JSON.encode(all_files) data-file-types=ActiveSupport::JSON.encode(file_types)
|
.d-none#data data-submissions=ActiveSupport::JSON.encode(submissions) data-files=ActiveSupport::JSON.encode(all_files) data-file-types=ActiveSupport::JSON.encode(file_types)
|
||||||
|
|
||||||
@ -28,16 +26,16 @@ h1
|
|||||||
#current-file.editor
|
#current-file.editor
|
||||||
|
|
||||||
.flex-container
|
.flex-container
|
||||||
button.btn.btn-secondary id='play-button'
|
button.btn.btn-secondary#play-button
|
||||||
span.fa-solid.fa-play
|
span.fa-solid.fa-play
|
||||||
#submissions-slider.flex-item
|
#submissions-slider.flex-item
|
||||||
input type='range' orient='horizontal' list='datapoints' min=0 max=all_files.length-1 value=0 style="width: 100%"
|
input.w-100 type='range' orient='horizontal' list='datapoints' value=0 min=0 max=all_files.length - 1
|
||||||
datalist#datapoints
|
datalist#datapoints
|
||||||
- index=0
|
- index = 0
|
||||||
- submissions.each do |submission|
|
- submissions.each do |submission|
|
||||||
- next if submission.files.blank?
|
- next if submission.files.blank?
|
||||||
option data-submission=submission
|
option data-submission=submission
|
||||||
=index
|
= index
|
||||||
- index += 1
|
- index += 1
|
||||||
- if policy(@exercise).detailed_statistics?
|
- if policy(@exercise).detailed_statistics?
|
||||||
.bg-body-secondary.w-100.p-2.mb-4.align-items-center.d-flex.justify-content-between
|
.bg-body-secondary.w-100.p-2.mb-4.align-items-center.d-flex.justify-content-between
|
||||||
@ -45,12 +43,12 @@ h1
|
|||||||
span.ps-1.pb-1
|
span.ps-1.pb-1
|
||||||
i.fa-solid.fa-circle-info.align-middle
|
i.fa-solid.fa-circle-info.align-middle
|
||||||
small.me-5.ms-1 = t('.toggle_status_on')
|
small.me-5.ms-1 = t('.toggle_status_on')
|
||||||
= link_to t('.toggle_autosave_off'), statistics_external_user_exercise_path(show_autosaves: false), class: "btn btn-outline-contrast float-end btn-sm"
|
= link_to t('.toggle_autosave_off'), statistics_external_user_exercise_path(show_autosaves: false), class: 'btn btn-outline-contrast float-end btn-sm'
|
||||||
- else
|
- else
|
||||||
span.ps-1.pb-1
|
span.ps-1.pb-1
|
||||||
i.fa-solid.fa-circle-info.align-middle
|
i.fa-solid.fa-circle-info.align-middle
|
||||||
small.me-5.ms-1 = t('.toggle_status_off')
|
small.me-5.ms-1 = t('.toggle_status_off')
|
||||||
= link_to t('.toggle_autosave_on'), statistics_external_user_exercise_path(show_autosaves: true), class: "btn btn-outline-contrast float-end btn-sm"
|
= link_to t('.toggle_autosave_on'), statistics_external_user_exercise_path(show_autosaves: true), class: 'btn btn-outline-contrast float-end btn-sm'
|
||||||
#timeline
|
#timeline
|
||||||
.table-responsive
|
.table-responsive
|
||||||
table.table
|
table.table
|
||||||
@ -62,8 +60,8 @@ h1
|
|||||||
th.header = t('.tests')
|
th.header = t('.tests')
|
||||||
th.header = t('.time_difference') if policy(@exercise).detailed_statistics?
|
th.header = t('.time_difference') if policy(@exercise).detailed_statistics?
|
||||||
tbody
|
tbody
|
||||||
- @all_events.each_with_index do |this, index|
|
- @all_events.each_with_index do |this, event_index|
|
||||||
- highlight = (index > 0 and @deltas.present? and @deltas[index] == 0 and this.created_at.to_s != @all_events[index - 1].created_at.to_s)
|
- highlight = event_index.positive? && @deltas.present? && @deltas[event_index].zero? && this.created_at.to_s != @all_events[event_index - 1].created_at.to_s
|
||||||
- row_classes = ''
|
- row_classes = ''
|
||||||
- row_classes += ' highlight' if highlight
|
- row_classes += ' highlight' if highlight
|
||||||
- row_classes += ' before_deadline' if this.is_a?(Submission) && this.before_deadline?
|
- row_classes += ' before_deadline' if this.is_a?(Submission) && this.before_deadline?
|
||||||
@ -72,22 +70,22 @@ h1
|
|||||||
tr data-id=this.id class=row_classes
|
tr data-id=this.id class=row_classes
|
||||||
- if this.is_a?(Submission)
|
- if this.is_a?(Submission)
|
||||||
td class=(this.files.present? ? 'clickable' : '')
|
td class=(this.files.present? ? 'clickable' : '')
|
||||||
= this.created_at.strftime("%F %T")
|
= this.created_at.strftime('%F %T')
|
||||||
td = this.cause
|
td = this.cause
|
||||||
td = this.score
|
td = this.score
|
||||||
td.align-middle
|
td.align-middle
|
||||||
-this.testruns.sort_by {|t| [t.file&.name ? 0 : 1, t.file&.name]}.each do |run|
|
-this.testruns.sort_by {|t| [t.file&.name ? 0 : 1, t.file&.name] }.each do |run|
|
||||||
- if run.passed
|
- if run.passed
|
||||||
.unit-test-result.positive-result title=[run.file&.filepath, run.log].join("\n").strip
|
.unit-test-result.positive-result title=[run.file&.filepath, run.log].join("\n").strip
|
||||||
- else
|
- else
|
||||||
.unit-test-result.unknown-result title=[run.file&.filepath, run.log].join("\n").strip
|
.unit-test-result.unknown-result title=[run.file&.filepath, run.log].join("\n").strip
|
||||||
td = @working_times_until[index] if index > 0 if policy(@exercise).detailed_statistics?
|
td = @working_times_until[event_index] if event_index.positive? && policy(@exercise).detailed_statistics?
|
||||||
- elsif this.is_a? UserExerciseIntervention
|
- elsif this.is_a? UserExerciseIntervention
|
||||||
td = this.created_at.strftime("%F %T")
|
td = this.created_at.strftime('%F %T')
|
||||||
td = this.intervention.name
|
td = this.intervention.name
|
||||||
td =
|
td
|
||||||
td =
|
td
|
||||||
td = @working_times_until[index] if index > 0 if policy(@exercise).detailed_statistics?
|
td = @working_times_until[event_index] if event_index.positive? && policy(@exercise).detailed_statistics?
|
||||||
small
|
small
|
||||||
b
|
b
|
||||||
= t('.legend')
|
= t('.legend')
|
||||||
@ -105,8 +103,8 @@ h1
|
|||||||
p.mt-2 = t('.filter')
|
p.mt-2 = t('.filter')
|
||||||
- if current_user.try(:admin?)
|
- if current_user.try(:admin?)
|
||||||
p = t('.addendum', delta: StatisticsHelper::WORKING_TIME_DELTA_IN_SECONDS / 60)
|
p = t('.addendum', delta: StatisticsHelper::WORKING_TIME_DELTA_IN_SECONDS / 60)
|
||||||
.d-none#wtimes data-working_times=ActiveSupport::JSON.encode(@working_times_until);
|
.d-none#wtimes data-working_times=ActiveSupport::JSON.encode(@working_times_until)
|
||||||
div#progress_chart.col-lg-12
|
#progress_chart.col-lg-12
|
||||||
.graph-functions-2
|
.graph-functions-2
|
||||||
|
|
||||||
- else
|
- else
|
||||||
|
@ -8,7 +8,7 @@ h1 = link_to_if(policy(@exercise).show?, @exercise, exercise_path(@exercise))
|
|||||||
span.col-sm-9 =< @exercise.maximum_score
|
span.col-sm-9 =< @exercise.maximum_score
|
||||||
|
|
||||||
.header.mt-3 = t('activerecord.models.user_exercise_feedback.other')
|
.header.mt-3 = t('activerecord.models.user_exercise_feedback.other')
|
||||||
- if @feedbacks.nil? or @feedbacks.size == 0
|
- if @feedbacks.blank?
|
||||||
.no-feedback = t('user_exercise_feedback.no_feedback')
|
.no-feedback = t('user_exercise_feedback.no_feedback')
|
||||||
|
|
||||||
ul.list-unstyled
|
ul.list-unstyled
|
||||||
@ -16,22 +16,22 @@ h1 = link_to_if(policy(@exercise).show?, @exercise, exercise_path(@exercise))
|
|||||||
- time_presets = UserExerciseFeedbacksController.new.time_presets
|
- time_presets = UserExerciseFeedbacksController.new.time_presets
|
||||||
- @feedbacks.each_with_index do |feedback, index|
|
- @feedbacks.each_with_index do |feedback, index|
|
||||||
li.card.mt-2
|
li.card.mt-2
|
||||||
.card-header role="tab" id="heading"
|
.card-header#heading role='tab'
|
||||||
div.clearfix.feedback-header
|
.clearfix.feedback-header
|
||||||
- if policy(@exercise).detailed_statistics?
|
- if policy(@exercise).detailed_statistics?
|
||||||
span.username = link_to_if(policy(feedback.user).show?, feedback.user.displayname, statistics_external_user_exercise_path(id: @exercise.id, external_user_id: feedback.user.id))
|
span.username = link_to_if(policy(feedback.user).show?, feedback.user.displayname, statistics_external_user_exercise_path(id: @exercise.id, external_user_id: feedback.user.id))
|
||||||
- if feedback.anomaly_notification
|
- if feedback.anomaly_notification
|
||||||
i class="fa-regular fa-envelope" data-bs-placement="top" data-bs-toggle="tooltip" data-bs-container="body" title=feedback.anomaly_notification.reason
|
i.fa-regular.fa-envelope data-bs-placement='top' data-bs-toggle='tooltip' data-bs-container='body' title=feedback.anomaly_notification.reason
|
||||||
span.date = feedback.created_at
|
span.date = feedback.created_at
|
||||||
.card-collapse role="tabpanel"
|
.card-collapse role='tabpanel'
|
||||||
.card-body.feedback
|
.card-body.feedback
|
||||||
.text style="white-space: pre-wrap;" = feedback.feedback_text
|
.text style="white-space: pre-wrap;" = feedback.feedback_text
|
||||||
.difficulty = "#{t('user_exercise_feedback.difficulty')} #{comment_presets[feedback.difficulty].join(' - ')}" if feedback.difficulty
|
.difficulty = "#{t('user_exercise_feedback.difficulty')} #{comment_presets[feedback.difficulty].join(' - ')}" if feedback.difficulty
|
||||||
.worktime = "#{t('user_exercise_feedback.working_time')} #{time_presets[feedback.user_estimated_worktime].join(' - ')}" if feedback.user_estimated_worktime
|
.worktime = "#{t('user_exercise_feedback.working_time')} #{time_presets[feedback.user_estimated_worktime].join(' - ')}" if feedback.user_estimated_worktime
|
||||||
- if policy(@exercise).detailed_statistics?
|
- if policy(@exercise).detailed_statistics?
|
||||||
.card-footer
|
.card-footer
|
||||||
div.clearfix.feedback-header
|
.clearfix.feedback-header
|
||||||
span.points.flex-grow-1 = "#{t('exercises.statistics.score')}: #{@submissions[index].score}"
|
span.points.flex-grow-1 = "#{t('exercises.statistics.score')}: #{@submissions[index].score}"
|
||||||
span.working_time.float-end = "#{t('exercises.statistics.worktime')}: #{@exercise.average_working_time_for(feedback.user) or 0}"
|
span.working_time.float-end = "#{t('exercises.statistics.worktime')}: #{@exercise.average_working_time_for(feedback.user) || 0}"
|
||||||
|
|
||||||
= render('shared/pagination', collection: @feedbacks)
|
= render('shared/pagination', collection: @feedbacks)
|
||||||
|
@ -1,25 +1,25 @@
|
|||||||
- content_for :head do
|
- content_for :head do
|
||||||
// Force a full page reload, see https://github.com/turbolinks/turbolinks/issues/326.
|
// Force a full page reload, see https://github.com/turbolinks/turbolinks/issues/326.
|
||||||
Otherwise, lti_parameters might be nil
|
Otherwise, lti_parameters might be nil
|
||||||
meta name="turbolinks-cache-control" content="no-cache"
|
meta name='turbolinks-cache-control' content='no-cache'
|
||||||
|
|
||||||
#editor-column
|
#editor-column
|
||||||
- unless @embed_options[:hide_exercise_description]
|
- unless @embed_options[:hide_exercise_description]
|
||||||
.exercise.clearfix
|
.exercise.clearfix
|
||||||
div.col-9div.d-lg-flex.flex-row.justify-content-between.align-items-baseline
|
.col-9.d-lg-flex.flex-row.justify-content-between.align-items-baseline
|
||||||
div.col-lg-7
|
.col-lg-7
|
||||||
h1 id="exercise-headline"
|
h1#exercise-headline
|
||||||
i id="description-symbol" class=(@embed_options[:collapse_exercise_description] ? 'fa-solid fa-chevron-right' : 'fa-solid fa-chevron-down')
|
i#description-symbol class=(@embed_options[:collapse_exercise_description] ? 'fa-solid fa-chevron-right' : 'fa-solid fa-chevron-down')
|
||||||
= @exercise.title
|
= @exercise.title
|
||||||
|
|
||||||
div.col-lg-5.float-lg-end.ms-md-3.mb-md-3.d-flex.justify-content-end.pe-lg-3
|
.col-lg-5.float-lg-end.ms-md-3.mb-md-3.d-flex.justify-content-end.pe-lg-3
|
||||||
- if current_contributor.programming_group?
|
- if current_contributor.programming_group?
|
||||||
span.me-3.mt-1
|
span.me-3.mt-1
|
||||||
button.btn.btn-sm.btn-primary.text-nowrap.w-100#start_chat data= { url: "https://jitsi.fem.tu-ilmenau.de/openHPI_ProgrammingGroup#{current_contributor.id}" }
|
button.btn.btn-sm.btn-primary.text-nowrap.w-100#start_chat data= {url: "https://jitsi.fem.tu-ilmenau.de/openHPI_ProgrammingGroup#{current_contributor.id}"}
|
||||||
i.fa-solid.fa-video
|
i.fa-solid.fa-video
|
||||||
= t('exercises.editor.start_video')
|
= t('exercises.editor.start_video')
|
||||||
|
|
||||||
div.small.text-body-tertiary.text-nowrap.mt-1
|
.small.text-body-tertiary.text-nowrap.mt-1
|
||||||
a href='https://www.tu-ilmenau.de/datenschutz' target='_blank' rel='noopener'
|
a href='https://www.tu-ilmenau.de/datenschutz' target='_blank' rel='noopener'
|
||||||
= t('exercises.implement.external_privacy_policy')
|
= t('exercises.implement.external_privacy_policy')
|
||||||
|
|
||||||
@ -30,13 +30,13 @@
|
|||||||
|
|
||||||
span.badge.rounded-pill.bg-primary.float-end.mt-2.mb-5.score
|
span.badge.rounded-pill.bg-primary.float-end.mt-2.mb-5.score
|
||||||
|
|
||||||
- if !current_contributor.programming_group?
|
- unless current_contributor.programming_group?
|
||||||
span.badge.rounded-pill.bg-primary.float-end.mt-2.score
|
span.badge.rounded-pill.bg-primary.float-end.mt-2.score
|
||||||
|
|
||||||
#description-card.lead class=(@embed_options[:collapse_exercise_description] ? 'description-card-collapsed' : 'description-card')
|
#description-card.lead class=(@embed_options[:collapse_exercise_description] ? 'description-card-collapsed' : 'description-card')
|
||||||
= render_markdown(@exercise.description)
|
= render_markdown(@exercise.description)
|
||||||
|
|
||||||
a#toggle href="#" data-show=t('shared.show') data-hide=t('shared.hide')
|
a#toggle href='#' data-show=t('shared.show') data-hide=t('shared.hide')
|
||||||
- if @embed_options[:collapse_exercise_description]
|
- if @embed_options[:collapse_exercise_description]
|
||||||
= t('shared.show')
|
= t('shared.show')
|
||||||
- else
|
- else
|
||||||
|
@ -22,38 +22,38 @@ h1 = Exercise.model_name.human(count: 2)
|
|||||||
= t('activerecord.attributes.exercise.public')
|
= t('activerecord.attributes.exercise.public')
|
||||||
- if policy(Exercise).batch_update?
|
- if policy(Exercise).batch_update?
|
||||||
br
|
br
|
||||||
span.batch = link_to(t('shared.batch_update'), '#', 'data-text' => t('shared.update', model: t('activerecord.models.exercise.other')))
|
span.batch = link_to(t('shared.batch_update'), '#', 'data-text': t('shared.update', model: t('activerecord.models.exercise.other')))
|
||||||
th.p-1 colspan=6 = t('shared.actions')
|
th.p-1 colspan=6 = t('shared.actions')
|
||||||
tbody
|
tbody
|
||||||
- @exercises.each do |exercise|
|
- @exercises.each do |exercise|
|
||||||
tr data-id=exercise.id
|
tr data-id=exercise.id
|
||||||
td.p-1.pt-2
|
td.p-1.pt-2
|
||||||
= link_to_if(policy(exercise).show?, exercise.title, exercise, 'data-turbolinks' => "false")
|
= link_to_if(policy(exercise).show?, exercise.title, exercise, 'data-turbolinks': 'false')
|
||||||
- if exercise.internal_title.present?
|
- if exercise.internal_title.present?
|
||||||
p.mb-0.text-muted
|
p.mb-0.text-muted
|
||||||
i.fa-solid.fa-arrow-turn-up.fa-rotate-90
|
i.fa-solid.fa-arrow-turn-up.fa-rotate-90
|
||||||
span = exercise.internal_title
|
span = exercise.internal_title
|
||||||
td.p-1.pt-2 = link_to_if(exercise.execution_environment && policy(exercise.execution_environment).show?, exercise.execution_environment, exercise.execution_environment)
|
td.p-1.pt-2 = link_to_if(exercise.execution_environment && policy(exercise.execution_environment).show?, exercise.execution_environment, exercise.execution_environment)
|
||||||
td.p-1.pt-2 = exercise.files.filter(&:teacher_defined_assessment?).length
|
td.p-1.pt-2 = exercise.files.count(&:teacher_defined_assessment?)
|
||||||
td.p-1.pt-2 = exercise.maximum_score
|
td.p-1.pt-2 = exercise.maximum_score
|
||||||
td.p-1.pt-2 = exercise.exercise_tags.length
|
td.p-1.pt-2 = exercise.exercise_tags.length
|
||||||
td.p-1.pt-2 = exercise.expected_difficulty
|
td.p-1.pt-2 = exercise.expected_difficulty
|
||||||
td.p-1.pt-2.public data-value=exercise.public? = symbol_for(exercise.public?)
|
td.p-1.pt-2.public data-value=exercise.public? = symbol_for(exercise.public?)
|
||||||
td.p-1.pt-2 = link_to(t('shared.edit'), edit_exercise_path(exercise)) if policy(exercise).edit?
|
td.p-1.pt-2 = link_to(t('shared.edit'), edit_exercise_path(exercise)) if policy(exercise).edit?
|
||||||
td.p-1.pt-2 = link_to(t('.implement'), implement_exercise_path(exercise)) if policy(exercise).implement?
|
td.p-1.pt-2 = link_to(t('.implement'), implement_exercise_path(exercise)) if policy(exercise).implement?
|
||||||
td.p-1.pt-2 = link_to(t('shared.statistics'), statistics_exercise_path(exercise), 'data-turbolinks' => "false") if policy(exercise).statistics?
|
td.p-1.pt-2 = link_to(t('shared.statistics'), statistics_exercise_path(exercise), 'data-turbolinks': 'false') if policy(exercise).statistics?
|
||||||
|
|
||||||
td.p-1
|
td.p-1
|
||||||
.btn-group
|
.btn-group
|
||||||
button.btn.btn-outline-primary.btn-sm.dropdown-toggle data-bs-toggle="dropdown" type="button" = t('shared.actions_button')
|
button.btn.btn-outline-primary.btn-sm.dropdown-toggle data-bs-toggle='dropdown' type='button' = t('shared.actions_button')
|
||||||
ul.dropdown-menu.float-end role="menu"
|
ul.dropdown-menu.float-end role='menu'
|
||||||
li = link_to(t('shared.show'), exercise, 'data-turbolinks' => "false", class: 'dropdown-item') if policy(exercise).show?
|
li = link_to(t('shared.show'), exercise, 'data-turbolinks': 'false', class: 'dropdown-item') if policy(exercise).show?
|
||||||
li = link_to(t('activerecord.models.user_exercise_feedback.other'), feedback_exercise_path(exercise), class: 'dropdown-item') if policy(exercise).feedback?
|
li = link_to(t('activerecord.models.user_exercise_feedback.other'), feedback_exercise_path(exercise), class: 'dropdown-item') if policy(exercise).feedback?
|
||||||
li = link_to(t('activerecord.models.request_for_comment.other'), exercise_request_for_comments_path(exercise), class: 'dropdown-item') if policy(exercise).rfcs_for_exercise?
|
li = link_to(t('activerecord.models.request_for_comment.other'), exercise_request_for_comments_path(exercise), class: 'dropdown-item') if policy(exercise).rfcs_for_exercise?
|
||||||
li = link_to(t('activerecord.models.programming_group.other'), exercise_programming_groups_path(exercise), class: 'dropdown-item') if policy(exercise).programming_groups_for_exercise?
|
li = link_to(t('activerecord.models.programming_group.other'), exercise_programming_groups_path(exercise), class: 'dropdown-item') if policy(exercise).programming_groups_for_exercise?
|
||||||
li = link_to(t('shared.destroy'), exercise, data: {confirm: t('shared.confirm_destroy')}, method: :delete, class: 'dropdown-item') if policy(exercise).destroy?
|
li = link_to(t('shared.destroy'), exercise, data: {confirm: t('shared.confirm_destroy')}, method: :delete, class: 'dropdown-item') if policy(exercise).destroy?
|
||||||
li = link_to(t('.clone'), clone_exercise_path(exercise), data: {confirm: t('shared.confirm_destroy')}, method: :post, class: 'dropdown-item') if policy(exercise).clone?
|
li = link_to(t('.clone'), clone_exercise_path(exercise), data: {confirm: t('shared.confirm_destroy')}, method: :post, class: 'dropdown-item') if policy(exercise).clone?
|
||||||
li = link_to(t('exercises.export_codeharbor.label'), '', class: 'dropdown-item export-start', data: {'exercise-id' => exercise.id}) if policy(exercise).export_external_confirm?
|
li = link_to(t('exercises.export_codeharbor.label'), '', class: 'dropdown-item export-start', data: {'exercise-id': exercise.id}) if policy(exercise).export_external_confirm?
|
||||||
|
|
||||||
= render('shared/pagination', collection: @exercises)
|
= render('shared/pagination', collection: @exercises)
|
||||||
p = render('shared/new_button', model: Exercise)
|
p = render('shared/new_button', model: Exercise)
|
||||||
|
@ -15,14 +15,14 @@ h1.d-inline-block
|
|||||||
= render('shared/edit_button', object: @exercise)
|
= render('shared/edit_button', object: @exercise)
|
||||||
button.btn.btn-secondary.float-end.dropdown-toggle data-bs-toggle='dropdown' type='button'
|
button.btn.btn-secondary.float-end.dropdown-toggle data-bs-toggle='dropdown' type='button'
|
||||||
ul.dropdown-menu.dropdown-menu-end role='menu'
|
ul.dropdown-menu.dropdown-menu-end role='menu'
|
||||||
li = link_to(t('exercises.index.implement'), implement_exercise_path(@exercise), 'data-turbolinks' => "false", class: 'dropdown-item') if policy(@exercise).implement?
|
li = link_to(t('exercises.index.implement'), implement_exercise_path(@exercise), 'data-turbolinks': 'false', class: 'dropdown-item') if policy(@exercise).implement?
|
||||||
li = link_to(t('shared.statistics'), statistics_exercise_path(@exercise), 'data-turbolinks' => "false", class: 'dropdown-item') if policy(@exercise).statistics?
|
li = link_to(t('shared.statistics'), statistics_exercise_path(@exercise), 'data-turbolinks': 'false', class: 'dropdown-item') if policy(@exercise).statistics?
|
||||||
li = link_to(t('activerecord.models.user_exercise_feedback.other'), feedback_exercise_path(@exercise), class: 'dropdown-item') if policy(@exercise).feedback?
|
li = link_to(t('activerecord.models.user_exercise_feedback.other'), feedback_exercise_path(@exercise), class: 'dropdown-item') if policy(@exercise).feedback?
|
||||||
li = link_to(t('activerecord.models.request_for_comment.other'), exercise_request_for_comments_path(@exercise), class: 'dropdown-item') if policy(@exercise).rfcs_for_exercise?
|
li = link_to(t('activerecord.models.request_for_comment.other'), exercise_request_for_comments_path(@exercise), class: 'dropdown-item') if policy(@exercise).rfcs_for_exercise?
|
||||||
li = link_to(t('activerecord.models.programming_group.other'), exercise_programming_groups_path(@exercise), class: 'dropdown-item') if policy(@exercise).programming_groups_for_exercise?
|
li = link_to(t('activerecord.models.programming_group.other'), exercise_programming_groups_path(@exercise), class: 'dropdown-item') if policy(@exercise).programming_groups_for_exercise?
|
||||||
li = link_to(t('shared.destroy'), @exercise, data: {confirm: t('shared.confirm_destroy')}, method: :delete, class: 'dropdown-item') if policy(@exercise).destroy?
|
li = link_to(t('shared.destroy'), @exercise, data: {confirm: t('shared.confirm_destroy')}, method: :delete, class: 'dropdown-item') if policy(@exercise).destroy?
|
||||||
li = link_to(t('exercises.index.clone'), clone_exercise_path(@exercise), data: {confirm: t('shared.confirm_destroy')}, method: :post, class: 'dropdown-item') if policy(@exercise).clone?
|
li = link_to(t('exercises.index.clone'), clone_exercise_path(@exercise), data: {confirm: t('shared.confirm_destroy')}, method: :post, class: 'dropdown-item') if policy(@exercise).clone?
|
||||||
li = link_to(t('exercises.export_codeharbor.label'), '', class: 'dropdown-item export-start', data: {'exercise-id' => @exercise.id}) if policy(@exercise).export_external_confirm?
|
li = link_to(t('exercises.export_codeharbor.label'), '', class: 'dropdown-item export-start', data: {'exercise-id': @exercise.id}) if policy(@exercise).export_external_confirm?
|
||||||
|
|
||||||
= row(label: 'exercise.title', value: @exercise.title)
|
= row(label: 'exercise.title', value: @exercise.title)
|
||||||
= row(label: 'exercise.internal_title', value: @exercise.internal_title)
|
= row(label: 'exercise.internal_title', value: @exercise.internal_title)
|
||||||
@ -40,11 +40,11 @@ h1.d-inline-block
|
|||||||
= row(label: 'exercise.allow_auto_completion', value: @exercise.allow_auto_completion?)
|
= row(label: 'exercise.allow_auto_completion', value: @exercise.allow_auto_completion?)
|
||||||
= row(label: 'exercise.difficulty', value: @exercise.expected_difficulty)
|
= row(label: 'exercise.difficulty', value: @exercise.expected_difficulty)
|
||||||
= row(label: 'exercise.uuid', value: @exercise.uuid)
|
= row(label: 'exercise.uuid', value: @exercise.uuid)
|
||||||
= row(label: 'exercise.tags', value: @exercise.exercise_tags.map{|et| "#{et.tag.name} (#{et.factor})"}.sort.join(", "))
|
= row(label: 'exercise.tags', value: @exercise.exercise_tags.map {|et| "#{et.tag.name} (#{et.factor})" }.sort.join(', '))
|
||||||
= row(label: 'exercise.embedding_parameters', class: 'mb-4') do
|
= row(label: 'exercise.embedding_parameters', class: 'mb-4') do
|
||||||
= content_tag(:input, nil, class: 'form-control bg-body-secondary mb-4', readonly: true, value: @exercise.unpublished? ? t('exercises.show.is_unpublished') : embedding_parameters(@exercise))
|
= content_tag(:input, nil, class: 'form-control bg-body-secondary mb-4', readonly: true, value: @exercise.unpublished? ? t('exercises.show.is_unpublished') : embedding_parameters(@exercise))
|
||||||
|
|
||||||
- unless @tips.blank?
|
- if @tips.present?
|
||||||
.mt-2
|
.mt-2
|
||||||
= render(partial: 'tips_content')
|
= render(partial: 'tips_content')
|
||||||
|
|
||||||
@ -53,15 +53,15 @@ h2.mt-4 = t('activerecord.attributes.exercise.files')
|
|||||||
ul.list-unstyled#files
|
ul.list-unstyled#files
|
||||||
- @exercise.files.each do |file|
|
- @exercise.files.each do |file|
|
||||||
li.card.mt-2
|
li.card.mt-2
|
||||||
.card-header role="tab" id="heading"
|
.card-header#heading role='tab'
|
||||||
a.file-heading.collapsed data-bs-toggle="collapse" data-bs-parent="#files" href=".collapse#{file.id}"
|
a.file-heading.collapsed data-bs-toggle='collapse' data-bs-parent='#files' href=".collapse#{file.id}"
|
||||||
div.clearfix role="button"
|
.clearfix role='button'
|
||||||
i.fa-solid aria-hidden="true"
|
i.fa-solid aria-hidden='true'
|
||||||
span = file.filepath
|
span = file.filepath
|
||||||
.card-collapse.collapse class="collapse#{file.id}" role="tabpanel"
|
.card-collapse.collapse class="collapse#{file.id}" role='tabpanel'
|
||||||
.card-body
|
.card-body
|
||||||
- if policy(file).destroy?
|
- if policy(file).destroy?
|
||||||
.clearfix = link_to(t('shared.destroy'), file, class:'btn btn-warning btn-sm float-end', data: {confirm: t('shared.confirm_destroy')}, method: :delete)
|
.clearfix = link_to(t('shared.destroy'), file, class: 'btn btn-warning btn-sm float-end', data: {confirm: t('shared.confirm_destroy')}, method: :delete)
|
||||||
= render('shared/file', file: file)
|
= render('shared/file', file:)
|
||||||
|
|
||||||
= render('shared/modal', id: 'export-modal', title: t('exercises.export_codeharbor.dialogtitle'), template: 'exercises/_export_dialogcontent')
|
= render('shared/modal', id: 'export-modal', title: t('exercises.export_codeharbor.dialogtitle'), template: 'exercises/_export_dialogcontent')
|
||||||
|
@ -7,7 +7,7 @@ h1 = @exercise
|
|||||||
|
|
||||||
= row(label: '.participants', value: @exercise.contributors.size)
|
= row(label: '.participants', value: @exercise.contributors.size)
|
||||||
|
|
||||||
- [:intermediate, :final].each do |scope|
|
- %i[intermediate final].each do |scope|
|
||||||
= row(label: ".#{scope}_submissions") do
|
= row(label: ".#{scope}_submissions") do
|
||||||
/TODO: Refactor next line
|
/TODO: Refactor next line
|
||||||
= "#{@exercise.submissions.send(scope).count} (#{t('.users_and_programming_groups', count: Submission.from(@exercise.submissions.send(scope).group(:contributor_id, :contributor_type).select(:contributor_id, :contributor_type)).count)})"
|
= "#{@exercise.submissions.send(scope).count} (#{t('.users_and_programming_groups', count: Submission.from(@exercise.submissions.send(scope).group(:contributor_id, :contributor_type).select(:contributor_id, :contributor_type)).count)})"
|
||||||
@ -24,7 +24,7 @@ h1 = @exercise
|
|||||||
- else
|
- else
|
||||||
= empty
|
= empty
|
||||||
- finishers_count = @exercise.contributors.size
|
- finishers_count = @exercise.contributors.size
|
||||||
- finishers_percentage = finishers_count == 0 ? 0 : (100.0 / finishers_count * @exercise.finishers_count).round(2)
|
- finishers_percentage = finishers_count.zero? ? 0 : (100.0 / finishers_count * @exercise.finishers_count).round(2)
|
||||||
p = progress_bar(finishers_percentage)
|
p = progress_bar(finishers_percentage)
|
||||||
|
|
||||||
= row(label: '.average_score') do
|
= row(label: '.average_score') do
|
||||||
@ -43,27 +43,27 @@ h1 = @exercise
|
|||||||
= row(label: '.average_worktime') do
|
= row(label: '.average_worktime') do
|
||||||
p = @exercise.average_working_time
|
p = @exercise.average_working_time
|
||||||
|
|
||||||
- Hash[:internal_users => t('.internal_users'), :external_users => t('.external_users'), :programming_groups => t('.programming_groups')].each_pair do |symbol, label|
|
- {internal_users: t('.internal_users'), external_users: t('.external_users'), programming_groups: t('.programming_groups')}.each_pair do |symbol, label|
|
||||||
- submissions = Submission.where(contributor: @exercise.send(symbol), exercise: @exercise).in_study_group_of(current_user)
|
- submissions = Submission.where(contributor: @exercise.send(symbol), exercise: @exercise).in_study_group_of(current_user)
|
||||||
- if !policy(@exercise).detailed_statistics?
|
- unless policy(@exercise).detailed_statistics?
|
||||||
- submissions = submissions.final
|
- submissions = submissions.final
|
||||||
- if submissions.any?
|
- if submissions.any?
|
||||||
strong = label
|
strong = label
|
||||||
- if symbol==:external_users
|
- if symbol == :external_users
|
||||||
- working_time_array = []
|
- working_time_array = []
|
||||||
- @exercise.send(symbol).distinct().each do |user|
|
- @exercise.send(symbol).distinct.each do |user|
|
||||||
- working_time = @exercise.average_working_time_for(user) or 0
|
- working_time = @exercise.average_working_time_for(user) || 0
|
||||||
- working_time_array.push working_time
|
- working_time_array.push working_time
|
||||||
hr
|
hr
|
||||||
.d-none#data data-working-time=ActiveSupport::JSON.encode(working_time_array)
|
.d-none#data data-working-time=ActiveSupport::JSON.encode(working_time_array)
|
||||||
.working-time-graphs
|
.working-time-graphs
|
||||||
div#chart_1
|
#chart_1
|
||||||
hr
|
hr
|
||||||
div#chart_2
|
#chart_2
|
||||||
hr
|
hr
|
||||||
- contributors = symbol.to_s.classify.constantize.where(id: submissions.joins(symbol).group(:contributor_id).select(:contributor_id).distinct)
|
- contributors = symbol.to_s.classify.constantize.where(id: submissions.joins(symbol).group(:contributor_id).select(:contributor_id).distinct)
|
||||||
.table-responsive.mb-4
|
.table-responsive.mb-4
|
||||||
table.table.table-striped class="#{contributors.present? ? 'sortable' : ''}"
|
table.table.table-striped class=(contributors.present? ? 'sortable' : '')
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
th.header = t('.user')
|
th.header = t('.user')
|
||||||
@ -73,11 +73,11 @@ h1 = @exercise
|
|||||||
th.header = t('.worktime') if policy(@exercise).detailed_statistics?
|
th.header = t('.worktime') if policy(@exercise).detailed_statistics?
|
||||||
tbody
|
tbody
|
||||||
- contributors.each do |contributor|
|
- contributors.each do |contributor|
|
||||||
- if contributor_statistics[contributor.class.name][contributor.id] then us = contributor_statistics[contributor.class.name][contributor.id] else us = {"maximum_score" => nil, "runs" => nil}
|
- us = contributor_statistics[contributor.class.name][contributor.id] || {'maximum_score' => nil, 'runs' => nil}
|
||||||
- label = "#{contributor.displayname}"
|
- label = contributor.displayname.to_s
|
||||||
tr
|
tr
|
||||||
td = link_to_if symbol==:external_users && policy(contributor).statistics?, label, {controller: "exercises", action: "external_user_statistics", external_user_id: contributor.id, id: @exercise.id}
|
td = link_to_if symbol == :external_users && policy(contributor).statistics?, label, {controller: 'exercises', action: 'external_user_statistics', external_user_id: contributor.id, id: @exercise.id}
|
||||||
td = us['maximum_score'] or 0
|
td = us['maximum_score'] || 0
|
||||||
td.align-middle
|
td.align-middle
|
||||||
- latest_user_submission = submissions.where(contributor:).final.latest
|
- latest_user_submission = submissions.where(contributor:).final.latest
|
||||||
- if latest_user_submission.present?
|
- if latest_user_submission.present?
|
||||||
@ -88,4 +88,4 @@ h1 = @exercise
|
|||||||
- elsif latest_user_submission.after_late_deadline?
|
- elsif latest_user_submission.after_late_deadline?
|
||||||
.unit-test-result.negative-result
|
.unit-test-result.negative-result
|
||||||
td = us['runs'] if policy(@exercise).detailed_statistics?
|
td = us['runs'] if policy(@exercise).detailed_statistics?
|
||||||
td = @exercise.average_working_time_for(contributor) or 0 if policy(@exercise).detailed_statistics?
|
td = @exercise.average_working_time_for(contributor) || 0 if policy(@exercise).detailed_statistics?
|
||||||
|
@ -7,16 +7,16 @@
|
|||||||
h1
|
h1
|
||||||
= t('.live_dashboard')
|
= t('.live_dashboard')
|
||||||
|
|
||||||
div.teacher_dashboard data-exercise-id=@exercise.id.to_s data-study-group-id=@study_group_id.to_s
|
.teacher_dashboard data-exercise-id=@exercise.id.to_s data-study-group-id=@study_group_id.to_s
|
||||||
|
|
||||||
h4.mt-4
|
h4.mt-4
|
||||||
= t('.time_spent_per_learner')
|
= t('.time_spent_per_learner')
|
||||||
|
|
||||||
.d-none#initial_graph_data data-graph_data=ActiveSupport::JSON.encode(@graph_data);
|
.d-none#initial_graph_data data-graph_data=ActiveSupport::JSON.encode(@graph_data)
|
||||||
div.w-100#chart_stacked
|
.w-100#chart_stacked
|
||||||
|
|
||||||
.d-none.bg-info.container.py-2#no_chart_data
|
.d-none.bg-info.container.py-2#no_chart_data
|
||||||
i class="fa-solid fa-info" aria-hidden="true"
|
i.fa-solid.fa-info aria-hidden='true'
|
||||||
= t('.no_data_yet')
|
= t('.no_data_yet')
|
||||||
|
|
||||||
h4.mt-4
|
h4.mt-4
|
||||||
@ -27,9 +27,9 @@ h4.mt-4
|
|||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
th.text-center
|
th.text-center
|
||||||
i.me-0 class="fa-regular fa-lightbulb" aria-hidden="true" title = t('request_for_comments.solved')
|
i.me-0.fa-regular.fa-lightbulb aria-hidden='true' title = t('request_for_comments.solved')
|
||||||
th.text-center
|
th.text-center
|
||||||
i.me-0 class="fa-solid fa-comment" aria-hidden="true" title = t('request_for_comments.comments') align="center"
|
i.me-0.fa-solid.fa-comment aria-hidden='true' title = t('request_for_comments.comments') align='center'
|
||||||
th.col-12 = t('activerecord.attributes.request_for_comments.question')
|
th.col-12 = t('activerecord.attributes.request_for_comments.question')
|
||||||
th = t('activerecord.attributes.request_for_comments.username')
|
th = t('activerecord.attributes.request_for_comments.username')
|
||||||
th.text-nowrap = t('activerecord.attributes.request_for_comments.requested_at')
|
th.text-nowrap = t('activerecord.attributes.request_for_comments.requested_at')
|
||||||
|
@ -15,10 +15,10 @@ h1 = ExternalUser.model_name.human(count: 2)
|
|||||||
= f.search_field(:external_id_cont, class: 'form-control', placeholder: t('activerecord.attributes.external_user.external_id'))
|
= f.search_field(:external_id_cont, class: 'form-control', placeholder: t('activerecord.attributes.external_user.external_id'))
|
||||||
.row
|
.row
|
||||||
.col-auto
|
.col-auto
|
||||||
= f.select :platform_admin_true, [[t('shared.admin_filter.only'), 1], [t('shared.admin_filter.none'), 0]], { include_blank: t('shared.admin_filter.all'), selected: params[:q] ? params[:q][:platform_admin_true] : '' }
|
= f.select :platform_admin_true, [[t('shared.admin_filter.only'), 1], [t('shared.admin_filter.none'), 0]], {include_blank: t('shared.admin_filter.all'), selected: params[:q] ? params[:q][:platform_admin_true] : ''}
|
||||||
.col-auto.mt-3.mt-lg-0
|
.col-auto.mt-3.mt-lg-0
|
||||||
= f.label(:consumer_id_eq, t('activerecord.attributes.external_user.consumer'), class: 'visually-hidden form-label')
|
= f.label(:consumer_id_eq, t('activerecord.attributes.external_user.consumer'), class: 'visually-hidden form-label')
|
||||||
= f.collection_select(:consumer_id_eq, Consumer.with_external_users, :id, :name, class: 'form-control', include_blank: true, prompt: t('activerecord.attributes.external_user.consumer') )
|
= f.collection_select(:consumer_id_eq, Consumer.with_external_users, :id, :name, class: 'form-control', include_blank: true, prompt: t('activerecord.attributes.external_user.consumer'))
|
||||||
- else
|
- else
|
||||||
.col-auto
|
.col-auto
|
||||||
= f.label(:name_cont, t('activerecord.attributes.external_user.name'), class: 'visually-hidden form-label')
|
= f.label(:name_cont, t('activerecord.attributes.external_user.name'), class: 'visually-hidden form-label')
|
||||||
|
@ -8,10 +8,10 @@ h1 = @user.displayname
|
|||||||
= row(label: 'external_user.consumer', value: link_to_if(@user.consumer.present? && policy(@user.consumer).show?, @user.consumer, @user.consumer))
|
= row(label: 'external_user.consumer', value: link_to_if(@user.consumer.present? && policy(@user.consumer).show?, @user.consumer, @user.consumer))
|
||||||
= row(label: 'external_user.platform_admin', value: @user.platform_admin?) if current_user.admin?
|
= row(label: 'external_user.platform_admin', value: @user.platform_admin?) if current_user.admin?
|
||||||
= row(label: 'users.show.study_groups') do
|
= row(label: 'users.show.study_groups') do
|
||||||
- visible_memberships = @user.study_group_memberships.select { |study_group_membership| policy(study_group_membership.study_group).show? }
|
- visible_memberships = @user.study_group_memberships.select {|study_group_membership| policy(study_group_membership.study_group).show? }
|
||||||
- if visible_memberships.any?
|
- if visible_memberships.any?
|
||||||
ul.mb-0 class="#{visible_memberships.one? ? 'single_entry_inline_list' : 'inline_list'}"
|
ul.mb-0 class=(visible_memberships.one? ? 'single_entry_inline_list' : 'inline_list')
|
||||||
- visible_memberships = visible_memberships.sort_by{ |study_group_membership| study_group_membership.study_group.name}
|
- visible_memberships = visible_memberships.sort_by {|study_group_membership| study_group_membership.study_group.name }
|
||||||
- visible_memberships.each do |study_group_membership|
|
- visible_memberships.each do |study_group_membership|
|
||||||
li
|
li
|
||||||
=> link_to(study_group_membership.study_group.name, study_group_membership.study_group)
|
=> link_to(study_group_membership.study_group.name, study_group_membership.study_group)
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
h1 = t('.title')
|
h1 = t('.title')
|
||||||
|
|
||||||
- submissions = Submission.where(contributor: @user).in_study_group_of(current_user)
|
- submissions = Submission.where(contributor: @user).in_study_group_of(current_user)
|
||||||
- exercises = Exercise.where(id: submissions.joins(:exercise).group(:exercise_id).select(:exercise_id).distinct).reject(&:nil?)
|
- exercises = Exercise.where(id: submissions.joins(:exercise).group(:exercise_id).select(:exercise_id).distinct).compact
|
||||||
- if submissions.any? && !policy(exercises.first).detailed_statistics?
|
- if submissions.any? && !policy(exercises.first).detailed_statistics?
|
||||||
- submissions = submissions.final
|
- submissions = submissions.final
|
||||||
|
|
||||||
- if submissions.any?
|
- if submissions.any?
|
||||||
.table-responsive
|
.table-responsive
|
||||||
table.table.table-striped class="#{exercises.present? ? 'sortable' : ''}"
|
table.table.table-striped class=(exercises.present? ? 'sortable' : '')
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
th.header = t('.exercise')
|
th.header = t('.exercise')
|
||||||
@ -18,14 +18,14 @@ h1 = t('.title')
|
|||||||
tbody
|
tbody
|
||||||
- exercises.each do |exercise|
|
- exercises.each do |exercise|
|
||||||
// Grab any submission in context of study group (or all if admin). Then check for permission
|
// Grab any submission in context of study group (or all if admin). Then check for permission
|
||||||
- any_submission = submissions.where(exercise: exercise).first
|
- any_submission = submissions.where(exercise:).first
|
||||||
- if any_submission && policy(any_submission).show_study_group? && statistics[exercise.id]
|
- if any_submission && policy(any_submission).show_study_group? && statistics[exercise.id]
|
||||||
- stats = statistics[exercise.id]
|
- stats = statistics[exercise.id]
|
||||||
tr
|
tr
|
||||||
td = link_to exercise, controller: "exercises", action: "external_user_statistics", external_user_id: @user.id, id: exercise.id
|
td = link_to exercise, controller: 'exercises', action: 'external_user_statistics', external_user_id: @user.id, id: exercise.id
|
||||||
td = stats["maximum_score"] or 0
|
td = stats['maximum_score'] || 0
|
||||||
td.align-middle
|
td.align-middle
|
||||||
- latest_viewable_submission = submissions.where(exercise: exercise).final.latest
|
- latest_viewable_submission = submissions.where(exercise:).final.latest
|
||||||
- if latest_viewable_submission.present?
|
- if latest_viewable_submission.present?
|
||||||
- if latest_viewable_submission.before_deadline?
|
- if latest_viewable_submission.before_deadline?
|
||||||
.unit-test-result.positive-result.before_deadline
|
.unit-test-result.positive-result.before_deadline
|
||||||
@ -33,7 +33,7 @@ h1 = t('.title')
|
|||||||
.unit-test-result.unknown-result.within_grace_period
|
.unit-test-result.unknown-result.within_grace_period
|
||||||
- elsif latest_viewable_submission.after_late_deadline?
|
- elsif latest_viewable_submission.after_late_deadline?
|
||||||
.unit-test-result.negative-result.after_late_deadline
|
.unit-test-result.negative-result.after_late_deadline
|
||||||
td = stats["runs"] or 0 if policy(exercises.first).detailed_statistics?
|
td = stats['runs'] || 0 if policy(exercises.first).detailed_statistics?
|
||||||
td = stats["working_time"] or 0 if policy(exercises.first).detailed_statistics?
|
td = stats['working_time'] || 0 if policy(exercises.first).detailed_statistics?
|
||||||
- else
|
- else
|
||||||
= t('exercises.external_users.statistics.no_data_available')
|
= t('exercises.external_users.statistics.no_data_available')
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
= f.text_field(:name, class: 'form-control', required: true)
|
= f.text_field(:name, class: 'form-control', required: true)
|
||||||
.mb-3
|
.mb-3
|
||||||
= f.label(:file_type_id, class: 'form-label')
|
= f.label(:file_type_id, class: 'form-label')
|
||||||
= f.collection_select(:file_type_id, FileType.all.order(:name), :id, :name, {}, class: 'form-control')
|
= f.collection_select(:file_type_id, FileType.order(:name), :id, :name, {}, class: 'form-control')
|
||||||
.mb-3
|
.mb-3
|
||||||
= f.label(:content, class: 'form-label')
|
= f.label(:content, class: 'form-label')
|
||||||
= f.text_area(:content, class: 'form-control')
|
= f.text_area(:content, class: 'form-control')
|
||||||
.actions = render('shared/submit_button', f: f, object: @file_template)
|
.actions = render('shared/submit_button', f:, object: @file_template)
|
||||||
|
@ -25,4 +25,4 @@
|
|||||||
label.form-check-label
|
label.form-check-label
|
||||||
= f.check_box(:renderable, class: 'form-check-input')
|
= f.check_box(:renderable, class: 'form-check-input')
|
||||||
= t('activerecord.attributes.file_type.renderable')
|
= t('activerecord.attributes.file_type.renderable')
|
||||||
.actions = render('shared/submit_button', f: f, object: @file_type)
|
.actions = render('shared/submit_button', f:, object: @file_type)
|
||||||
|
@ -4,5 +4,5 @@ h1
|
|||||||
|
|
||||||
= row(label: 'file_type.name', value: @file_type.name)
|
= row(label: 'file_type.name', value: @file_type.name)
|
||||||
= row(label: 'file_type.user', value: link_to_if(policy(@file_type.author).show?, @file_type.author, @file_type.author))
|
= row(label: 'file_type.user', value: link_to_if(policy(@file_type.author).show?, @file_type.author, @file_type.author))
|
||||||
- [:editor_mode, :file_extension, :indent_size, :binary, :executable, :renderable].each do |attribute|
|
- %i[editor_mode file_extension indent_size binary executable renderable].each do |attribute|
|
||||||
= row(label: "file_type.#{attribute}", value: @file_type.send(attribute))
|
= row(label: "file_type.#{attribute}", value: @file_type.send(attribute))
|
||||||
|
@ -17,11 +17,11 @@
|
|||||||
h2.mt-4 = t('internal_users.form.study_groups')
|
h2.mt-4 = t('internal_users.form.study_groups')
|
||||||
ul.list-unstyled.card-group
|
ul.list-unstyled.card-group
|
||||||
li.card
|
li.card
|
||||||
.card-header role="tab" id="heading"
|
.card-header#heading role='tab'
|
||||||
a.file-heading data-bs-toggle="collapse" href="#study-group-collapse"
|
a.file-heading data-bs-toggle='collapse' href='#study-group-collapse'
|
||||||
div.clearfix role="button"
|
.clearfix role='button'
|
||||||
span = t('internal_users.form.click_to_collapse')
|
span = t('internal_users.form.click_to_collapse')
|
||||||
.card-collapse.collapse id="study-group-collapse" role="tabpanel"
|
.card-collapse.collapse#study-group-collapse role='tabpanel'
|
||||||
.table-responsive
|
.table-responsive
|
||||||
table.table.overflow-hidden#study-groups-table
|
table.table.overflow-hidden#study-groups-table
|
||||||
thead
|
thead
|
||||||
@ -31,8 +31,8 @@
|
|||||||
th = t('activerecord.attributes.study_group_membership.role')
|
th = t('activerecord.attributes.study_group_membership.role')
|
||||||
= collection_check_boxes :user, :study_group_ids, @study_group_memberships, :study_group_id, :id, {namespace: :internal_user} do |b|
|
= collection_check_boxes :user, :study_group_ids, @study_group_memberships, :study_group_id, :id, {namespace: :internal_user} do |b|
|
||||||
tr
|
tr
|
||||||
td = b.check_box class: 'form-check-input', name: "internal_user[study_group_ids][]"
|
td = b.check_box class: 'form-check-input', name: 'internal_user[study_group_ids][]'
|
||||||
td = b.object.study_group.name
|
td = b.object.study_group.name
|
||||||
td = select "study_group_membership_roles[#{b.object.study_group.id}]", :role, StudyGroupMembership::ROLES.map { |role| [t("activerecord.attributes.study_group_membership.role_type.#{role}"), role] }, {selected: b.object.persisted? ? b.object.role : nil, include_blank: true}, class: 'form-control form-control-sm'
|
td = select "study_group_membership_roles[#{b.object.study_group.id}]", :role, StudyGroupMembership::ROLES.map {|role| [t("activerecord.attributes.study_group_membership.role_type.#{role}"), role] }, {selected: b.object.persisted? ? b.object.role : nil, include_blank: true}, class: 'form-control form-control-sm'
|
||||||
|
|
||||||
.actions = render('shared/submit_button', f: f, object: @user)
|
.actions = render('shared/submit_button', f:, object: @user)
|
||||||
|
@ -9,7 +9,7 @@ h1 = InternalUser.model_name.human(count: 2)
|
|||||||
= f.label(:email_cont, t('activerecord.attributes.internal_user.email'), class: 'visually-hidden form-label')
|
= f.label(:email_cont, t('activerecord.attributes.internal_user.email'), class: 'visually-hidden form-label')
|
||||||
= f.search_field(:email_cont, class: 'form-control', placeholder: t('activerecord.attributes.internal_user.email'))
|
= f.search_field(:email_cont, class: 'form-control', placeholder: t('activerecord.attributes.internal_user.email'))
|
||||||
.col-auto
|
.col-auto
|
||||||
= f.select :platform_admin_true, [[t('shared.admin_filter.only'), 1], [t('shared.admin_filter.none'), 0]], { include_blank: t('shared.admin_filter.all'), selected: params[:q] ? params[:q][:platform_admin_true] : '' }
|
= f.select :platform_admin_true, [[t('shared.admin_filter.only'), 1], [t('shared.admin_filter.none'), 0]], {include_blank: t('shared.admin_filter.all'), selected: params[:q] ? params[:q][:platform_admin_true] : ''}
|
||||||
.table-responsive
|
.table-responsive
|
||||||
table.table.mt-4
|
table.table.mt-4
|
||||||
thead
|
thead
|
||||||
|
@ -8,10 +8,10 @@ h1
|
|||||||
= row(label: 'internal_user.platform_admin', value: @user.platform_admin?) if current_user.admin?
|
= row(label: 'internal_user.platform_admin', value: @user.platform_admin?) if current_user.admin?
|
||||||
= row(label: 'internal_user.activated', value: @user.activated?)
|
= row(label: 'internal_user.activated', value: @user.activated?)
|
||||||
= row(label: 'users.show.study_groups') do
|
= row(label: 'users.show.study_groups') do
|
||||||
- visible_memberships = @user.study_group_memberships.select { |study_group_membership| policy(study_group_membership.study_group).show? }
|
- visible_memberships = @user.study_group_memberships.select {|study_group_membership| policy(study_group_membership.study_group).show? }
|
||||||
- if visible_memberships.any?
|
- if visible_memberships.any?
|
||||||
ul.mb-0 class="#{visible_memberships.one? ? 'single_entry_inline_list' : 'inline_list'}"
|
ul.mb-0 class=(visible_memberships.one? ? 'single_entry_inline_list' : 'inline_list')
|
||||||
- visible_memberships = visible_memberships.sort_by{ |study_group_membership| study_group_membership.study_group.name}
|
- visible_memberships = visible_memberships.sort_by {|study_group_membership| study_group_membership.study_group.name }
|
||||||
- visible_memberships.each do |study_group_membership|
|
- visible_memberships.each do |study_group_membership|
|
||||||
li
|
li
|
||||||
=> link_to(study_group_membership.study_group.name, study_group_membership.study_group)
|
=> link_to(study_group_membership.study_group.name, study_group_membership.study_group)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
doctype html
|
doctype html
|
||||||
html lang="#{I18n.locale || I18n.default_locale}" data-default-locale="#{I18n.default_locale}"
|
html lang=I18n.locale data-default-locale=I18n.default_locale
|
||||||
head
|
head
|
||||||
meta charset='utf8'
|
meta charset='utf8'
|
||||||
meta name='viewport' content='width=device-width, initial-scale=1'
|
meta name='viewport' content='width=device-width, initial-scale=1'
|
||||||
@ -36,9 +36,9 @@ html lang="#{I18n.locale || I18n.default_locale}" data-default-locale="#{I18n.de
|
|||||||
= render('session')
|
= render('session')
|
||||||
div data-controller=controller_name
|
div data-controller=controller_name
|
||||||
= render('flash')
|
= render('flash')
|
||||||
- if current_user.try(:admin?) or current_user.try(:teacher?) && !@embed_options[:hide_navbar]
|
- if current_user.try(:admin?) || (current_user.try(:teacher?) && !@embed_options[:hide_navbar])
|
||||||
= yield(:breadcrumbs)
|
= yield(:breadcrumbs)
|
||||||
- if (controller_name == "exercises" && action_name == "implement") || (controller_name == 'community_solutions' && action_name == 'edit')
|
- if (controller_name == 'exercises' && action_name == 'implement') || (controller_name == 'community_solutions' && action_name == 'edit')
|
||||||
.container-fluid
|
.container-fluid
|
||||||
= yield
|
= yield
|
||||||
- else
|
- else
|
||||||
@ -46,4 +46,4 @@ html lang="#{I18n.locale || I18n.default_locale}" data-default-locale="#{I18n.de
|
|||||||
= yield
|
= yield
|
||||||
|
|
||||||
- template_variables = {execution_environment: @exercise.execution_environment} if action_name == 'implement'
|
- template_variables = {execution_environment: @exercise.execution_environment} if action_name == 'implement'
|
||||||
= render('shared/modal', classes: 'modal-lg', id: 'modal-help', template: 'application/help', template_variables: template_variables, title: t('shared.help.headline'))
|
= render('shared/modal', classes: 'modal-lg', id: 'modal-help', template: 'application/help', template_variables:, title: t('shared.help.headline'))
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
.col-md-6
|
.col-md-6
|
||||||
.input-group.mb-3
|
.input-group.mb-3
|
||||||
= f.text_field(:programming_partner_ids, class: 'form-control', required: true, value: (@programming_group.programming_partner_ids - [current_user.id_with_type]).join(', '))
|
= f.text_field(:programming_partner_ids, class: 'form-control', required: true, value: (@programming_group.programming_partner_ids - [current_user.id_with_type]).join(', '))
|
||||||
= render('shared/submit_button', f: f, object: @programming_group)
|
= render('shared/submit_button', f:, object: @programming_group)
|
||||||
/.help-block.form-text = t('.hints.programming_partner_ids')
|
/.help-block.form-text = t('.hints.programming_partner_ids')
|
||||||
.col-md-6
|
.col-md-6
|
||||||
.join_programming_pair.button.btn.btn-primary.d-none.d-md-block
|
.join_programming_pair.button.btn.btn-primary.d-none.d-md-block
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
h3 = t('activerecord.attributes.programming_group.member')
|
h3 = t('activerecord.attributes.programming_group.member')
|
||||||
.table-responsive
|
.table-responsive
|
||||||
table.table class="#{@members.present? ? 'sortable' : ''}"
|
table.table class=(@members.present? ? 'sortable' : '')
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
th = t('activerecord.attributes.exercise.selection')
|
th = t('activerecord.attributes.exercise.selection')
|
||||||
@ -13,4 +13,4 @@
|
|||||||
td = b.check_box class: 'form-check-input'
|
td = b.check_box class: 'form-check-input'
|
||||||
td = link_to_if(policy(b.object.user).show?, b.object.user.displayname, b.object.user)
|
td = link_to_if(policy(b.object.user).show?, b.object.user.displayname, b.object.user)
|
||||||
|
|
||||||
.actions = render('shared/submit_button', f: f, object: @programming_group)
|
.actions = render('shared/submit_button', f:, object: @programming_group)
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
h1 = "#{ProgrammingGroup.model_name.human(count: 2)} for Exercise '#{@exercise.title}'"
|
h1 = "#{ProgrammingGroup.model_name.human(count: 2)} for Exercise '#{@exercise.title}'"
|
||||||
|
|
||||||
.table-responsive
|
.table-responsive
|
||||||
table.table.mt-4 class="#{@programming_groups.present? ? 'sortable' : ''}"
|
table.table.mt-4 class=(@programming_groups.present? ? 'sortable' : '')
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
th.sortable_nosort = sort_link(@search, :id, t('activerecord.attributes.programming_group.name'))
|
th.sortable_nosort = sort_link(@search, :id, t('activerecord.attributes.programming_group.name'))
|
||||||
@ -33,11 +33,11 @@
|
|||||||
tr
|
tr
|
||||||
td = link_to_if(policy(programming_group).show?, programming_group.displayname, programming_group)
|
td = link_to_if(policy(programming_group).show?, programming_group.displayname, programming_group)
|
||||||
- if params[:exercise_id].blank?
|
- if params[:exercise_id].blank?
|
||||||
td = link_to_if(policy(programming_group.exercise).show?, programming_group.exercise.title, programming_group.exercise, 'data-turbolinks' => "false")
|
td = link_to_if(policy(programming_group.exercise).show?, programming_group.exercise.title, programming_group.exercise, 'data-turbolinks': 'false')
|
||||||
td == programming_group.users.map { |user| link_to_if(policy(user).show?, user.name, user) }.join(', ')
|
td == programming_group.users.map {|user| link_to_if(policy(user).show?, user.name, user) }.join(', ')
|
||||||
td = programming_group.users.size
|
td = programming_group.users.size
|
||||||
td = l(programming_group.created_at, format: :short)
|
td = l(programming_group.created_at, format: :short)
|
||||||
td = link_to(t('shared.show'), programming_group) if policy(programming_group).show?
|
td = link_to(t('shared.show'), programming_group) if policy(programming_group).show?
|
||||||
td = link_to(t('shared.edit'), edit_programming_group_path(programming_group)) if policy(programming_group).edit?
|
td = link_to(t('shared.edit'), edit_programming_group_path(programming_group)) if policy(programming_group).edit?
|
||||||
td = link_to(t('shared.destroy'), programming_group, data: { confirm: t('shared.confirm_destroy') }, method: :delete) if policy(programming_group).destroy?
|
td = link_to(t('shared.destroy'), programming_group, data: {confirm: t('shared.confirm_destroy')}, method: :delete) if policy(programming_group).destroy?
|
||||||
= render('shared/pagination', collection: @programming_groups)
|
= render('shared/pagination', collection: @programming_groups)
|
||||||
|
@ -15,7 +15,6 @@ h1.d-inline-block = t('programming_groups.new.create_programming_pair')
|
|||||||
h5 = t('programming_groups.new.work_with_a_friend')
|
h5 = t('programming_groups.new.work_with_a_friend')
|
||||||
p = t('programming_groups.new.enter_partner_id', exercise_title: @exercise.title)
|
p = t('programming_groups.new.enter_partner_id', exercise_title: @exercise.title)
|
||||||
|
|
||||||
|
|
||||||
=> t('programming_groups.new.own_user_id')
|
=> t('programming_groups.new.own_user_id')
|
||||||
b = current_user.id_with_type
|
b = current_user.id_with_type
|
||||||
.d-md-none
|
.d-md-none
|
||||||
|
@ -10,10 +10,10 @@ h1
|
|||||||
|
|
||||||
h2.mt-4 = t('activerecord.attributes.study_group.members')
|
h2.mt-4 = t('activerecord.attributes.study_group.members')
|
||||||
.table-responsive
|
.table-responsive
|
||||||
table.table class="#{@programming_group.users.present? ? 'sortable' : ''}"
|
table.table class=(@programming_group.users.present? ? 'sortable' : '')
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
th = t('navigation.sections.contributors')
|
th = t('navigation.sections.contributors')
|
||||||
- @programming_group.users.each do |user|
|
- @programming_group.users.each do |user|
|
||||||
tr
|
tr
|
||||||
td = link_to_if(policy(user).show?, user.displayname, user)
|
td = link_to_if(policy(user).show?, user.displayname, user)
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
= f.text_field(:title, class: 'form-control', required: true)
|
= f.text_field(:title, class: 'form-control', required: true)
|
||||||
.mb-3
|
.mb-3
|
||||||
= f.label(:description, class: 'form-label')
|
= f.label(:description, class: 'form-label')
|
||||||
= f.pagedown :description, input_html: { preview: true, rows: 10 }
|
= f.pagedown :description, input_html: {preview: true, rows: 10}
|
||||||
.mb-3
|
.mb-3
|
||||||
= f.label(:algorithm, class: 'form-label')
|
= f.label(:algorithm, class: 'form-label')
|
||||||
= f.collection_select(:algorithm, ProxyExercise.algorithms.map { |algorithm, _id| [t("activerecord.attributes.proxy_exercise.algorithm_type.#{algorithm}"), algorithm] }, :second, :first, {}, class: 'form-control form-control-sm')
|
= f.collection_select(:algorithm, ProxyExercise.algorithms.map {|algorithm, _id| [t("activerecord.attributes.proxy_exercise.algorithm_type.#{algorithm}"), algorithm] }, :second, :first, {}, class: 'form-control form-control-sm')
|
||||||
.form-check.mb-3
|
.form-check.mb-3
|
||||||
label.form-check-label
|
label.form-check-label
|
||||||
= f.check_box(:public, class: 'form-check-input')
|
= f.check_box(:public, class: 'form-check-input')
|
||||||
@ -28,4 +28,4 @@
|
|||||||
td = link_to_if(policy(b.object).show?, b.object, b.object)
|
td = link_to_if(policy(b.object).show?, b.object, b.object)
|
||||||
td = l(b.object.created_at, format: :short)
|
td = l(b.object.created_at, format: :short)
|
||||||
|
|
||||||
.actions = render('shared/submit_button', f: f, object: @proxy_exercise)
|
.actions = render('shared/submit_button', f:, object: @proxy_exercise)
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
h1 = t('activerecord.models.proxy_exercise.one', model: ProxyExercise.model_name.human)+ ": " + @proxy_exercise.title
|
h1 = "#{t('activerecord.models.proxy_exercise.one', model: ProxyExercise.model_name.human)}: #{@proxy_exercise.title}"
|
||||||
|
|
||||||
= render('form')
|
= render('form')
|
||||||
|
@ -27,11 +27,11 @@ h1 = ProxyExercise.model_name.human(count: 2)
|
|||||||
|
|
||||||
td.p-1
|
td.p-1
|
||||||
.btn-group
|
.btn-group
|
||||||
button.btn.btn-outline-primary.btn-sm.dropdown-toggle data-bs-toggle="dropdown" type="button" = t('shared.actions_button')
|
button.btn.btn-outline-primary.btn-sm.dropdown-toggle data-bs-toggle='dropdown' type='button' = t('shared.actions_button')
|
||||||
span.caret
|
span.caret
|
||||||
span.visually-hidden Toggle Dropdown
|
span.visually-hidden Toggle Dropdown
|
||||||
ul.dropdown-menu.float-end role="menu"
|
ul.dropdown-menu.float-end role='menu'
|
||||||
li = link_to(t('shared.show'), proxy_exercise, 'data-turbolinks' => "false", class: 'dropdown-item') if policy(proxy_exercise).show?
|
li = link_to(t('shared.show'), proxy_exercise, 'data-turbolinks': 'false', class: 'dropdown-item') if policy(proxy_exercise).show?
|
||||||
li = link_to(t('shared.destroy'), proxy_exercise, data: {confirm: t('shared.confirm_destroy')}, method: :delete, class: 'dropdown-item') if policy(proxy_exercise).destroy?
|
li = link_to(t('shared.destroy'), proxy_exercise, data: {confirm: t('shared.confirm_destroy')}, method: :delete, class: 'dropdown-item') if policy(proxy_exercise).destroy?
|
||||||
li = link_to(t('.clone'), clone_proxy_exercise_path(proxy_exercise), data: {confirm: t('shared.confirm_destroy')}, method: :post, class: 'dropdown-item') if policy(proxy_exercise).clone?
|
li = link_to(t('.clone'), clone_proxy_exercise_path(proxy_exercise), data: {confirm: t('shared.confirm_destroy')}, method: :post, class: 'dropdown-item') if policy(proxy_exercise).clone?
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
hr
|
hr
|
||||||
h5.mt-4 Admin Menu
|
h5.mt-4 Admin Menu
|
||||||
ul.text
|
ul.text
|
||||||
li = link_to "Clear question text (in case of explicit text)", clear_question_request_for_comment_path(id: @request_for_comment.id), method: :post if policy(@request_for_comment).clear_question?
|
li = link_to 'Clear question text (in case of explicit text)', clear_question_request_for_comment_path(id: @request_for_comment.id), method: :post if policy(@request_for_comment).clear_question?
|
||||||
li = link_to "User's current status of this exercise", statistics_external_user_exercise_path(id: @request_for_comment.exercise_id, external_user_id: @request_for_comment.user_id) if policy(@request_for_comment.exercise).statistics?
|
li = link_to "User's current status of this exercise", statistics_external_user_exercise_path(id: @request_for_comment.exercise_id, external_user_id: @request_for_comment.user_id) if policy(@request_for_comment.exercise).statistics?
|
||||||
li = link_to "All exercises of this user", statistics_external_user_path(id: @request_for_comment.user_id) if policy(@request_for_comment.user).statistics?
|
li = link_to 'All exercises of this user', statistics_external_user_path(id: @request_for_comment.user_id) if policy(@request_for_comment.user).statistics?
|
||||||
ul.text
|
ul.text
|
||||||
li = link_to "Implement the exercise yourself", implement_exercise_path(id: @request_for_comment.exercise_id) if policy(@request_for_comment.exercise).implement?
|
li = link_to 'Implement the exercise yourself', implement_exercise_path(id: @request_for_comment.exercise_id) if policy(@request_for_comment.exercise).implement?
|
||||||
li = link_to "Show the exercise", exercise_path(id: @request_for_comment.exercise_id) if policy(@request_for_comment.exercise).show?
|
li = link_to 'Show the exercise', exercise_path(id: @request_for_comment.exercise_id) if policy(@request_for_comment.exercise).show?
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
tr.table-row-clickable data-id=request_for_comment.id data-href=request_for_comment_path(request_for_comment)
|
tr.table-row-clickable data-id=request_for_comment.id data-href=request_for_comment_path(request_for_comment)
|
||||||
td.p-2
|
td.p-2
|
||||||
- if request_for_comment.solved?
|
- if request_for_comment.solved?
|
||||||
span.fa-solid.fa-check.fa-2x.text-success aria-hidden="true"
|
span.fa-solid.fa-check.fa-2x.text-success aria-hidden='true'
|
||||||
- elsif request_for_comment.full_score_reached
|
- elsif request_for_comment.full_score_reached
|
||||||
span.fa-solid.fa-check.fa-2x style="color: var(--bs-secondary-text-emphasis);" aria-hidden="true"
|
span.fa-solid.fa-check.fa-2x.text-secondary-emphasis aria-hidden='true'
|
||||||
- else
|
- else
|
||||||
= ''
|
= ''
|
||||||
td.text-center = request_for_comment.comments.size
|
td.text-center = request_for_comment.comments.size
|
||||||
|
@ -8,25 +8,25 @@ h1 = RequestForComment.model_name.human(count: 2)
|
|||||||
= f.label(:exercise_title_cont, t('activerecord.attributes.request_for_comments.exercise'), class: 'visually-hidden form-label')
|
= f.label(:exercise_title_cont, t('activerecord.attributes.request_for_comments.exercise'), class: 'visually-hidden form-label')
|
||||||
= f.search_field(:exercise_title_cont, class: 'form-control', placeholder: t('activerecord.attributes.request_for_comments.exercise'))
|
= f.search_field(:exercise_title_cont, class: 'form-control', placeholder: t('activerecord.attributes.request_for_comments.exercise'))
|
||||||
.col-auto.mt-3.mt-md-0
|
.col-auto.mt-3.mt-md-0
|
||||||
= f.label(:title_cont, t('request_for_comments.solved'), class: 'visually-hidden form-label')
|
= f.label(:title_cont, t('request_for_comments.solved'), class: 'visually-hidden form-label')
|
||||||
= f.select(:solved_not_eq, [[t('request_for_comments.show_all'), 2], [t('request_for_comments.show_unsolved'), 1], [t('request_for_comments.show_solved'), 0]])
|
= f.select(:solved_not_eq, [[t('request_for_comments.show_all'), 2], [t('request_for_comments.show_unsolved'), 1], [t('request_for_comments.show_solved'), 0]])
|
||||||
- unless current_user.consumer.rfc_visibility_study_group?
|
- unless current_user.consumer.rfc_visibility_study_group?
|
||||||
.row
|
.row
|
||||||
.col
|
.col
|
||||||
= f.label(:submission_study_group_id_eq, t('request_for_comments.index.study_groups.placeholder'), class: 'visually-hidden form-label')
|
= f.label(:submission_study_group_id_eq, t('request_for_comments.index.study_groups.placeholder'), class: 'visually-hidden form-label')
|
||||||
= f.grouped_collection_select(:submission_study_group_id_in, @study_groups_grouping, :second, :first, :id, :to_s, {},
|
= f.grouped_collection_select(:submission_study_group_id_in, @study_groups_grouping, :second, :first, :id, :to_s, {},
|
||||||
{ class: 'form-control', multiple: true, "data-placeholder": t('request_for_comments.index.study_groups.placeholder') })
|
{class: 'form-control', multiple: true, 'data-placeholder': t('request_for_comments.index.study_groups.placeholder')})
|
||||||
|
|
||||||
.table-responsive
|
.table-responsive
|
||||||
table.table.mt-4 class="#{@request_for_comments.present? ? 'sortable' : ''}"
|
table.table.mt-4 class=(@request_for_comments.present? ? 'sortable' : '')
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
th
|
th
|
||||||
i class="fa-regular fa-lightbulb" aria-hidden="true" title = t('request_for_comments.solved') align="right"
|
i.fa-regular.fa-lightbulb aria-hidden='true' title = t('request_for_comments.solved') align='right'
|
||||||
th.sorttable_nosort = sort_link(@search, :title, t('activerecord.attributes.request_for_comments.exercise'))
|
th.sorttable_nosort = sort_link(@search, :title, t('activerecord.attributes.request_for_comments.exercise'))
|
||||||
th = t('activerecord.attributes.request_for_comments.question')
|
th = t('activerecord.attributes.request_for_comments.question')
|
||||||
th
|
th
|
||||||
i class="fa-solid fa-comment" aria-hidden="true" title = t('request_for_comments.comments') align="center"
|
i.fa-solid.fa-comment aria-hidden='true' title = t('request_for_comments.comments') align='center'
|
||||||
th = t('activerecord.attributes.request_for_comments.username')
|
th = t('activerecord.attributes.request_for_comments.username')
|
||||||
th = t('activerecord.attributes.request_for_comments.requested_at')
|
th = t('activerecord.attributes.request_for_comments.requested_at')
|
||||||
th = t('activerecord.attributes.request_for_comments.last_update')
|
th = t('activerecord.attributes.request_for_comments.last_update')
|
||||||
@ -35,10 +35,10 @@ h1 = RequestForComment.model_name.human(count: 2)
|
|||||||
tr data-id=request_for_comment.id
|
tr data-id=request_for_comment.id
|
||||||
- if request_for_comment.solved?
|
- if request_for_comment.solved?
|
||||||
td
|
td
|
||||||
span class="fa-solid fa-check" aria-hidden="true"
|
span.fa-solid.fa-check aria-hidden='true'
|
||||||
- elsif request_for_comment.full_score_reached
|
- elsif request_for_comment.full_score_reached
|
||||||
td
|
td
|
||||||
span class="fa-solid fa-check" style="color: var(--bs-secondary-text-emphasis);" aria-hidden="true"
|
span.fa-solid.fa-check.text-secondary-emphasis aria-hidden='true'
|
||||||
- else
|
- else
|
||||||
td = ''
|
td = ''
|
||||||
td = link_to_if(policy(request_for_comment).show?, request_for_comment.submission.exercise.title, request_for_comment)
|
td = link_to_if(policy(request_for_comment).show?, request_for_comment.submission.exercise.title, request_for_comment)
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
.list-group
|
.list-group
|
||||||
h4#exercise_caption.list-group-item-heading data-exercise-id="#{@request_for_comment.exercise.id}" data-rfc-id="#{@request_for_comment.id}"
|
h4#exercise_caption.list-group-item-heading data-exercise-id=@request_for_comment.exercise.id data-rfc-id=@request_for_comment.id
|
||||||
- if @request_for_comment.solved?
|
- if @request_for_comment.solved?
|
||||||
span.fa-solid.fa-check.me-2 aria-hidden="true"
|
span.fa-solid.fa-check.me-2 aria-hidden='true'
|
||||||
= link_to_if(policy(@request_for_comment.exercise).show?, @request_for_comment.exercise.title, [:implement, @request_for_comment.exercise])
|
= link_to_if(policy(@request_for_comment.exercise).show?, @request_for_comment.exercise.title, [:implement, @request_for_comment.exercise])
|
||||||
p.list-group-item-text
|
p.list-group-item-text
|
||||||
- user = @request_for_comment.user
|
- user = @request_for_comment.user
|
||||||
- submission = @request_for_comment.submission
|
- submission = @request_for_comment.submission
|
||||||
- testruns = Testrun.where(:submission_id => @request_for_comment.submission)
|
- testruns = Testrun.where(submission_id: @request_for_comment.submission)
|
||||||
= link_to_if(policy(user).show?, user.displayname, user)
|
= link_to_if(policy(user).show?, user.displayname, user)
|
||||||
| | #{@request_for_comment.created_at.localtime}
|
| | #{@request_for_comment.created_at.localtime}
|
||||||
- if @request_for_comment.submission.study_group.present? && policy(@request_for_comment.submission).show_study_group?
|
- if @request_for_comment.submission.study_group.present? && policy(@request_for_comment.submission).show_study_group?
|
||||||
@ -25,33 +25,33 @@
|
|||||||
= t('activerecord.attributes.request_for_comments.question')
|
= t('activerecord.attributes.request_for_comments.question')
|
||||||
.text
|
.text
|
||||||
- question = @request_for_comment.question
|
- question = @request_for_comment.question
|
||||||
= question.blank? ? t('request_for_comments.no_question') : question
|
= question.presence || t('request_for_comments.no_question')
|
||||||
|
|
||||||
- if policy(@request_for_comment).mark_as_solved? and not @request_for_comment.solved?
|
- if policy(@request_for_comment).mark_as_solved? && !@request_for_comment.solved?
|
||||||
= render('mark_as_solved')
|
= render('mark_as_solved')
|
||||||
|
|
||||||
- if testruns.size > 0
|
- if testruns.size.positive?
|
||||||
.testruns
|
.testruns
|
||||||
- output_runs = testruns.select {|run| run.cause == 'run'}
|
- output_runs = testruns.select {|run| run.cause == 'run' }
|
||||||
- if output_runs.size > 0
|
- if output_runs.size.positive?
|
||||||
h5.mt-4= t('request_for_comments.runtime_output')
|
h5.mt-4 = t('request_for_comments.runtime_output')
|
||||||
.collapsed.testrun-output.text
|
.collapsed.testrun-output.text
|
||||||
span.fa-solid.fa-chevron-down.collapse-button
|
span.fa-solid.fa-chevron-down.collapse-button
|
||||||
- output_runs.each do |testrun|
|
- output_runs.each do |testrun|
|
||||||
pre= testrun.log or t('request_for_comments.no_output')
|
pre = testrun.log || t('request_for_comments.no_output')
|
||||||
|
|
||||||
- assess_runs = testruns.select {|run| run.cause == 'assess' }
|
- assess_runs = testruns.select {|run| run.cause == 'assess' }
|
||||||
- unless current_user.admin?
|
- unless current_user.admin?
|
||||||
- assess_runs = assess_runs.select {|run| run.file.present? ? !run.file.hidden_feedback?: true }
|
- assess_runs = assess_runs.select {|run| run.file.present? ? !run.file.hidden_feedback? : true }
|
||||||
- if assess_runs.size > 0
|
- if assess_runs.size.positive?
|
||||||
h5.mt-4= t('request_for_comments.test_results')
|
h5.mt-4 = t('request_for_comments.test_results')
|
||||||
.testrun-assess-results
|
.testrun-assess-results
|
||||||
- assess_runs.each do |testrun|
|
- assess_runs.each do |testrun|
|
||||||
.testrun-container
|
.testrun-container
|
||||||
div class=("result #{testrun.passed ? 'passed' : 'failed'}")
|
div class="result #{testrun.passed ? 'passed' : 'failed'}"
|
||||||
.collapsed.testrun-output.text
|
.collapsed.testrun-output.text
|
||||||
span.fa-solid.fa-chevron-down.collapse-button
|
span.fa-solid.fa-chevron-down.collapse-button
|
||||||
pre= testrun.log or t('request_for_comments.no_output')
|
pre = testrun.log || t('request_for_comments.no_output')
|
||||||
|
|
||||||
- if current_user.admin? && user.is_a?(ExternalUser)
|
- if current_user.admin? && user.is_a?(ExternalUser)
|
||||||
= render('admin_menu')
|
= render('admin_menu')
|
||||||
@ -69,12 +69,12 @@
|
|||||||
| do not put a carriage return in the line below. it will be present in the presentation of the source code, otherwise.
|
| do not put a carriage return in the line below. it will be present in the presentation of the source code, otherwise.
|
||||||
| also, all settings from the rails model needed for the editor configuration in the JavaScript are attached to the editor as data attributes here.
|
| also, all settings from the rails model needed for the editor configuration in the JavaScript are attached to the editor as data attributes here.
|
||||||
- submission.files.each do |file|
|
- submission.files.each do |file|
|
||||||
= (file.path or "") + "/" + file.name + file.file_type.file_extension
|
= "#{file.path || ''}/#{file.name}#{file.file_type.file_extension}"
|
||||||
br
|
br
|
||||||
|
|
|
|
||||||
i.fa-solid.fa-arrow-down aria-hidden="true"
|
i.fa-solid.fa-arrow-down aria-hidden='true'
|
||||||
= t('request_for_comments.click_here')
|
= t('request_for_comments.click_here')
|
||||||
#commentitor.editor data-file-id="#{file.id}" data-mode="#{file.file_type.editor_mode}" data-read-only="true"
|
#commentitor.editor data-file-id=file.id data-mode=file.file_type.editor_mode data-read-only='true'
|
||||||
= file.content
|
= file.content
|
||||||
|
|
||||||
= render('shared/modal', id: 'comment-modal', title: t('exercises.implement.comment.dialogtitle'), template: 'exercises/_comment_dialogcontent')
|
= render('shared/modal', id: 'comment-modal', title: t('exercises.implement.comment.dialogtitle'), template: 'exercises/_comment_dialogcontent')
|
||||||
|
@ -3,7 +3,7 @@ h1 = t('.headline')
|
|||||||
p
|
p
|
||||||
= t(".success_#{@lti_parameter ? 'with' : 'without'}_outcome", consumer: current_user.consumer)
|
= t(".success_#{@lti_parameter ? 'with' : 'without'}_outcome", consumer: current_user.consumer)
|
||||||
==< t(".finished_#{@lti_parameter ? 'with' : 'without'}_consumer", consumer: h(current_user.consumer.name), url: @url)
|
==< t(".finished_#{@lti_parameter ? 'with' : 'without'}_consumer", consumer: h(current_user.consumer.name), url: @url)
|
||||||
=< t(".do_not_use_backbutton")
|
=< t('.do_not_use_backbutton')
|
||||||
|
|
||||||
h2 = t('shared.statistics')
|
h2 = t('shared.statistics')
|
||||||
|
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
button.btn-close data-bs-dismiss='modal' type='button'
|
button.btn-close data-bs-dismiss='modal' type='button'
|
||||||
span.visually-hidden Close
|
span.visually-hidden Close
|
||||||
.modal-body
|
.modal-body
|
||||||
- if local_assigns.has_key?(:body)
|
- if local_assigns.key?(:body)
|
||||||
= body
|
= body
|
||||||
- else
|
- else
|
||||||
= render(layout: false, locals: (local_assigns[:template_variables] || {}).merge(modal: true), template: template)
|
= render(layout: false, locals: (local_assigns[:template_variables] || {}).merge(modal: true), template:)
|
||||||
.modal-footer
|
.modal-footer
|
||||||
= yield(:modal_footer)
|
= yield(:modal_footer)
|
||||||
|
@ -12,14 +12,14 @@
|
|||||||
.graph id="#{resource}-activity-history"
|
.graph id="#{resource}-activity-history"
|
||||||
form
|
form
|
||||||
.mb-3
|
.mb-3
|
||||||
label for="from-date" = t('.from')
|
label for='from-date' = t('.from')
|
||||||
input type="date" class="form-control" id="from-date" name="from" value=(params[:from] || DateTime.new(2016).to_date)
|
input.form-control#from-date type='date' name='from' value=params[:from] || DateTime.new(2016).to_date
|
||||||
.mb-3
|
.mb-3
|
||||||
label for="to-date" = t('.to')
|
label for='to-date' = t('.to')
|
||||||
input type="date" class="form-control" id="to-date" name="to" value=(params[:to] || DateTime.now.to_date)
|
input.form-control#to-date type='date' name='to' value=params[:to] || DateTime.now.to_date
|
||||||
.mb-3
|
.mb-3
|
||||||
label for="interval" = t('.interval')
|
label for='interval' = t('.interval')
|
||||||
select class="form-control" id="interval" name="interval"
|
select.form-control#interval name='interval'
|
||||||
= [:year, :quarter, :month, :day, :hour, :minute, :second].each do | key |
|
= %i[year quarter month day hour minute second].each do |key|
|
||||||
option selected=(key.to_s == params[:interval]) = key
|
option selected=(key.to_s == params[:interval]) = key
|
||||||
button type="submit" class="btn btn-primary" = t('.update')
|
button.btn.btn-primary type='submit' = t('.update')
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
|
|
||||||
#statistics-container
|
#statistics-container
|
||||||
- statistics_data.each do | section |
|
- statistics_data.each do |section|
|
||||||
h2 = section[:name]
|
h2 = section[:name]
|
||||||
.statistics-wrapper data-key=section[:key]
|
.statistics-wrapper data-key=section[:key]
|
||||||
- section[:entries].each do | entry |
|
- section[:entries].each do |entry|
|
||||||
a href=entry[:url]
|
a href=entry[:url]
|
||||||
div data-key=entry[:key]
|
div data-key=entry[:key]
|
||||||
.title = entry[:name]
|
.title = entry[:name]
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
h3 = t('activerecord.attributes.study_group.members')
|
h3 = t('activerecord.attributes.study_group.members')
|
||||||
.table-responsive
|
.table-responsive
|
||||||
table.table class="#{@members.present? ? 'sortable' : ''}"
|
table.table class=(@members.present? ? 'sortable' : '')
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
th = t('activerecord.attributes.exercise.selection')
|
th = t('activerecord.attributes.exercise.selection')
|
||||||
@ -16,4 +16,4 @@
|
|||||||
td = b.check_box class: 'form-check-input'
|
td = b.check_box class: 'form-check-input'
|
||||||
td = link_to_if(policy(b.object.user).show?, b.object.user.displayname, b.object.user)
|
td = link_to_if(policy(b.object.user).show?, b.object.user.displayname, b.object.user)
|
||||||
|
|
||||||
.actions = render('shared/submit_button', f: f, object: @study_group)
|
.actions = render('shared/submit_button', f:, object: @study_group)
|
||||||
|
@ -9,13 +9,12 @@ h1
|
|||||||
= row(label: 'study_group.consumer', value: link_to_if(policy(@study_group).show?, @study_group.consumer, @study_group.consumer))
|
= row(label: 'study_group.consumer', value: link_to_if(policy(@study_group).show?, @study_group.consumer, @study_group.consumer))
|
||||||
= row(label: 'study_group.member_count', value: @study_group.user_count)
|
= row(label: 'study_group.member_count', value: @study_group.user_count)
|
||||||
|
|
||||||
|
|
||||||
h2.mt-4 = t('activerecord.attributes.study_group.members')
|
h2.mt-4 = t('activerecord.attributes.study_group.members')
|
||||||
.table-responsive
|
.table-responsive
|
||||||
table.table class="#{@study_group.users.present? ? 'sortable' : ''}"
|
table.table class=(@study_group.users.present? ? 'sortable' : '')
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
th = t('navigation.sections.users')
|
th = t('navigation.sections.users')
|
||||||
- @study_group.users.each do |user|
|
- @study_group.users.each do |user|
|
||||||
tr
|
tr
|
||||||
td = link_to_if(policy(user).show?, user.displayname, user)
|
td = link_to_if(policy(user).show?, user.displayname, user)
|
||||||
|
@ -6,7 +6,7 @@ h1 = Submission.model_name.human(count: 2)
|
|||||||
= f.collection_select(:exercise_id_eq, Exercise.with_submissions, :id, :title, class: 'form-control', prompt: t('activerecord.attributes.submission.exercise'))
|
= f.collection_select(:exercise_id_eq, Exercise.with_submissions, :id, :title, class: 'form-control', prompt: t('activerecord.attributes.submission.exercise'))
|
||||||
.col-auto
|
.col-auto
|
||||||
= f.label(:cause_eq, t('activerecord.attributes.submission.cause'), class: 'visually-hidden form-label')
|
= f.label(:cause_eq, t('activerecord.attributes.submission.cause'), class: 'visually-hidden form-label')
|
||||||
= f.select(:cause_eq, Submission.select(:cause).distinct.map(&:cause).sort, class: 'form-control', prompt: t('activerecord.attributes.submission.cause'))
|
= f.select(:cause_eq, Submission.distinct.pluck(:cause).sort, class: 'form-control', prompt: t('activerecord.attributes.submission.cause'))
|
||||||
|
|
||||||
.table-responsive
|
.table-responsive
|
||||||
table.table.mt-4
|
table.table.mt-4
|
||||||
|
@ -18,4 +18,4 @@ h2.mt-4 = t('activerecord.attributes.submission.files')
|
|||||||
ul.list-unstyled
|
ul.list-unstyled
|
||||||
- @files.each do |file|
|
- @files.each do |file|
|
||||||
li.card.mt-2
|
li.card.mt-2
|
||||||
.card-body = render('shared/file', file: file)
|
.card-body = render('shared/file', file:)
|
||||||
|
@ -3,4 +3,4 @@
|
|||||||
.mb-3
|
.mb-3
|
||||||
= f.label(:name, class: 'form-label')
|
= f.label(:name, class: 'form-label')
|
||||||
= f.text_field(:name, class: 'form-control', required: true)
|
= f.text_field(:name, class: 'form-control', required: true)
|
||||||
.actions = render('shared/submit_button', f: f, object: @tag)
|
.actions = render('shared/submit_button', f:, object: @tag)
|
||||||
|
@ -12,7 +12,7 @@ h1 = Tag.model_name.human(count: 2)
|
|||||||
td = link_to_if(policy(tag).show?, tag.name, tag)
|
td = link_to_if(policy(tag).show?, tag.name, tag)
|
||||||
td = link_to(t('shared.show'), tag) if policy(tag).show?
|
td = link_to(t('shared.show'), tag) if policy(tag).show?
|
||||||
td = link_to(t('shared.edit'), edit_tag_path(tag)) if policy(tag).edit?
|
td = link_to(t('shared.edit'), edit_tag_path(tag)) if policy(tag).edit?
|
||||||
td = link_to(t('shared.destroy'), tag, data: {confirm: t('shared.confirm_destroy')}, method: :delete) if tag.can_be_destroyed? && policy(tag).destroy?
|
td = link_to(t('shared.destroy'), tag, data: {confirm: t('shared.confirm_destroy')}, method: :delete) if tag.can_be_destroyed? && policy(tag).destroy?
|
||||||
|
|
||||||
= render('shared/pagination', collection: @tags)
|
= render('shared/pagination', collection: @tags)
|
||||||
p = render('shared/new_button', model: Tag, path: new_tag_path)
|
p = render('shared/new_button', model: Tag, path: new_tag_path)
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
- tip = exercise_tip.tip
|
- tip = exercise_tip.tip
|
||||||
- index = exercise_tip_counter + 1
|
- index = exercise_tip_counter + 1
|
||||||
.card class="#{exercise_tip.parent_exercise_tip_id? || exercise_tip.rank != 1 ? 'mt-2' : ''}"
|
.card class=(exercise_tip.parent_exercise_tip_id? || exercise_tip.rank != 1 ? 'mt-2' : '')
|
||||||
.card-header.p-2 id="tip-heading-#{exercise_tip.id}" role="tab"
|
.card-header.p-2 id="tip-heading-#{exercise_tip.id}" role='tab'
|
||||||
.card-title.mb-0
|
.card-title.mb-0
|
||||||
a.collapsed aria-controls="tip-collapse-#{exercise_tip.id}" aria-expanded="false" data-bs-parent="#tips" data-bs-toggle="collapse" href="#tip-collapse-#{exercise_tip.id}"
|
a.collapsed aria-controls="tip-collapse-#{exercise_tip.id}" aria-expanded='false' data-bs-parent='#tips' data-bs-toggle='collapse' href="#tip-collapse-#{exercise_tip.id}"
|
||||||
.clearfix role="button"
|
.clearfix role='button'
|
||||||
i.fa-solid aria-hidden="true"
|
i.fa-solid aria-hidden='true'
|
||||||
span
|
span
|
||||||
= t('activerecord.models.tip.one')
|
= t('activerecord.models.tip.one')
|
||||||
=< tip_prefix + index.to_s
|
=< tip_prefix + index.to_s
|
||||||
= ": #{tip.title}" if tip.title?
|
= ": #{tip.title}" if tip.title?
|
||||||
.card.card-collapse.collapse id="tip-collapse-#{exercise_tip.id}" aria-labelledby="tip-heading-#{exercise_tip.id}" role="tabpanel" data-exercise-tip-id=exercise_tip.id
|
.card.card-collapse.collapse id="tip-collapse-#{exercise_tip.id}" aria-labelledby="tip-heading-#{exercise_tip.id}" role='tabpanel' data-exercise-tip-id=exercise_tip.id
|
||||||
.card-body.p-3
|
.card-body.p-3
|
||||||
- if tip.description?
|
- if tip.description?
|
||||||
h5
|
h5
|
||||||
@ -24,4 +24,4 @@
|
|||||||
= tip.example
|
= tip.example
|
||||||
= render(partial: 'tips/collapsed_card',
|
= render(partial: 'tips/collapsed_card',
|
||||||
collection: exercise_tip.children, as: :exercise_tip,
|
collection: exercise_tip.children, as: :exercise_tip,
|
||||||
locals: { tip_prefix: "#{tip_prefix + index.to_s}." })
|
locals: {tip_prefix: "#{tip_prefix + index.to_s}."})
|
||||||
|
@ -5,17 +5,17 @@
|
|||||||
= f.text_field(:title, class: 'form-control', required: false)
|
= f.text_field(:title, class: 'form-control', required: false)
|
||||||
.mb-3
|
.mb-3
|
||||||
= f.label(:description, class: 'form-label')
|
= f.label(:description, class: 'form-label')
|
||||||
= f.pagedown :description, input_html: { preview: true, rows: 5 }
|
= f.pagedown :description, input_html: {preview: true, rows: 5}
|
||||||
.mb-3
|
.mb-3
|
||||||
= f.label(:file_type_id, t('activerecord.attributes.file.file_type_id'), class: 'form-label')
|
= f.label(:file_type_id, t('activerecord.attributes.file.file_type_id'), class: 'form-label')
|
||||||
= f.collection_select(:file_type_id, @file_types, :id, :name, {include_blank: true}, class: 'form-control')
|
= f.collection_select(:file_type_id, @file_types, :id, :name, {include_blank: true}, class: 'form-control')
|
||||||
.mb-3
|
.mb-3
|
||||||
= f.label(:example, class: 'form-label')
|
= f.label(:example, class: 'form-label')
|
||||||
= f.text_area(:example, class: 'code-field form-control', rows: 5, style: "display:none;", required: false)
|
= f.text_area(:example, class: 'code-field form-control', rows: 5, style: 'display:none;', required: false)
|
||||||
#editor-edit.original-input data-file-id=@tip.id
|
#editor-edit.original-input data-file-id=@tip.id
|
||||||
#frames
|
#frames
|
||||||
.edit-frame
|
.edit-frame
|
||||||
.editor-content.d-none
|
.editor-content.d-none
|
||||||
.editor.allow_ace_tooltip
|
.editor.allow_ace_tooltip
|
||||||
.actions = render('shared/submit_button', f: f, object: @tip)
|
.actions = render('shared/submit_button', f:, object: @tip)
|
||||||
.editor
|
.editor
|
||||||
|
@ -4,5 +4,5 @@
|
|||||||
= tip.to_s
|
= tip.to_s
|
||||||
a.fa-regular.fa-eye.ms-2 href=tip_path(tip) target='_blank'
|
a.fa-regular.fa-eye.ms-2 href=tip_path(tip) target='_blank'
|
||||||
a.fa-solid.fa-xmark.ms-2.remove-tip href='#'
|
a.fa-solid.fa-xmark.ms-2.remove-tip href='#'
|
||||||
.list-group.nested-sortable-list class="#{exercise_tip.children.present? ? 'mt-3' : ''}"
|
.list-group.nested-sortable-list class=(exercise_tip.children.present? ? 'mt-3' : '')
|
||||||
= render(partial: 'tips/sortable_tip', collection: exercise_tip.children, as: :exercise_tip)
|
= render(partial: 'tips/sortable_tip', collection: exercise_tip.children, as: :exercise_tip)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
h1 = Tip.model_name.human(count: 2)
|
h1 = Tip.model_name.human(count: 2)
|
||||||
|
|
||||||
.table-responsive
|
.table-responsive
|
||||||
table.table class="#{@tips.present? ? 'sortable' : ''}"
|
table.table class=(@tips.present? ? 'sortable' : '')
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
th = t('activerecord.attributes.tip.title')
|
th = t('activerecord.attributes.tip.title')
|
||||||
@ -14,7 +14,7 @@ h1 = Tip.model_name.human(count: 2)
|
|||||||
td = tip.file_type ? link_to_if(policy(tip.file_type).show?, tip.file_type.name, tip.file_type) : ''
|
td = tip.file_type ? link_to_if(policy(tip.file_type).show?, tip.file_type.name, tip.file_type) : ''
|
||||||
td = link_to(t('shared.show'), tip) if policy(tip).show?
|
td = link_to(t('shared.show'), tip) if policy(tip).show?
|
||||||
td = link_to(t('shared.edit'), edit_tip_path(tip)) if policy(tip).edit?
|
td = link_to(t('shared.edit'), edit_tip_path(tip)) if policy(tip).edit?
|
||||||
td = link_to(t('shared.destroy'), tip, data: {confirm: t('shared.confirm_destroy')}, method: :delete) if tip.can_be_destroyed? && policy(tip).destroy?
|
td = link_to(t('shared.destroy'), tip, data: {confirm: t('shared.confirm_destroy')}, method: :delete) if tip.can_be_destroyed? && policy(tip).destroy?
|
||||||
|
|
||||||
= render('shared/pagination', collection: @tips)
|
= render('shared/pagination', collection: @tips)
|
||||||
p = render('shared/new_button', model: Tip, path: new_tip_path)
|
p = render('shared/new_button', model: Tip, path: new_tip_path)
|
||||||
|
@ -11,7 +11,5 @@ h1
|
|||||||
|
|
||||||
= row(label: 'tip.title', value: @tip.title)
|
= row(label: 'tip.title', value: @tip.title)
|
||||||
= row(label: 'tip.description', value: render_markdown(@tip.description), class: 'm-0')
|
= row(label: 'tip.description', value: render_markdown(@tip.description), class: 'm-0')
|
||||||
= row(label: 'file.file_type', value: @tip.file_type_id? ? \
|
= row(label: 'file.file_type', value: @tip.file_type_id? ? link_to_if(policy(@tip.file_type).show?, @tip.file_type.name, @tip.file_type) : '')
|
||||||
link_to_if(policy(@tip.file_type).show?, @tip.file_type.name, @tip.file_type) : '')
|
= row(label: 'tip.example', value: @tip.file_type_id? ? code_tag(@tip.example, @tip.file_type.programming_language) : '')
|
||||||
= row(label: 'tip.example', value: @tip.file_type_id? ? \
|
|
||||||
code_tag(@tip.example, @tip.file_type.programming_language) : '')
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
= form_for([@exercise, @uef]) do |f|
|
= form_for([@exercise, @uef]) do |f|
|
||||||
div
|
div
|
||||||
h1 id="exercise-headline"
|
h1#exercise-headline
|
||||||
= t('activerecord.models.user_exercise_feedback.one') + " " + @exercise.title
|
= "#{t('activerecord.models.user_exercise_feedback.one')} #{@exercise.title}"
|
||||||
= render('shared/form_errors', object: @uef)
|
= render('shared/form_errors', object: @uef)
|
||||||
p
|
p
|
||||||
== t('user_exercise_feedback.description')
|
== t('user_exercise_feedback.description')
|
||||||
@ -9,18 +9,18 @@
|
|||||||
u = t('activerecord.attributes.exercise.description')
|
u = t('activerecord.attributes.exercise.description')
|
||||||
= render_markdown(@exercise.description)
|
= render_markdown(@exercise.description)
|
||||||
.mb-3
|
.mb-3
|
||||||
= f.text_area(:feedback_text, class: 'form-control', required: true, :rows => "10")
|
= f.text_area(:feedback_text, class: 'form-control', required: true, rows: '10')
|
||||||
h4.mt-4 = t('user_exercise_feedback.difficulty')
|
h4.mt-4 = t('user_exercise_feedback.difficulty')
|
||||||
= f.collection_radio_buttons :difficulty, @texts, :first, :last do |b|
|
= f.collection_radio_buttons :difficulty, @texts, :first, :last do |b|
|
||||||
.form-check
|
.form-check
|
||||||
label.form-check-label
|
label.form-check-label
|
||||||
= b.radio_button(class: 'form-check-input')
|
= b.radio_button(class: 'form-check-input')
|
||||||
= b.text
|
= b.text
|
||||||
h4.mt-4 = t('user_exercise_feedback.working_time')
|
h4.mt-4 = t('user_exercise_feedback.working_time')
|
||||||
= f.collection_radio_buttons :user_estimated_worktime, @times, :first, :last do |b|
|
= f.collection_radio_buttons :user_estimated_worktime, @times, :first, :last do |b|
|
||||||
.form-check
|
.form-check
|
||||||
label.form-check-label
|
label.form-check-label
|
||||||
= b.radio_button(class: 'form-check-input')
|
= b.radio_button(class: 'form-check-input')
|
||||||
= b.text
|
= b.text
|
||||||
= f.hidden_field(:exercise_id, :value => @exercise.id)
|
= f.hidden_field(:exercise_id, value: @exercise.id)
|
||||||
.actions = render('shared/submit_button', f: f, object: @uef)
|
.actions = render('shared/submit_button', f:, object: @uef)
|
||||||
|
@ -9,18 +9,18 @@ table(border=1)
|
|||||||
td = t('exercises.statistics.average_worktime', locale: :de)
|
td = t('exercises.statistics.average_worktime', locale: :de)
|
||||||
td = t('shared.actions', locale: :de)
|
td = t('shared.actions', locale: :de)
|
||||||
tbody
|
tbody
|
||||||
- @anomalies.keys.each do | id |
|
- @anomalies.each_key do |id|
|
||||||
- exercise = Exercise.find(id)
|
- exercise = Exercise.find(id)
|
||||||
tr
|
tr
|
||||||
td = link_to_if(ExercisePolicy.new(@user, exercise).show?, exercise.title, exercise_url(exercise))
|
td = link_to_if(ExercisePolicy.new(@user, exercise).show?, exercise.title, exercise_url(exercise))
|
||||||
td = @anomalies[id]
|
td = @anomalies[id]
|
||||||
td = link_to_if(ExercisePolicy.new(@user, exercise).statistics?, t('shared.statistics', locale: :de), statistics_exercise_url(exercise))
|
td = link_to_if(ExercisePolicy.new(@user, exercise).statistics?, t('shared.statistics', locale: :de), statistics_exercise_url(exercise))
|
||||||
|
|
||||||
|
|
||||||
== t('mailers.user_mailer.exercise_anomaly_detected.body2',
|
== t('mailers.user_mailer.exercise_anomaly_detected.body2',
|
||||||
receiver_displayname: @receiver_displayname,
|
receiver_displayname: @receiver_displayname,
|
||||||
collection_name: @collection.name)
|
collection_name: @collection.name)
|
||||||
|
|
||||||
|
|
||||||
table(border=1)
|
table(border=1)
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
@ -28,7 +28,7 @@ table(border=1)
|
|||||||
td = t('exercises.statistics.average_worktime', locale: :en)
|
td = t('exercises.statistics.average_worktime', locale: :en)
|
||||||
td = t('shared.actions', locale: :en)
|
td = t('shared.actions', locale: :en)
|
||||||
tbody
|
tbody
|
||||||
- @anomalies.keys.each do | id |
|
- @anomalies.each_key do |id|
|
||||||
- exercise = Exercise.find(id)
|
- exercise = Exercise.find(id)
|
||||||
tr
|
tr
|
||||||
td = link_to_if(ExercisePolicy.new(@user, exercise).show?, exercise.title, exercise_url(exercise))
|
td = link_to_if(ExercisePolicy.new(@user, exercise).show?, exercise.title, exercise_url(exercise))
|
||||||
|
@ -4,4 +4,4 @@
|
|||||||
commenting_user_displayname: @commenting_user_displayname,
|
commenting_user_displayname: @commenting_user_displayname,
|
||||||
comment_text: @comment_text,
|
comment_text: @comment_text,
|
||||||
link_my_comments: link_to(t('request_for_comments.index.my_comment_requests'), my_request_for_comments_url),
|
link_my_comments: link_to(t('request_for_comments.index.my_comment_requests'), my_request_for_comments_url),
|
||||||
link_all_comments: link_to(t('request_for_comments.index.all'), request_for_comments_url) )
|
link_all_comments: link_to(t('request_for_comments.index.all'), request_for_comments_url))
|
||||||
|
@ -4,4 +4,4 @@
|
|||||||
author_displayname: @author_displayname,
|
author_displayname: @author_displayname,
|
||||||
comment_text: @comment_text,
|
comment_text: @comment_text,
|
||||||
link_my_comments: link_to(t('request_for_comments.index.my_comment_requests'), my_request_for_comments_url),
|
link_my_comments: link_to(t('request_for_comments.index.my_comment_requests'), my_request_for_comments_url),
|
||||||
link_all_comments: link_to(t('request_for_comments.index.all'), request_for_comments_url) )
|
link_all_comments: link_to(t('request_for_comments.index.all'), request_for_comments_url))
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
receiver_displayname: @receiver_displayname,
|
receiver_displayname: @receiver_displayname,
|
||||||
link_to_comment: link_to(@rfc_link, @rfc_link),
|
link_to_comment: link_to(@rfc_link, @rfc_link),
|
||||||
author: @author,
|
author: @author,
|
||||||
thank_you_note: @thank_you_note )
|
thank_you_note: @thank_you_note)
|
||||||
|
Reference in New Issue
Block a user