mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
fixing data
This commit is contained in:
parent
ba027a31a7
commit
28e8f157bb
3 changed files with 7 additions and 6 deletions
|
|
@ -24,15 +24,14 @@
|
|||
|
||||
.clearfix
|
||||
|
||||
-#
|
||||
.show-hide
|
||||
%p
|
||||
%span{class: 'toggle', data: {toggle: 'histogram-answers'}}= "<span class='toggle'>Show</span> Histogram".html_safe
|
||||
|
|
||||
%span{class: 'toggle', data: {toggle: 'raw'}}= "<span class='toggle'>Show</span> Raw Data".html_safe
|
||||
|
||||
- if question.is_a?(Question) || question.is_a?(GroupedQuestion)
|
||||
.histogram-answers.hidden
|
||||
= render question
|
||||
.histogram-answers.hidden
|
||||
= render 'shared/histogram', data: aggregated_responses
|
||||
|
||||
%p.raw.hidden= likerts.join(', ')
|
||||
%p.raw.hidden
|
||||
= aggregated_responses.responses.map(&:answer_index).join(', ')
|
||||
|
|
|
|||
2
app/views/shared/_histogram.html.haml
Normal file
2
app/views/shared/_histogram.html.haml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
%p
|
||||
=# data.inspect
|
||||
|
|
@ -196,7 +196,7 @@ namespace :data do
|
|||
end
|
||||
|
||||
responded_at = Date.strptime(row['EndDate'], '%m/%d/%Y %H:%M:%S')
|
||||
recipient.attempts.create(question: question, answer_index: answer_index, responded_at: responded_at)
|
||||
recipient.attempts.create(question: question, answer_index: answer_index + 1, responded_at: responded_at)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue