Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop
This commit is contained in:
commit
7984affe36
|
@ -381,14 +381,24 @@ class StudentWorkController < ApplicationController
|
|||
@is_evaluation = @homework.homework_detail_manual && @homework.homework_detail_manual.comment_status == 2 && !@is_teacher #是不是匿评
|
||||
@show_all = false
|
||||
|
||||
course_group = CourseGroup.find_by_id(@group) if @group
|
||||
if course_group
|
||||
if @group
|
||||
if @group == "0"
|
||||
none_group_students = @course.members.select{ |member| member.course_group_id == 0 }
|
||||
if none_group_students.empty?
|
||||
student_in_group = '(0)'
|
||||
else
|
||||
student_in_group = '(' + none_group_students.map{ |member| member.user_id }.join(',') + ')'
|
||||
end
|
||||
else
|
||||
course_group = CourseGroup.find_by_id(@group)
|
||||
group_students = course_group.users
|
||||
if group_students.empty?
|
||||
student_in_group = '(0)'
|
||||
else
|
||||
student_in_group = '(' + group_students.map{ |user| user.id }.join(',') + ')'
|
||||
end
|
||||
end
|
||||
|
||||
#开放作品 || 老师 || 超级管理员 || 禁用匿评&&作业截止&&已提交作品 显示所有列表
|
||||
if (@homework.is_open == 1 && @course.is_public == 1) || (@homework.is_open == 1 && @course.is_public == 0 && User.current.member_of_course?(@course)) || @is_teacher || User.current.admin? || (User.current.member_of_course?(@course) && @homework.anonymous_comment == 1 && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") && !@homework.student_works.has_committed.where(:user_id => User.current.id).empty?)
|
||||
if @order == 'lastname'
|
||||
|
|
|
@ -591,6 +591,26 @@ module CoursesHelper
|
|||
Course.tagged_with(tag_name).order('updated_at desc')
|
||||
end
|
||||
|
||||
# 获取动态列表名称
|
||||
def get_acts_list_type type
|
||||
case type
|
||||
when "homework"
|
||||
">" + l(:label_homework_acts)
|
||||
when "news"
|
||||
">" + l(:label_news_acts)
|
||||
when "attachment"
|
||||
">" + l(:label_attachment_acts)
|
||||
when "message"
|
||||
">" + l(:label_message_acts)
|
||||
when "journalsForMessage"
|
||||
">" + l(:label_journalsForMessage_acts)
|
||||
when "poll"
|
||||
">" + l(:label_poll_acts)
|
||||
else
|
||||
">" + l(:label_all_cats)
|
||||
end
|
||||
end
|
||||
|
||||
#分班下拉框
|
||||
def course_group_option course
|
||||
type = []
|
||||
|
|
|
@ -101,6 +101,10 @@ module StudentWorkHelper
|
|||
if course.course_groups && !course.course_groups.empty?
|
||||
base = []
|
||||
base << l(:label_chose_group)
|
||||
base << -1
|
||||
result << base
|
||||
base = []
|
||||
base << l(:label_no_group)
|
||||
base << 0
|
||||
result << base
|
||||
course.course_groups.each do |group|
|
||||
|
|
|
@ -132,8 +132,10 @@
|
|||
<div id="topic_editor" style="display: none;">
|
||||
<%if User.current.member_of_course?(course) %>
|
||||
<div class="mt10">
|
||||
<% if User.current.admin? %>
|
||||
<%= f.check_box :sticky, :value => topic.sticky %>
|
||||
<%= label_tag 'message_sticky', l(:label_board_sticky) %>
|
||||
<% end %>
|
||||
<%= f.check_box :locked, :value => topic.locked %>
|
||||
<%= label_tag 'message_locked', l(:label_board_locked) %>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<% @members.each do |member| %>
|
||||
<li >
|
||||
<%#= link_to_user_header member.principal,true,:class => "w150 c_orange fl" %>
|
||||
<%= link_to "#{member.principal}(#{member.principal.show_name})", user_path(member.principal), :class => "w150 linkBlue fl" %>
|
||||
<%= link_to "#{member.principal}(#{member.principal.show_name})", user_path(member.principal), :class => "w150 linkBlue fl", :style=>"white-space: nowrap;overflow: hidden;text-overflow: ellipsis;", :title => "#{member.principal}(#{member.principal.show_name})" %>
|
||||
<span class="w150 fl">
|
||||
<%= zh_course_role(h member.roles.sort.collect(&:to_s).join(', ')) %>
|
||||
<%= form_for(member, {:as => :membership, :remote => true, :url => membership_path(member),
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
<input type="hidden" value="<%= @type%>" name="type" id="user_activities_type">
|
||||
<div class="homepageRight mt0 ml10">
|
||||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName">班级动态</div>
|
||||
<div class="NewsBannerName">班级动态
|
||||
<%= get_acts_list_type @type %></div>
|
||||
<ul class="resourcesSelect">
|
||||
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
|
||||
<ul class="homepagePostType" style="width:90px; left:-80px;">
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
$("#poll_question_standard_answer_<%=exercise_question.id %>").val("<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s)%>")
|
||||
$("#poll_answers_<%=exercise_question.id%>").html("<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>" +
|
||||
"<li class='ur_item'>" +
|
||||
"<label name='select_items' class='w56'>选项<%=convert_to_char (index+1).to_s %><span class='ur_index'></span>: </label>" +
|
||||
"<label name='select_items' class='w60'>选项<%=convert_to_char (index+1).to_s %><span class='ur_index'></span>: </label>" +
|
||||
"<input maxlength='200' type='text' name='question_answer[<%=exercise_choice.id %>]' placeholder='输入选项内容' value='<%=exercise_choice.choice_text %>'/>" +
|
||||
"<a class='icon_add' title='向下插入选项' onclick='add_single_answer($(this));'></a>" +
|
||||
"<a class='icon_remove' title='删除' onclick='remove_single_answer($(this))'></a>" +
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
$("#poll_question_standard_answer_<%=exercise_question.id %>").val("<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s)%>")
|
||||
$("#poll_answers_<%=exercise_question.id%>").html("<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>" +
|
||||
"<li class='ur_item'>" +
|
||||
"<label name='select_items' class='w56'>选项<%=convert_to_char (index+1).to_s %><span class='ur_index'></span>: </label>" +
|
||||
"<label name='select_items' class='w60'>选项<%=convert_to_char (index+1).to_s %><span class='ur_index'></span>: </label>" +
|
||||
"<input maxlength='200' type='text' name='question_answer[<%= exercise_choice.id %>]' placeholder='输入选项内容' value='<%=exercise_choice.choice_text %>'/>" +
|
||||
"<a class='icon_add' title='向下插入选项' onclick='add_single_answer($(this));'></a>" +
|
||||
"<a class='icon_remove' title='删除' onclick='remove_single_answer($(this))'></a>" +
|
||||
|
@ -34,7 +34,7 @@
|
|||
<div id="poll_answers_<%=exercise_question.id%>">
|
||||
<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>
|
||||
<li class="ur_item">
|
||||
<label name='select_items' class='w56'>选项<%=convert_to_char (index+1).to_s %><span class="ur_index"></span>: </label>
|
||||
<label name='select_items' class='w60'>选项<%=convert_to_char (index+1).to_s %><span class="ur_index"></span>: </label>
|
||||
<input maxlength="200" type='text' name='question_answer[<%= exercise_choice.id %>]' placeholder='输入选项内容' value="<%=exercise_choice.choice_text %>">
|
||||
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
|
||||
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
||||
|
|
|
@ -171,7 +171,7 @@
|
|||
//单选题
|
||||
function add_single_answer(doc)
|
||||
{
|
||||
var li = doc.parent().after("<li class='ur_item'><label name='select_items' class='w56'>选项 <span class='ur_index'></span>: </label><input maxlength='200' type='text' name='question_answer["+new Date().getTime()+"]' placeholder='输入选项内容'/>" +
|
||||
var li = doc.parent().after("<li class='ur_item'><label name='select_items' class='w60'>选项 <span class='ur_index'></span>: </label><input maxlength='200' type='text' name='question_answer["+new Date().getTime()+"]' placeholder='输入选项内容'/>" +
|
||||
"<a class='icon_add' title='向下插入选项' onclick='add_single_answer($(this));'></a><a class='icon_remove' title='删除' onclick='remove_single_answer($(this))'></a>"+
|
||||
"</li><div class='cl'></div>");
|
||||
var select_items =$("label[name='select_items']",li.parent());
|
||||
|
|
|
@ -18,28 +18,28 @@
|
|||
<div class="cl"></div>
|
||||
<div>
|
||||
<li class="ur_item">
|
||||
<label name='select_items' class='w56'>选项A<span class="ur_index"></span>: </label>
|
||||
<label name='select_items' class='w60'>选项A<span class="ur_index"></span>: </label>
|
||||
<input maxlength="200" type='text' name='question_answer[0]' placeholder='输入选项内容'>
|
||||
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
|
||||
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ur_item">
|
||||
<label name='select_items' class='w56'>选项B<span class="ur_index"></span>: </label>
|
||||
<label name='select_items' class='w60'>选项B<span class="ur_index"></span>: </label>
|
||||
<input maxlength="200" type='text' name='question_answer[1]' placeholder='输入选项内容'>
|
||||
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
|
||||
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ur_item">
|
||||
<label name='select_items' class='w56'>选项C<span class="ur_index"></span>: </label>
|
||||
<label name='select_items' class='w60'>选项C<span class="ur_index"></span>: </label>
|
||||
<input maxlength="200" type='text' name='question_answer[2]' placeholder='输入选项内容'>
|
||||
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
|
||||
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ur_item">
|
||||
<label name='select_items' class='w56'>选项D<span class="ur_index"></span>: </label>
|
||||
<label name='select_items' class='w60'>选项D<span class="ur_index"></span>: </label>
|
||||
<input maxlength="200" type='text' name='question_answer[3]' placeholder='输入选项内容'>
|
||||
<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>
|
||||
<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>
|
||||
|
|
|
@ -54,28 +54,28 @@
|
|||
'<input value="<%= score %>" id="question_score" type="text" name="question_score" style="width:40px; text-align:center; padding-left:0px;"/>分'+
|
||||
'</li><div>'+
|
||||
'<li class="ur_item">'+
|
||||
'<label name="select_items" class="w56">选项A<span class="ur_index"></span>: </label>'+
|
||||
'<label name="select_items" class="w60">选项A<span class="ur_index"></span>: </label>'+
|
||||
'<input maxlength="200" type="text" name="question_answer[0]" placeholder="输入选项内容"/>'+
|
||||
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
|
||||
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
|
||||
'</li>'+
|
||||
'<div class="cl"></div>'+
|
||||
'<li class="ur_item">'+
|
||||
'<label name="select_items" class="w56">选项B<span class="ur_index"></span>: </label>'+
|
||||
'<label name="select_items" class="w60">选项B<span class="ur_index"></span>: </label>'+
|
||||
'<input maxlength="200" type="text" name="question_answer[1]" placeholder="输入选项内容"/>'+
|
||||
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
|
||||
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
|
||||
'</li>'+
|
||||
'<div class="cl"></div>'+
|
||||
'<li class="ur_item">'+
|
||||
'<label name="select_items" class="w56">选项C<span class="ur_index"></span>: </label>'+
|
||||
'<label name="select_items" class="w60">选项C<span class="ur_index"></span>: </label>'+
|
||||
'<input maxlength="200" type="text" name="question_answer[2]" placeholder="输入选项内容"/>'+
|
||||
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
|
||||
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
|
||||
'</li>'+
|
||||
'<div class="cl"></div>'+
|
||||
'<li class="ur_item">'+
|
||||
'<label name="select_items" class="w56">选项D<span class="ur_index"></span>: </label>'+
|
||||
'<label name="select_items" class="w60">选项D<span class="ur_index"></span>: </label>'+
|
||||
'<input maxlength="200" type="text" name="question_answer[3]" placeholder="输入选项内容"/>'+
|
||||
'<a class="icon_add" title="向下插入选项" onclick="add_single_answer($(this));"></a>'+
|
||||
'<a class="icon_remove" title="删除" onclick="remove_single_answer($(this))"></a>'+
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => User.find(act.user_id)} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo"><%= link_to User.find(act.user_id), user_url_in_org(act.user_id) %> 创建了 <a href="<%= organization_path(@organization)%>" class="newsBlue ml10"><%= Organization.find(act.org_act_id).name %>
|
||||
<div class="homepagePostTo"><%= link_to User.find(act.user_id), user_url_in_org(act.user_id),:class => "newsBlue mr15" %> 创建了 <a href="<%= organization_path(@organization)%>" class="newsBlue ml10"><%= Organization.find(act.org_act_id).name %>
|
||||
| 组织</a></div>
|
||||
<div class="homepagePostDate"> 创建时间:<%= format_activity_day(act.created_at) %> <%= format_time(act.created_at, false) %> </div>
|
||||
</div>
|
||||
|
|
|
@ -59,9 +59,14 @@
|
|||
|
||||
<li >
|
||||
<span class="tit_fb ">内容:</span>
|
||||
<% com_contents = work.work_status %>
|
||||
<% if com_contents != 0 && work.description %>
|
||||
<div class="showHworkP break_word upload_img" id="student_work_img_<%= work.id %>">
|
||||
<%= work.description.html_safe if work.description%>
|
||||
<%= work.description.html_safe %>
|
||||
</div>
|
||||
<% else %>
|
||||
<span style="color: #999999">该作品未在线下完成提交</span>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li >
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<br>
|
||||
<div style='width:470px;text-align:center;font-family: "微软雅黑","宋体"' class="f14">
|
||||
<% if @syllabus.courses.empty? %>
|
||||
<% if @syllabus.courses.empty? || @syllabus.courses.not_deleted.empty? %>
|
||||
确认删除该课程吗?
|
||||
<% else %>
|
||||
该课程下已经存在班级,不能删除。
|
||||
|
@ -8,7 +8,7 @@
|
|||
</div>
|
||||
</br>
|
||||
<div style='width:164px; margin:0 auto; text-align:center; font-family: "微软雅黑","宋体"'>
|
||||
<% if @syllabus.courses.empty? %>
|
||||
<% if @syllabus.courses.empty?|| @syllabus.courses.not_deleted.empty? %>
|
||||
<%=link_to '确认', syllabus_path(@syllabus), :class => 'Blue-btn fl', :method => 'delete'%>
|
||||
<a href='javascript:void(0);' class='Blue-btn fl' onclick='hideModal()'>关闭</a>
|
||||
<% else %>
|
||||
|
|
|
@ -29,6 +29,16 @@ zh:
|
|||
label_upload_files: 上传资源
|
||||
label_apply_join_course: 申请加入班级
|
||||
label_apply_for_homework: 申请引用作业
|
||||
|
||||
#动态名称
|
||||
label_homework_acts: 作业动态
|
||||
label_news_acts: 通知动态
|
||||
label_attachment_acts: 资源库动态
|
||||
label_message_acts: 论坛动态
|
||||
label_journalsForMessage_acts: 留言动态
|
||||
label_poll_acts: 问卷动态
|
||||
label_all_cats: 全部动态
|
||||
|
||||
#
|
||||
# 课程托管平台主页
|
||||
#
|
||||
|
|
|
@ -2101,6 +2101,7 @@ zh:
|
|||
label_file_lost_list: 缺失文件列表
|
||||
lable_unset: 未设置
|
||||
label_chose_group: 请选择分班
|
||||
label_no_group: 暂无
|
||||
|
||||
label_hostedz_organization: 主办单位
|
||||
label_hosted_by: 国防科学技术大学并行与分布处理国家重点实验室
|
||||
|
|
Loading…
Reference in New Issue