diff --git a/app/models/category.rb b/app/models/category.rb index e2e7d297..96ba01ac 100644 --- a/app/models/category.rb +++ b/app/models/category.rb @@ -25,11 +25,11 @@ class Category < ApplicationRecord def root_index [ - "teachers-and-the-teaching-environment", + "academic-learning", "school-culture", "resources", "indicators-of-academic-learning", - "character-and-wellbeing-outcomes", + "citizenship-and-wellbeing", "pilot-family-questions" ].index(root_identifier) end diff --git a/app/views/layouts/_header.html.haml b/app/views/layouts/_header.html.haml index 6645a373..7c5bd4b5 100644 --- a/app/views/layouts/_header.html.haml +++ b/app/views/layouts/_header.html.haml @@ -2,9 +2,10 @@ .title.col-8 %h2= link_to('MCIEA'.html_safe, root_path) - .navigation.col-4.text-right - - if current_user - = link_to 'Sign Out', destroy_user_session_path, rel: "nofollow", method: :delete, class: 'btn btn-small grey waves-effect waves-light ' - - else - = link_to 'Login', new_user_session_path, class: 'btn btn-small grey waves-effect waves-light ' - =# link_to 'Register', new_user_registration_path, class: 'btn btn-small grey waves-effect waves-light ' + -# + .navigation.col-4.text-right + - if current_user + = link_to 'Sign Out', destroy_user_session_path, rel: "nofollow", method: :delete, class: 'btn btn-small grey waves-effect waves-light ' + - else + = link_to 'Login', new_user_session_path, class: 'btn btn-small grey waves-effect waves-light ' + =# link_to 'Register', new_user_registration_path, class: 'btn btn-small grey waves-effect waves-light ' diff --git a/app/views/school_categories/_indicator.html.haml b/app/views/school_categories/_indicator.html.haml index c4d7e72d..cbeb6cef 100644 --- a/app/views/school_categories/_indicator.html.haml +++ b/app/views/school_categories/_indicator.html.haml @@ -1,5 +1,5 @@ - num_likerts = 5 -- likert = info.answer_index_average || 0 +- likert = info.answer_index_average - average_offset = (likert/num_likerts) * 100 - approval_zone = [[76, 90], [77, 91], [71, 85], [73, 86], [73, 86], []][info.category.root_index]