diff --git a/app/controllers/homework_attach_controller.rb b/app/controllers/homework_attach_controller.rb index ff6463036..dacf897da 100644 --- a/app/controllers/homework_attach_controller.rb +++ b/app/controllers/homework_attach_controller.rb @@ -393,17 +393,15 @@ class HomeworkAttachController < ApplicationController unless annymous_users.nil? || annymous_users.count == 0 @anonymous_comments = @homework.journals_for_messages.where("is_comprehensive_evaluation = 2 and user_id in #{convert_array(annymous_users)}").order("created_on DESC") end - @totle_score = score_for_homework @homework - @teaher_score = teacher_score_for_homework @homework + #@totle_score = score_for_homework @homework + #@teaher_score = teacher_score_for_homework @homework is_student = is_cur_course_student @homework.bid.courses.first is_teacher = is_course_teacher User.current,@homework.bid.courses.first @is_anonymous_comments = @homework.bid.comment_status == 1 #是否开启了匿评 if !User.current.member_of_course?(@homework.bid.courses.first) @is_comprehensive_evaluation = 3 #留言 - elsif is_student && @is_anonymous_comments && !@has_evaluation#是学生且开启了匿评且未进行评分 - @is_comprehensive_evaluation = 2 #匿评 - elsif is_student && @is_anonymous_comments && @has_evaluation #是学生且开启了匿评,但已评分 + elsif is_student && @is_anonymous_comments#是学生且开启了匿评 @is_comprehensive_evaluation = 2 #匿评 elsif is_student && !@is_anonymous_comments #是学生未开启匿评 @is_comprehensive_evaluation = 3 #留言 diff --git a/app/views/homework_attach/_show.html.erb b/app/views/homework_attach/_show.html.erb index bf797e441..416ca4f66 100644 --- a/app/views/homework_attach/_show.html.erb +++ b/app/views/homework_attach/_show.html.erb @@ -36,17 +36,18 @@ this.relatedElement.className = ''; this.relatedElement.firstChild.nodeValue = currentLength; } - function test(){alert('test');} - //中的onmouseover 改成 onclick; - //]]> + function g(o){return document.getElementById(o);} + function HoverLi(n){ + for(var i=3;i<=5;i++){g('ping_tb_'+i).className='ping_normaltab';g('tbc_0'+i).className='ping_undis';}g('tbc_0'+n).className='ping_dis';g('ping_tb_'+n).className='ping_hovertab'; + } + + function ChoseStars(num) + { + for (var i = num + 1; i <= 5; i++) {$("#star0" + i).css("background-position","-2px 0");} + for (var i = num; i >= 0; i--) {$("#star0" + i).css("background-position","-24px 0px");} + $("#stars_value").val(num); + } -<%= javascript_include_tag 'seems_rateable/jRating', 'seems_rateable/rateable'%>