diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 9c6492448..7fcd7f260 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -300,6 +300,7 @@ class UsersController < ApplicationController @page = params[:page] ? params[:page].to_i + 1 : 0 user_course_ids = @user.courses.empty? ? "(-1)" :"(" + @user.courses.visible.map{|course| course.id}.join(",") + ")" @homework_commons = HomeworkCommon.where("course_id in #{user_course_ids}").order("created_at desc").limit(10).offset(@page * 10) + @is_teacher = User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true) respond_to do |format| format.js format.html {render :layout => 'new_base_user'} diff --git a/app/views/users/_user_homework_list.html.erb b/app/views/users/_user_homework_list.html.erb index 1a24b1499..642373d58 100644 --- a/app/views/users/_user_homework_list.html.erb +++ b/app/views/users/_user_homework_list.html.erb @@ -35,8 +35,8 @@ <%= render :partial => 'student_work/work_attachments', :locals => {:attachments => homework_common.attachments} %>
- <%# if is_teacher%> - <% if false%> + <% if is_teacher%> + <%# if false%>
-<% if User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)%> +<% if @is_teacher%>
<% homework = HomeworkCommon.new %> diff --git a/public/images/homepage_icon2.png b/public/images/homepage_icon2.png index 6cbde8f62..d39624a2e 100644 Binary files a/public/images/homepage_icon2.png and b/public/images/homepage_icon2.png differ diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index f2521f0d7..df6d4d632 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -499,8 +499,8 @@ a.coursesLineGrey:hover {color:#ffffff;} .homepageLeftMenuMore {height:18px;} .homepageLeftMenuMore:hover {background-color:#269ac9;} .homepageLeftMenuMoreIcon {background:url(../images/homepage_icon.png) -74px -240px no-repeat; display:block; height:18px;} -.homepageMenuSetting {display:inline-block; background:url(../images/homepage_icon.png) -190px -365px no-repeat; width:15px; height:15px; margin-top: 16px; margin-right: 15px;} -.homepageMenuSetting:hover {background:url(../images/homepage_icon.png) -190px -407px no-repeat;} +.homepageMenuSetting {display:inline-block; background:url(../images/homepage_icon2.png) -190px -365px no-repeat; width:15px; height:15px; margin-top: 16px; margin-right: 15px;} +.homepageMenuSetting:hover {background:url(../images/homepage_icon2.png) -190px -407px no-repeat;} a.homepageMenuText {color:#484848; font-size:16px; margin-left:20px;} .homepageLeftLabelContainer {width:238px; border:1px solid #dddddd; background-color:#ffffff; margin-top:10px;} .homepageLabelText {color:#484848; font-size:16px; margin-left:10px; margin-bottom:12px; display:block;}