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 %>
+开启匿评后学生将不能对作品进行 修改、删除 - 等操作,目前有 + 等操作,开启匿评后的提交作品,将 + 不能参与匿评, + 匿评评分将被记为 + 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? %>
+ 当前作业 + 已开启匿评 + 您提交作品后将 + 不会收到任何匿评作品, + 您的作品也 + 不会被其他用户匿评. + 如需获得最终成绩,请您联系主讲老师对您的作品单独进行评分 +
+ 确定 +据说雷锋做完好事是从来不留名的呢,我们这次评分也不留名!!!但是,但是,您给的分数一定要公正哦,老天爷看不到,我们的系统可是清楚得很!
+别怪我没告诉你,系统分配给你的作品不评价可是要扣分的哈!
+ 匿名评分 + 冒着扣分的危险残忍拒绝 +