parent
8c389742ee
commit
74ff33d74e
@ -1,3 +1,4 @@
|
|||||||
@import "bootstrap";
|
@import "bootstrap";
|
||||||
@import "scaffolds";
|
@import "scaffolds";
|
||||||
@import "recipients";
|
@import "recipients";
|
||||||
|
@import "school_categories";
|
||||||
|
|||||||
@ -0,0 +1,104 @@
|
|||||||
|
.school_category {
|
||||||
|
border: 1px solid black;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
height: 3.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.description {
|
||||||
|
height: 6em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.indicator {
|
||||||
|
padding-top: 6px;
|
||||||
|
height: 90px;
|
||||||
|
|
||||||
|
.indicator-circle {
|
||||||
|
height: 100%;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.indicator-zones {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
div {
|
||||||
|
height: 100%;
|
||||||
|
width: 20%;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.zone0 {
|
||||||
|
background-color: orange;
|
||||||
|
}
|
||||||
|
.zone1 {
|
||||||
|
background-color: yellow;
|
||||||
|
}
|
||||||
|
.zone2 {
|
||||||
|
background-color: lightgreen;
|
||||||
|
}
|
||||||
|
.zone3 {
|
||||||
|
background-color: green;
|
||||||
|
}
|
||||||
|
.zone4 {
|
||||||
|
background: repeating-linear-gradient(45deg, lightgray, green 15px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.average {
|
||||||
|
position: absolute;
|
||||||
|
width: 10%;
|
||||||
|
height: 125%;
|
||||||
|
top: -3px;
|
||||||
|
border: 2px dashed black;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 12px;
|
||||||
|
|
||||||
|
span {
|
||||||
|
text-align: center;
|
||||||
|
position: absolute;
|
||||||
|
width: 7.75em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.indicator {
|
||||||
|
height: 30px;
|
||||||
|
|
||||||
|
.indicator-circle {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
.average {
|
||||||
|
span {
|
||||||
|
top: -13px;
|
||||||
|
left: -2.5em;
|
||||||
|
font-size: 10px;
|
||||||
|
border: none;
|
||||||
|
line-height: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.small {
|
||||||
|
height: 90px;
|
||||||
|
|
||||||
|
.indicator-circle {
|
||||||
|
width: 90px;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.indicator-zones {
|
||||||
|
width: 900px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.average {
|
||||||
|
border: none;
|
||||||
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
|
line-height: 90px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,34 @@
|
|||||||
|
- num_likerts = 5
|
||||||
|
- likert = school_category.answer_index_average
|
||||||
|
- average_offset = (likert/num_likerts) * 100
|
||||||
|
- zones = ['Warning Zone: Schools that fall in this range are five or more years away from reaching community-wide targets. Consequently, this zone, as established by teachers, principals, parents, and district administrators, indicates that a school is in significant need of improvement. If the school is not in the Warning Zone in other areas, it may be a relatively successful school overall. Still, it must immediately develop a plan for addressing its shortcomings.', 'Watch Zone: Schools falling in this range are three or four years away from reaching community-wide targets. This zone, established by teachers, principals, parents, and district administrators, is not an ideal place for schools to be. But it does not mean that the school is failing. Instead, it means that the school needs to place particular emphasis on improving its work in this area.', 'Growth Zone: Schools falling in this range earned scores just below "acceptable." Yet these schools are close enough to the Approval Zone that they might reasonably reach it within two years. As established by teachers, principals, parents, and district administrators, this zone is an acceptable place for schools to be if they have the leadership, focus, and resources to improve their work in a particular area.', 'Approval Zone: Schools falling in this range earned scores between "acceptable" and "ideal." This zone, established by teachers, principals, parents, and district administrators, is the target that all schools should be striving to hit. Scoring in this range does not mean that a school is perfect; but it does mean that it is meeting or exceeding community-wide expectations in a particular category.', 'This area represents a set of outcomes so close to perfect that they are unlikely to be realized in any school.']
|
||||||
|
- approval_zone = [[76, 90], [77, 91], [71, 85], [73, 86], [73, 86]][school_category.category.root_index]
|
||||||
|
|
||||||
|
- zone_widths = [0]
|
||||||
|
- zone_widths << approval_zone[0] - (15 + 15)
|
||||||
|
- zone_widths << 15
|
||||||
|
- zone_widths << 15
|
||||||
|
- zone_widths << approval_zone[1] - approval_zone[0]
|
||||||
|
- zone_widths << 100 - approval_zone[1]
|
||||||
|
|
||||||
|
- buffer = 0.25
|
||||||
|
- this_school_zone = "This school scored in the range between #{(likert - buffer).round(2)} and #{(likert + buffer).round(2)}.\n\nMouse over each color to read a description of each zone."
|
||||||
|
|
||||||
|
.indicator{class: (local_assigns[:small] ? 'small' : '')}
|
||||||
|
.indicator-circle
|
||||||
|
.indicator-zones{style: "margin-left: #{local_assigns[:small] ? ((average_offset - 5) * -10) : 0}%"}
|
||||||
|
- zone_total = 0
|
||||||
|
- zones.each_with_index do |zone, index|
|
||||||
|
%div{class: "zone#{index}", style: "width: #{zone_widths[index+1]}%", title: "#{zone}\n\nThis zone: #{(zone_total/20.0).round(2)} - #{((zone_total + zone_widths[index+1])/20.0).round(2)}\nThis school: #{(likert - buffer).round(2)} - #{(likert + buffer).round(2)}"}
|
||||||
|
- zone_total += zone_widths[index + 1]
|
||||||
|
- if local_assigns[:small]
|
||||||
|
-#
|
||||||
|
.average{title: this_school_zone}
|
||||||
|
This School
|
||||||
|
- else
|
||||||
|
.average{style: "left: #{average_offset - 5}%", title: this_school_zone}
|
||||||
|
%span This School
|
||||||
|
|
||||||
|
- if local_assigns[:caption]
|
||||||
|
.explanation
|
||||||
|
* Mouse-over each colored area for detailed description.
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
.col-4.py-3
|
||||||
|
.school_category.p-2
|
||||||
|
%h4.title.text-center.pt-3
|
||||||
|
= link_to(school_category.category.name, [school_category.school, school_category.category])
|
||||||
|
|
||||||
|
.indicator-container
|
||||||
|
= render 'school_categories/indicator', school_category: school_category
|
||||||
|
|
||||||
|
.description.px-2.pt-3.pb-2
|
||||||
|
- if false #(measurements = school_category.questions.measurements.for_school(school_measure.school)).present?
|
||||||
|
= render 'measurements/nonlikert', measurement: measurements.first, description: school_measure.measure.description
|
||||||
|
- else
|
||||||
|
= school_category.category.blurb || truncate(school_category.category.description, length: 108)
|
||||||
Loading…
Reference in new issue