diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index 394c52f13..1b2794034 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -83,6 +83,12 @@ class PollController < ApplicationController def destroy if @poll && @poll.destroy + if @is_teacher + polls = Poll.where("polls_type = 'Course' and polls_group_id = #{@course.id}") + else + polls = Poll.where("polls_type = 'Course' and polls_group_id = #{@course.id} and polls_status = 2") + end + @polls = paginateHelper polls,20 #分页 respond_to do |format| format.js end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 1face5c38..8254c5313 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1963,6 +1963,15 @@ module ApplicationHelper end def get_technical_title user - #user.user_extensions.technical_title + if user.user_extensions.technical_title == "Professor" || user.user_extensions.technical_title == "教授" + technical_title = l(:label_technicl_title_professor) + elsif user.user_extensions.technical_title == "Associate professor" || user.user_extensions.technical_title == "副教授" + technical_title = l(:label_technicl_title_associate_professor) + elsif user.user_extensions.technical_title == "Lecturer" || user.user_extensions.technical_title == "讲师" + technical_title = l(:label_technicl_title_lecturer) + elsif user.user_extensions.technical_title == "Teaching assistant" || user.user_extensions.technical_title == "助教" + technical_title = l(:label_technicl_title_teaching_assistant) + end + technical_title end end diff --git a/app/views/layouts/base_homework.html.erb b/app/views/layouts/base_homework.html.erb index b583fcad6..f1840c2fd 100644 --- a/app/views/layouts/base_homework.html.erb +++ b/app/views/layouts/base_homework.html.erb @@ -31,6 +31,7 @@ text-align: center; padding-left: 5px !important; padding-right: 5px !important; + line-height: 1.9; } .span_wping a:hover{ background-color:#03a1b3;} diff --git a/app/views/layouts/base_users.html.erb b/app/views/layouts/base_users.html.erb index dbd6503b0..3b2bd8dfe 100644 --- a/app/views/layouts/base_users.html.erb +++ b/app/views/layouts/base_users.html.erb @@ -21,8 +21,6 @@ <%= call_hook :view_layouts_base_html_head %> <%= yield :header_tags -%> - <% title1 = @user.user_extensions.technical_title %> - <% language1 = @user.language %> -
+<%= f.text_field :title, :required => true, :size => 60, :style => "width:488px;", :onkeyup => "regexTitle();" %>
-(60个字符以内)
++ <%= f.text_field :title, :required => true, :size => 60, :style => "width:488px;", :onkeyup => "regexTitle();" %> +
++ (60个字符以内) +
-<%= f.text_area :description, :required => true, :cols => 60, :rows => 11, :class => 'wiki-edit', :style => "width:490px;", :onkeyup => "regexDescription();" %>
--
<%= render :partial => 'attachments/form', :locals => {:container => @news} %>
++ <%= f.text_area :description, :required => true, :cols => 60, :rows => 11, :class => 'wiki-edit', :style => "width:490px;", :onkeyup => "regexDescription();" %> +
++ +
++ + <%= render :partial => 'attachments/form', :locals => {:container => @news} %> +