diff --git a/app/controllers/git_usage_controller.rb b/app/controllers/git_usage_controller.rb index 0b97fd523..56aaa56f1 100644 --- a/app/controllers/git_usage_controller.rb +++ b/app/controllers/git_usage_controller.rb @@ -1,6 +1,6 @@ #added by baiyu class GitUsageController < ApplicationController - layout "base_projects" + layout "new_base" def ch_usage end diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb index d5e62127d..5cd55e23b 100644 --- a/app/controllers/homework_common_controller.rb +++ b/app/controllers/homework_common_controller.rb @@ -206,7 +206,7 @@ class HomeworkCommonController < ApplicationController #当前用户是不是课程的成员 def member_of_course - render_403 unless User.current.member_of_course?(@course) || User.current.admin? + render_403 unless @course.is_public || User.current.member_of_course?(@course) || User.current.admin? end def get_assigned_homeworks(student_works, n, index) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 2693eea82..e695a6fb0 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -284,7 +284,7 @@ class StudentWorkController < ApplicationController #是不是当前课程的成员 #当前课程成员才可以看到作品列表 def member_of_course - render_403 unless User.current.member_of_course? @course || User.current.admin? + render_403 unless User.current.member_of_course?(@course) || User.current.admin? end #判断是不是当前作品的提交者 diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index 13012a70c..a0bd18582 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -35,7 +35,7 @@ module CoursesHelper #生成课程老师成员链接 def course_teacher_link teacher_num - if User.current.member_of_course?(@course) + if User.current.member_of_course?(@course) || User.current.admin? link_to "#{teacher_num}", course_member_path(@course, :role => 1), :class => 'info_foot_num c_blue' else content_tag 'span',teacher_num, :class => 'info_foot_num c_blue' @@ -44,7 +44,7 @@ module CoursesHelper #生成课程学生列表连接 def course_student_link student_num - if (User.current.logged? && @course.open_student == 1) || (User.current.member_of_course?(@course)) + if (User.current.logged? && @course.open_student == 1) || (User.current.member_of_course?(@course)) || User.current.admin? link_to "#{student_num}", course_member_path(@course, :role => 2), :class => 'info_foot_num c_blue' else content_tag 'span',student_num, :class => 'info_foot_num c_blue' diff --git a/app/views/courses/_history.html.erb b/app/views/courses/_history.html.erb index e5f5fc0ec..df2737337 100644 --- a/app/views/courses/_history.html.erb +++ b/app/views/courses/_history.html.erb @@ -18,6 +18,7 @@

<%= journal.notes.html_safe %>

+
<% ids = 'project_respond_form_'+ journal.id.to_s%> diff --git a/app/views/courses/join_private_courses.js.erb b/app/views/courses/join_private_courses.js.erb index 23dc551f7..fecfb13cd 100644 --- a/app/views/courses/join_private_courses.js.erb +++ b/app/views/courses/join_private_courses.js.erb @@ -1,5 +1,5 @@ $('#ajax-modal').html('<%= escape_javascript(render :partial => 'join_private_course') %>'); -showModal('ajax-modal', '510px'); +showModal('ajax-modal', '540px'); $('#ajax-modal').css('height','330px'); $('#ajax-modal').siblings().remove(); $('#ajax-modal').before("" + diff --git a/app/views/homework_common/_alert_anonyoms.html.erb b/app/views/homework_common/_alert_anonyoms.html.erb index 3b199e0d8..73f240b02 100644 --- a/app/views/homework_common/_alert_anonyoms.html.erb +++ b/app/views/homework_common/_alert_anonyoms.html.erb @@ -5,7 +5,11 @@

开启匿评后学生将不能对作品进行 修改、删除 - 等操作,目前有 + 等操作,开启匿评后的提交作品,将 + 不能参与匿评, + 匿评评分将被记为 + 0分 + 。目前有 <%= @totle_size%>个 学生,共提交了 <%= @cur_size %> diff --git a/app/views/mailer/send_for_user_activities.html.erb b/app/views/mailer/send_for_user_activities.html.erb index 6ff436fc8..22eb23bf7 100644 --- a/app/views/mailer/send_for_user_activities.html.erb +++ b/app/views/mailer/send_for_user_activities.html.erb @@ -25,7 +25,7 @@ :style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> <%= l(:label_project_notice) %> - <%= link_to truncate(course_new.title,length: 30,omission: '...'), news_url(course_new,:token => @token.value), + <%= link_to truncate(course_new.title.html_safe,length: 30,omission: '...'), news_url(course_new,:token => @token.value), :class => 'wmail_info', :style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> @@ -47,9 +47,9 @@ <%= link_to course_news_comment.author, user_activities_url(course_news_comment.author,:token => @token.value), :class => "wmail_name", :style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%> - <%= l(:label_project_notice) %> + <%= l(:label_project_notice_reply) %> - <%= link_to truncate(course_news_comment.comments.html_safe,length: 30,omission: '...'), news_url(course_news_comment.commented,:token => @token.value), + <%= link_to truncate(l(:label_course_notice_point),length: 30,omission: '...'), news_url(course_news_comment.commented,:token => @token.value), :class => 'wmail_info', :style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %> @@ -156,7 +156,7 @@ <% unless @attachments.first.nil? %>