Merge branch 'develop' of https://bdgit.trustie.net/hushasha/bigdata into develop
This commit is contained in:
commit
2dd285f6e7
|
|
@ -50,17 +50,18 @@ class CoursesController < ApplicationController
|
|||
@syllabuses_num = Course.all.count
|
||||
#@syllabus_count = all_syllabuses.count
|
||||
# 我创建的课堂
|
||||
create_syllabuses = Course.where(:tea_id => @user.id)
|
||||
#create_syllabuses = Course.where(:tea_id => @user.id)
|
||||
# 我参与的课堂
|
||||
join_syllabuses = @user.courses.where("is_delete = 0 and tea_id != #{@user.id}")
|
||||
@join_syllabuses_count = join_syllabuses.where(:is_end => 0, :is_delete => 0).count
|
||||
@create_syllabuses_count = create_syllabuses.where(:is_end => 0, :is_delete => 0).count
|
||||
#join_syllabuses = @user.courses.where("is_delete = 0 and tea_id != #{@user.id}")
|
||||
# @join_syllabuses_count = @user.courses.not_deleted_not_end.order("updated_at desc").select{ |course| !@user.has_teacher_role(course)}.count
|
||||
# @create_syllabuses_count = @user.courses.not_deleted_not_end.order("updated_at desc").select{ |course| @user.has_teacher_role(course)}.count
|
||||
@my_courses_count = @user.courses.not_deleted_not_end.count
|
||||
|
||||
# 页面筛选的课程
|
||||
if @select == "create"
|
||||
@syllabuses = create_syllabuses.where("is_end = 0 and is_delete = 0 and name like '%#{@search}%'")
|
||||
@syllabuses = @user.courses.not_deleted_not_end.where("name like '%#{@search}%'").order("updated_at desc").select{ |course| @user.has_teacher_role(course)}
|
||||
elsif @select == "join"
|
||||
@syllabuses = join_syllabuses.where("is_end = 0 and is_delete = 0 and tea_id != #{@user.id} and name like '%#{@search}%'")
|
||||
@syllabuses = @user.courses.not_deleted_not_end.where("name like '%#{@search}%'").order("updated_at desc").select{ |course| !@user.has_teacher_role(course)}
|
||||
elsif @select == "end"
|
||||
# 归档的课堂
|
||||
end_syllabuses = Course.where("is_end = 1 and name like '%#{@search}%'")
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class ExerciseController < ApplicationController
|
|||
exercises = exercises.where("exercise_name like '%#{@search}%'")
|
||||
end
|
||||
@exercises = paginateHelper exercises,15 #分页
|
||||
@left_nav_type = 8
|
||||
@left_nav_type = 4
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.html
|
||||
|
|
@ -172,7 +172,7 @@ class ExerciseController < ApplicationController
|
|||
@exercise = Exercise.find(params[:id])
|
||||
exercise_questions = @exercise.exercise_questions
|
||||
@exercise_questions = paginateHelper exercise_questions, 5
|
||||
@left_nav_type = 8
|
||||
@left_nav_type = 4
|
||||
respond_to do |format|
|
||||
format.html{render :layout => 'base_courses'}
|
||||
end
|
||||
|
|
|
|||
|
|
@ -406,10 +406,15 @@ class MessagesController < ApplicationController
|
|||
def sticky_topic
|
||||
(render_403; return false) unless (User.current.admin? || User.current.allowed_to?(:as_teacher, @course))
|
||||
@topic.update_attributes(:sticky => @topic.sticky == 1 ? 0 : 1)
|
||||
if params[:is_board]
|
||||
redirect_to course_boards_path(@course)
|
||||
else
|
||||
redirect_to board_message_path(@topic.board_id, @topic)
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.html{
|
||||
if params[:is_board]
|
||||
redirect_to course_boards_path(@course)
|
||||
else
|
||||
redirect_to board_message_path(@topic.board_id, @topic)
|
||||
end
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -690,7 +690,7 @@ class StudentWorkController < ApplicationController
|
|||
@score = student_work_score @work,User.current
|
||||
@is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin?
|
||||
if (@homework.homework_detail_manual.comment_status == 3 || @homework.homework_detail_manual.comment_status == 4) && !@is_teacher && @work.user != User.current
|
||||
@student_work_scores = @work.student_works_scores.where("user_id = #{User.current.id} and reviewer_role = 3").order("updated_at desc")
|
||||
@student_work_scores = StudentWorksScore.where(:id => @work.student_works_scores.where("user_id = #{User.current.id} and reviewer_role = 3").select("max(id)"))
|
||||
else
|
||||
@student_work_scores = student_work_score_record(@work)
|
||||
end
|
||||
|
|
@ -995,7 +995,9 @@ class StudentWorkController < ApplicationController
|
|||
@work = @homework.student_works.select("student_works.*,student_works.work_score as score").where(:id => @work.id).first
|
||||
@score = @new_score
|
||||
if @homework.homework_detail_manual.comment_status == 3 && !@is_teacher && @work.user != User.current
|
||||
@student_work_scores = @work.student_works_scores.where("user_id = #{User.current.id} and reviewer_role = 3").order("updated_at desc")
|
||||
@st_cover = @work.student_works_scores.where("user_id = #{User.current.id} and reviewer_role = 3").count > 1 ? 1 : 0
|
||||
@student_work_scores = StudentWorksScore.where(:id => @work.student_works_scores.where("user_id = #{User.current.id} and reviewer_role = 3").select("max(id)"))
|
||||
#@student_work_scores = @work.student_works_scores.where("user_id = #{User.current.id} and reviewer_role = 3").order("updated_at desc")
|
||||
else
|
||||
@student_work_scores = student_work_score_record(@work)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -12,6 +12,15 @@ module CoursesHelper
|
|||
#AllPeople = StudentRoles+TeacherRoles
|
||||
## return people count
|
||||
|
||||
def student_course_homework_score course, user
|
||||
homework_ids = course.homework_commons.where("homework_type in (1, 4) and publish_time < '#{Time.now}'").map(&:id)
|
||||
score = 0
|
||||
user.student_works.where(:homework_common_id => homework_ids).each do |work|
|
||||
score = score + work.work_score if work.work_score
|
||||
end
|
||||
format("%.1f",score)
|
||||
end
|
||||
|
||||
# 学生的发布资源数
|
||||
def student_course_resource_num course, user
|
||||
num = course.attachments.where(:author_id => user.id).count
|
||||
|
|
|
|||
|
|
@ -140,13 +140,13 @@ module StudentWorkHelper
|
|||
end
|
||||
end
|
||||
|
||||
#获取学生作品的评分记录:同一个教师或教辅只显示未隐藏的评分
|
||||
#获取学生作品的评分记录:同一个教师或教辅只显示未隐藏的评分、匿评多次评分只取最新一条
|
||||
def student_work_score_record work
|
||||
# sql = "SELECT MAX(id) id FROM student_works_scores WHERE (reviewer_role = 2 OR reviewer_role = 1) AND score IS NOT NULL AND is_hidden = 0 AND student_work_id = #{work.id} GROUP BY user_id"
|
||||
# tea_ts_ids = StudentWorksScore.find_by_sql sql
|
||||
# tea_ts_ids = tea_ts_ids.empty? ? "(-1)" : "(" + tea_ts_ids.map{|tea| tea.id}.join(",") + ")"
|
||||
# scores = work.student_works_scores.where("score IS NULL or reviewer_role = 3 or id in #{tea_ts_ids}").order("updated_at desc")
|
||||
scores = work.student_works_scores.where(:is_hidden => false).order("created_at desc")
|
||||
sql = "SELECT MAX(id) id FROM student_works_scores WHERE reviewer_role = 3 AND score IS NOT NULL AND is_hidden = 0 AND student_work_id = #{work.id} GROUP BY user_id"
|
||||
st_ts_ids = StudentWorksScore.find_by_sql sql
|
||||
st_ts_ids = st_ts_ids.empty? ? "(-1)" : "(" + st_ts_ids.map{|tea| tea.id}.join(",") + ")"
|
||||
scores = work.student_works_scores.where("is_hidden = 0 and(reviewer_role = 1 or reviewer_role = 2 or id in #{st_ts_ids})").order("updated_at desc")
|
||||
#scores = work.student_works_scores.where(:is_hidden => false).order("created_at desc")
|
||||
return scores
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
<%= link_to '实训作业'.html_safe, shixuns_homework_common_index_path(:course => @course.id),:class => "color-grey", :remote => true %>
|
||||
</li>
|
||||
<li style="text-align:center;">
|
||||
<a class="color-grey" href="javascript:void(0)">试 卷</a>
|
||||
<%= link_to '试 卷'.html_safe, new_exercise_path(:course_id => @course.id),:class => "color-grey" %>
|
||||
</li>
|
||||
<li style="text-align:center;">
|
||||
<a class="color-grey" onclick="course_files_upload();" style="cursor: pointer">资 源</a>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
</div>
|
||||
<ul class="task-index-head-info clearfix">
|
||||
<li><span class="color-orange font-bd" id="all_syllabuses"><%= @syllabuses_num %></span><br/><span >全部</span></li>
|
||||
<li><span class="color-orange font-bd" id="my_syllabuses"><%= @create_syllabuses_count + @join_syllabuses_count %></span><br/><span>我的课堂</span></li>
|
||||
<li><span class="color-orange font-bd" id="my_syllabuses"><%= @my_courses_count %></span><br/><span>我的课堂</span></li>
|
||||
<%= link_to "+ 新建".html_safe, new_course_path, :class => "fr font-16 white-btn orange-btn mt10" %>
|
||||
<%= link_to "+ 加入课堂".html_safe, join_private_courses_courses_path, :remote => true, :method => "post", :class => "fr mr30 font-16 white-btn orange-btn mt10" %>
|
||||
<!-- <li><span class="color-orange font-bd"><%#= @create_syllabuses_count %></span><br/><span>你已创建</span></li>-->
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
<td><%= link_to user.show_real_name, user_path(user), :class => 'edu-txt-w140 task-hide mt5 alink-name', :target => '_blank' %></td>
|
||||
<td><span class="edu-txt-w140 task-hide mt5"><%= user.user_extensions ? user.user_extensions.student_id : '' %></span></td>
|
||||
<td><%= member.course_group_id == 0 ? '未分班' : member.course_group.name %></td>
|
||||
<td><%#= student_course_resource_num @course, user %></td><!--作业成绩-->
|
||||
<td><%= student_course_homework_score @course, user %></td><!--作业成绩-->
|
||||
<td><%= student_course_resource_num @course, user %></td>
|
||||
<td><%= student_course_message_num @course, user %></td>
|
||||
<td><%= student_course_reply_num @course, user %></td>
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
<span class="fr mr15 mt3 color-grey"><%= format_time @exercise_user.start_at %> 开始答题</span>
|
||||
</div>
|
||||
|
||||
<% unless @exercise.try(:exercise_description).nil? %>
|
||||
<% if !@exercise.try(:exercise_description).nil? && @exercise.try(:exercise_description) != "" %>
|
||||
<div class="edu-con-top font-14 color-grey clearfix user_bg_shadow bor-grey-e mb20">
|
||||
<pre class="exercise_que_title pl15 pr15"><%= @exercise.try(:exercise_description).html_safe%></pre>
|
||||
</div>
|
||||
|
|
@ -76,6 +76,8 @@
|
|||
</div>
|
||||
<% if @exercise.question_random == 1 %>
|
||||
<% question_list = @exercise.exercise_questions.shuffle %>
|
||||
<% else %>
|
||||
<% question_list = @exercise.exercise_questions %>
|
||||
<% end %>
|
||||
|
||||
<div class="clearfix ml15 mt10 mb15">
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
<%= link_to "返回", student_exercise_list_exercise_path(@exercise), :class => "fr font-12 mr15 mt3 color-grey" %>
|
||||
</div>
|
||||
|
||||
<% unless @exercise.try(:exercise_description).nil? %>
|
||||
<% if !@exercise.try(:exercise_description).nil? && @exercise.try(:exercise_description) != "" %>
|
||||
<div class="edu-con-top font-14 color-grey clearfix user_bg_shadow bor-grey-e mb20">
|
||||
<pre class="exercise_que_title pl15 pr15"><%= @exercise.try(:exercise_description).html_safe%></pre>
|
||||
</div>
|
||||
|
|
@ -179,6 +179,7 @@
|
|||
var spn_class = dataObj.score == 0 ? 'color-red' : 'color-light-green'
|
||||
$("#multi_q_score_"+id).html("<span class='" + spn_class + " mr3'>"+dataObj.score+ "</span>分");
|
||||
$("#exercise_user_score").html(dataObj.total_score);
|
||||
$("#ex_comment_status_"+id).removeClass("post_btn_grey").addClass("post_btn_white");
|
||||
$("#ajax_notice_p").html("分数已保存");
|
||||
$("#ajax-notice").css('top', $(window).scrollTop()+400);
|
||||
$("#ajax-notice").show();
|
||||
|
|
|
|||
|
|
@ -36,10 +36,12 @@
|
|||
<%= link_to had_uncommit_studentwork_count(homework_common), student_work_index_path(:homework => homework_common.id, :tab => 2, :status => ['0']), :class => 'color-orange03 mr5', :target => '_blank' %>
|
||||
未交
|
||||
</span>
|
||||
<span class="ml50">
|
||||
<%= link_to had_unevaluate_count(homework_common), student_work_index_path(:homework => homework_common.id, :tab => 2, :comment => ['0']), :class => 'color-orange03 mr5', :target => '_blank' %>
|
||||
未评
|
||||
</span>
|
||||
<% if homework_common.homework_type != 4 %>
|
||||
<span class="ml50">
|
||||
<%= link_to had_unevaluate_count(homework_common), student_work_index_path(:homework => homework_common.id, :tab => 2, :comment => ['0']), :class => 'color-orange03 mr5', :target => '_blank' %>
|
||||
未评
|
||||
</span>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<span class="ml50">
|
||||
<%= link_to had_commit_studentwork_count(homework_common), student_work_index_path(:homework => homework_common.id, :tab => 2), :class => 'color-orange03 mr5', :target => '_blank' %>
|
||||
|
|
|
|||
|
|
@ -101,7 +101,9 @@
|
|||
<li><a href="<%=set_invite_code_halt_course_path(@course) %>" data-remote="true">恢复邀请码</a></li>
|
||||
<% end %>
|
||||
<li><%= link_to "设置", {:controller => 'courses', :action => 'settings', :id => @course} %></li>
|
||||
<li><a href="javascript:void(0);" onclick="delete_confirm_box_3('<%= course_path(@course) %>', '课堂删除后数据将无法恢复,是否确定删除?')">删除</a></li>
|
||||
<% if User.current == @course.teacher || User.current.admin? %>
|
||||
<li><a href="javascript:void(0);" onclick="delete_confirm_box_3('<%= course_path(@course) %>', '课堂删除后数据将无法恢复,是否确定删除?')">删除</a></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@
|
|||
<%#= link_to( "+", new_board_message_path(:board_id => course_board.id), :class => 'fr mr15 font-18 link-color-grey', :title => "#{l(:label_message_new)}") if User.current.logged? %>
|
||||
</li>
|
||||
<% count = User.current.allowed_to?(:as_teacher,@course)? @course.exercises.count : @course.exercises.where("exercise_status <> 1").count %>
|
||||
<li class="clearfix" id="sy_08">
|
||||
<li class="clearfix" id="sy_04">
|
||||
<a href="<%= exercise_index_path(:course_id => @course.id) %>" class="fl ml15 ">试卷</a>
|
||||
<span class="edu-cir-grey fl ml10 mt15"><%= count %></span>
|
||||
<%#= link_to( "+", new_exercise_path(:course_id => @course.id), :class => 'fr mr15 font-18 link-color-grey', :title =>"新建试卷") if is_teacher %>
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@
|
|||
<% if User.current.admin? || User.current.allowed_to?(:as_teacher, @course) %>
|
||||
<a href="<%= sticky_topic_board_message_path(@topic.board_id, @topic) %>" class="mr10" data-tip-down="<%= @topic.sticky == 1 ? '取消置顶' : '置顶' %>"><i class="fa <%= @topic.sticky == 1 ? 'fa-arrow-circle-o-down' : 'fa-arrow-circle-o-up' %>"></i></a>
|
||||
<% end %>
|
||||
<a href="javascript:void(0);" class="mr10" data-tip-down="发送" onclick="show_send(<%= @topic.id %>, <%= User.current.id %>, 'message');"><i class="fa fa-send-o"></i></a>
|
||||
<% if User.current.admin? || User.current.allowed_to?(:as_teacher, @course) || User.current == @topic.author %>
|
||||
<a href="<%= edit_board_message_path(@topic.board_id, @topic) %>" class="mr10" data-tip-down="编辑"><i class="fa fa-pencil"></i></a>
|
||||
<a href="javascript:void(0);" onclick="delete_confirm_box_3('<%= delete_board_message_path(@topic.board_id, @topic) %>', '确定要删除该帖子吗?')" class="mr10" data-tip-down="删除"><i class="fa fa-trash-o"></i></a>
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
$("#user_activity_<%= params[:user_activity_id]%>").replaceWith("<%= j(render :partial => 'users/course_message', :locals => {:activity => @topic, :user_activity_id => params[:user_activity_id],:is_course=>1,:is_board=>0}) %>");
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
<label for="all_student_select" class="ml10">
|
||||
<span class="span1 edu-txt-w120 task-hide font-bd">姓名</span>
|
||||
<span class="span3 edu-txt-w120 task-hide font-bd">用户ID</span>
|
||||
<span class="span2 edu-txt-w90 task-hide font-bd">职位</span>
|
||||
<span class="span2 edu-txt-w80 task-hide font-bd">职位</span>
|
||||
<span class="span3 edu-txt-w160 task-hide font-bd">单位</span>
|
||||
</label>
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<label for="choose_course_teacher_<%= user.id %>" style="top:0px">
|
||||
<a href="<%= user_path(user) %>" target="_blank" class="task-hide color-grey3 fl span1 edu-txt-w120"><%= user.show_real_name %></a>
|
||||
<span class="task-hide fl color-grey edu-txt-w120 span2"><%= user.login %></span>
|
||||
<span class="task-hide fl color-grey edu-txt-w100 span2"><%= user.identity %></span>
|
||||
<span class="task-hide fl color-grey edu-txt-w90 span2"><%= user.identity %></span>
|
||||
<span class="span3 color-grey fl edu-txt-w160 task-hide"><%= user.user_extensions.school ? user.user_extensions.school.name : "" %></span>
|
||||
</label>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
$("#student_work_score_div").html("<%= escape_javascript(render :partial => 'student_work/student_work_score_div') %>");
|
||||
$('#score_<%= @work.id%>').peSlider({range: 'min'});
|
||||
notice_box("提交成功");
|
||||
notice_box("<%= (@st_cover && @st_cover == 1) ? '评分已更新' : '提交成功' %>");
|
||||
|
|
|
|||
|
|
@ -234,17 +234,19 @@
|
|||
</div>
|
||||
</li>
|
||||
<input id="homework_id" type="hidden" value="<%= @homework.id %>">
|
||||
<li class="clearfix">
|
||||
<span class="ml33 fl mr10 color-grey">你的评阅:</span>
|
||||
<span class="fl mr25">
|
||||
<a href="javascript:void(0);" id="comment_no_limit" class="<%= @comment.blank? ? 'color-orange03' : '' %>">不限</a>
|
||||
</span>
|
||||
<% has_comment = User.current.student_works_scores.where(:student_work_id => @homework.student_works.map(&:id), :reviewer_role => [1, 2]).group_by(&:student_work_id).count %>
|
||||
<input id="not_comment" class="magic-checkbox fl" type="checkbox" value="0" name="comment[]" <%= !@comment.blank? && @comment.include?('0') ? 'checked' : '' %>>
|
||||
<label for="not_comment" class="fl mr25">未评<span>(<%= @homework.student_works.count - has_comment %>)</span></label>
|
||||
<input id="has_comment" class="magic-checkbox fl" type="checkbox" value="1" name="comment[]" <%= !@comment.blank? && @comment.include?('1') ? 'checked' : '' %>>
|
||||
<label for="has_comment" class="fl mr25">已评<span>(<%= has_comment %>)</span></label>
|
||||
</li>
|
||||
<% if @homework.homework_type != 4 %>
|
||||
<li class="clearfix">
|
||||
<span class="ml33 fl mr10 color-grey">你的评阅:</span>
|
||||
<span class="fl mr25">
|
||||
<a href="javascript:void(0);" id="comment_no_limit" class="<%= @comment.blank? ? 'color-orange03' : '' %>">不限</a>
|
||||
</span>
|
||||
<% has_comment = User.current.student_works_scores.where(:student_work_id => @homework.student_works.map(&:id), :reviewer_role => [1, 2]).group_by(&:student_work_id).count %>
|
||||
<input id="not_comment" class="magic-checkbox fl" type="checkbox" value="0" name="comment[]" <%= !@comment.blank? && @comment.include?('0') ? 'checked' : '' %>>
|
||||
<label for="not_comment" class="fl mr25">未评<span>(<%= @homework.student_works.count - has_comment %>)</span></label>
|
||||
<input id="has_comment" class="magic-checkbox fl" type="checkbox" value="1" name="comment[]" <%= !@comment.blank? && @comment.include?('1') ? 'checked' : '' %>>
|
||||
<label for="has_comment" class="fl mr25">已评<span>(<%= has_comment %>)</span></label>
|
||||
</li>
|
||||
<% end %>
|
||||
<li class="clearfix">
|
||||
<span class="ml33 fl mr10 color-grey">作品状态:</span>
|
||||
<span class="fl mr25">
|
||||
|
|
|
|||
|
|
@ -52,21 +52,16 @@
|
|||
<ul>
|
||||
<li class="homepagePostSettingIcon"><i class="fa fa-bars color-grey9"></i>
|
||||
<ul class="homepagePostSettiongText">
|
||||
<% if activity.author.id == User.current.id%>
|
||||
<li>
|
||||
<%= link_to(
|
||||
l(:button_edit),
|
||||
edit_board_message_path(activity.id,:board_id=>activity.board_id,:is_course=>is_course,:is_board=>is_board),
|
||||
:class => 'postOptionLink'
|
||||
) if activity.course_editable_by?(User.current) %>
|
||||
</li>
|
||||
<% if activity.course_destroyable_by?(User.current) %>
|
||||
<li>
|
||||
<a href="javascript:void(0);" class="postOptionLink" onclick="delete_confirm_box_3('<%= delete_board_message_path(activity.id,:board_id=>activity.board_id,:is_course=>is_course,:is_board=>is_board) %>', '确定要删除该条回复吗?')">删除</a>
|
||||
</li>
|
||||
<% end %>
|
||||
<li><a href="javascript:void(0)" onclick="show_send(<%= activity.id %>, <%= User.current.id %>, 'message');" class="postOptionLink">发 送</a></li>
|
||||
<% if User.current.admin? || User.current.allowed_to?(:as_teacher, @course) %>
|
||||
<li><a href="<%= sticky_topic_board_message_path(activity.board_id, activity, :is_board => false, :user_activity_id => user_activity_id) %>" data-remote="true" class="postOptionLink"><%= activity.sticky == 1 ? '取消置顶' : '置 顶'.html_safe %></a></li>
|
||||
<% end %>
|
||||
<% if User.current.admin? || User.current.allowed_to?(:as_teacher, @course) || User.current == activity.author %>
|
||||
<li><a href="<%= edit_board_message_path(activity.board_id, activity) %>" class="postOptionLink">编 辑</a></li>
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="delete_confirm_box_3('<%= delete_board_message_path(activity.board_id, activity,:is_course=>is_course,:is_board=>is_board) %>', '确定要删除该帖子吗?')" class="postOptionLink">删 除</a>
|
||||
</li>
|
||||
<% end %>
|
||||
<li><%= link_to "发送", "javascript:void(0);", :onclick => "show_send(#{activity.id}, #{User.current.id}, 'message');", :class => "postOptionLink" %></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -346,5 +346,6 @@ function new_shixun_homework(id){
|
|||
var type=$("input[name='shixun_homework']:checked").val();
|
||||
console.log(type);
|
||||
$("#shixun_homework_common_new").submit();
|
||||
hideModal();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -242,6 +242,7 @@ a.edu-txt-w130,.edu-txt-w130{ width:130px; display: inline-block;text-align: cen
|
|||
a.edu-txt-w120,.edu-txt-w120{ width:120px; display: inline-block;text-align: center}
|
||||
a.edu-txt-w100,.edu-txt-w100{ width:100px; display: inline-block;text-align: center}
|
||||
a.edu-txt-w90,.edu-txt-w90{ width:90px; display: inline-block;text-align: center}
|
||||
a.edu-txt-w80,.edu-txt-w80{ width:80px; display: inline-block;text-align: center}
|
||||
.edu-txt-w50{ width:50px;}
|
||||
.edu-w245{ width: 245px; }
|
||||
.overellipsis{overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
|
||||
|
|
|
|||
Loading…
Reference in New Issue