diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb
index 710b73194..c662c44f7 100644
--- a/app/controllers/welcome_controller.rb
+++ b/app/controllers/welcome_controller.rb
@@ -39,17 +39,18 @@ class WelcomeController < ApplicationController
@courseCount = Project.course_entities.count
@teacherCount = User.teacher.count
@studentCount = User.student.count
- @logoLink = logolink(params[:school_id])
+ @logoLink = logolink()
end
- def logolink(id)
+ def logolink()
+ id = params[:school_id]
logo_link = ""
if id.nil? and User.current.user_extensions.school.nil?
logo_link = '/images/transparent.png'
else
- if id.to_i == 0
+ if id == "0"
logo_link = '/images/transparent.png'
else
if id.nil?
diff --git a/app/views/welcome/course.html.erb b/app/views/welcome/course.html.erb
index 8ad0cd6bf..b8b755b58 100644
--- a/app/views/welcome/course.html.erb
+++ b/app/views/welcome/course.html.erb
@@ -20,40 +20,37 @@
- <%= image_tag(@logoLink, size:'75x75') %>
-
-
-
-
-
- <% if params[:school_id].nil? and User.current.user_extensions.school.nil? %>
- <% else%>
- <% if params[:school_id] == "0" %>
- <% else %>
- <% if params[:school_id].nil? %>
+ <%= image_tag(@logoLink, size:'75x75') %>
- <%= School.find(User.current.user_extensions.school.id).name %>
-
+
+
+
+ <% if params[:school_id].nil? and User.current.user_extensions.school.nil? %>
+ <% else%>
+ <% if params[:school_id] == "0" %>
<% else %>
- <%= School.find(params[:school_id]).name %>
-
+ <% if params[:school_id].nil? %>
+ <%= School.find(User.current.user_extensions.school.id).name %>
+
+ <% else %>
+ <%= School.find(params[:school_id]).name %>
+
+ <% end %>
<% end %>
- <% end %>
- <% end %>
-
+ <% end %>
<%= l(:label_welcome_trustie) %><%= l(:label_welcome_trustie_course) %>
<% if params[:school_id].nil? and User.current.user_extensions.school.nil? %>
- , <%= l(:label_welcome_trustie_course_description) %>
+ , <%= l(:label_welcome_trustie_course_description) %>
<% else %>
<% if params[:school_id] == "0" %>
- , <%= l(:label_welcome_trustie_course_description) %>
+ , <%= l(:label_welcome_trustie_course_description) %>
<% end %>
<% end %>
-
-
- <%= render :partial => "search_project", :locals => {:project_type => Project::ProjectType_course}%>
-
-
+
+
+ <%= render :partial => "search_project", :locals => {:project_type => Project::ProjectType_course}%>
+
+