Merge branch 'develop' of https://bdgit.trustie.net/hushasha/bigdata into develop
This commit is contained in:
commit
d7cbe6e5ce
|
|
@ -525,6 +525,7 @@ class ExerciseController < ApplicationController
|
|||
|
||||
@exercise_users_list = search_exercise_member @exercise_users_list, @name
|
||||
|
||||
@tab = params[:tab].nil? ? 1 : params[:tab].to_i
|
||||
@score = @b_sort == "desc" ? "asc" : "desc"
|
||||
@exercise_count = @exercise_users_list.count
|
||||
@has_commit_count = @exercise.exercise_users.where(:commit_status => 1).count
|
||||
|
|
|
|||
|
|
@ -553,6 +553,51 @@ end
|
|||
|
||||
end
|
||||
|
||||
# 修改单位名称
|
||||
def upload_logo
|
||||
@menu_type = 6
|
||||
@sub_type = 1
|
||||
@school = School.find(params[:school])
|
||||
apply_schools = ApplyAddSchools.where("status = 0")
|
||||
apply_school_ids = apply_schools.empty? ? "(-1)" : "(" + apply_schools.map{|sc| sc.school_id}.join(',') + ")"
|
||||
if !params[:search].nil?
|
||||
search = "%#{params[:search].to_s.strip.downcase}%"
|
||||
@schools = School.where("id not in #{apply_school_ids} and #{School.table_name}.name like :p", :p => search)
|
||||
else
|
||||
@schools = School.where("id not in #{apply_school_ids}")
|
||||
end
|
||||
end
|
||||
|
||||
# 修改单位名称为其他
|
||||
def school_upload_logo
|
||||
school = School.where(:id => params[:applied_id]).first
|
||||
UserExtensions.where(:school_id => params[:applied_id]).update_all(:school_id => params[:school_id])
|
||||
Department.where(:school_id => params[:applied_id]).update_all(:school_id => params[:school_id])
|
||||
ApplyAddSchools.where(:school_id => params[:applied_id]).destroy_all
|
||||
ApplyAddDepartment.where(:school_id => params[:applied_id]).destroy_all
|
||||
school.destroy
|
||||
redirect_to departments_part_managements_path
|
||||
end
|
||||
|
||||
# 修改单位信息
|
||||
def school_message_update
|
||||
school = School.where(:name =>params[:schoolname]).first
|
||||
school_id = school.id
|
||||
School.where(:id => school_id).update_all(:province => params[:province],:city =>params[:city],:address => params[:address])
|
||||
ApplyAddSchools.where(:school_id => school_id).update_all(:province => params[:province],:city =>params[:city],:address => params[:address])
|
||||
redirect_to departments_part_managements_path
|
||||
end
|
||||
|
||||
# 删除单位
|
||||
def delete_school
|
||||
school = School.where(:id => params[:school]).first
|
||||
UserExtensions.where(:school_id => params[:school]).update_all(:school_id => nil, :department_id => nil)
|
||||
ApplyAddSchools.where(:school_id => params[:school]).destroy_all
|
||||
ApplyAddDepartment.where(:school_id => params[:school]).destroy_all
|
||||
school.destroy
|
||||
redirect_to departments_part_managements_path
|
||||
end
|
||||
|
||||
def save_school
|
||||
uploaded_io = params[:logo]
|
||||
sl = School.create(:name => params[:schoolname],:province => params[:province],:city => params[:city],:address => params[:address])
|
||||
|
|
@ -763,13 +808,12 @@ end
|
|||
if !params[:search].nil?
|
||||
search = "%#{params[:search].to_s.strip.downcase}%"
|
||||
@schools = School.where("id not in #{apply_school_ids} and #{School.table_name}.name like :p", :p => search)
|
||||
#@schools = School.all
|
||||
else
|
||||
#@course = @user.courses.where("is_delete = 0 and #{Course.table_name}.id != #{homework.course_id}").select { |course| @user.allowed_to?(:as_teacher,course)}
|
||||
@schools = School.where("id not in #{apply_school_ids}")
|
||||
end
|
||||
@edit_id = params[:school_id]
|
||||
@search = params[:search]
|
||||
@upload = params[:upload]
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
|
|
@ -888,7 +932,9 @@ end
|
|||
@courses = @courses.joins("join users u on courses.tea_id = u.id").where("concat(u.lastname, u.firstname) like '%#{@search}%'")
|
||||
end
|
||||
else
|
||||
@courses= @courses.where("name like '%#{@search}%'")
|
||||
school = School.where("name like '%#{@search}%'").map(&:id)
|
||||
@courses = @courses.where(:school_id => school)
|
||||
# @courses= @courses.where("name like '%#{@search}%'")
|
||||
end
|
||||
@courses = @courses.select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS updatetime").reorder("updatetime #{@sx_order}")
|
||||
@export_courses = @courses
|
||||
|
|
@ -1018,7 +1064,7 @@ end
|
|||
|
||||
# 0 全部;1 活动的; 2 已注册; 3 锁定
|
||||
def users
|
||||
@menu_type
|
||||
@menu_type = 7
|
||||
@sub_type = 1
|
||||
status = params[:user_status].nil? ? 0 : params[:user_status].to_i
|
||||
@us_order = params[:us_order].blank? ? "desc" : params[:us_order] # 排序
|
||||
|
|
|
|||
|
|
@ -725,6 +725,16 @@ class ShixunsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def fork_list
|
||||
@shixuns = Shixun.where(:fork_from => @shixun.id)
|
||||
@shixuns_count = @shixuns.count
|
||||
@limit = 16
|
||||
@is_remote = true
|
||||
@shixun_pages = Paginator.new @shixuns_count, @limit, params['page'] || 1
|
||||
@offset ||= @shixun_pages.offset
|
||||
@shixuns = paginateHelper @shixuns, @limit
|
||||
end
|
||||
|
||||
def show
|
||||
respond_to do |format|
|
||||
format.html{redirect_to shixun_challenges_path(@shixun)}
|
||||
|
|
|
|||
|
|
@ -4845,7 +4845,7 @@ def get_hw_index(hw,is_teacher,type=0)
|
|||
end
|
||||
end
|
||||
hw_ids = homeworks.map{|hw| hw.id} if !homeworks.blank?
|
||||
index = hw_ids.index(hw.id)
|
||||
index = hw_ids.length - 1 - hw_ids.index(hw.id)
|
||||
return index
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ class Memo < ActiveRecord::Base
|
|||
# 若是主题帖,则内容可以是空
|
||||
#validates :content, presence: true, if: Proc.new{|o| !o.parent_id.nil? }
|
||||
validates_length_of :subject, maximum: 50
|
||||
validates_length_of :content, maximum: 30000
|
||||
|
||||
validate :cannot_reply_to_locked_topic, :on => :create
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<% if activity.attachments.any? %>
|
||||
<% activity.attachments.each do |attachment| %>
|
||||
<li class="color-grey">
|
||||
<a href="javascript:void(0)" class="link-color-grey">
|
||||
<a href="javascript:void(0)" class="color-grey">
|
||||
<i class="fa fa-folder" aria-hidden="true"></i>
|
||||
<%= link_to_short_attachment attachment,:length=> 58, :class => 'link-color-grey', :download => true %>
|
||||
<%= link_to_short_attachment attachment,:length=> 58, :class => 'color-grey', :download => true %>
|
||||
<span class="color-grey">(
|
||||
<%= number_to_human_size attachment.filesize %>)
|
||||
</span>
|
||||
<% user_name = attachment.author.show_real_name.empty? ? attachment.author : attachment.author.show_real_name %>
|
||||
<span title="<%= user_name %>">
|
||||
<%= link_to h(truncate(user_name, length: 15, omission: '...')),user_path(attachment.author),:class => "link-color-grey" %>,
|
||||
<%= link_to h(truncate(user_name, length: 15, omission: '...')),user_path(attachment.author),:class => "color-grey" %>,
|
||||
<%= format_time(attachment.created_on) %>
|
||||
</span>
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@
|
|||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
<div class="ml10 edu-dropdown">
|
||||
<div class="ml10 pr edu-position-hidebox mr10">
|
||||
<span class="mr8 color-orange03">新建</span><i class="fa fa-sort-down fl fr mt3 color-orange03"></i>
|
||||
<ul class="edu-dropdown-menu" id="all_status_list" style="top:29px;left: -12px;width: 90px;text-align: center">
|
||||
<ul class="edu-position-hide undis" id="all_status_list" style="top:29px;">
|
||||
<li style="text-align:center;">
|
||||
<%= link_to '普通作业'.html_safe, new_homework_common_path(:course => @course.id, :homework_type => 1),:class => "color-grey" %>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<div class="con-content">
|
||||
<%= labelled_form_for @course do |f| %>
|
||||
<ul>
|
||||
<li class="clearfix pt20">
|
||||
<li class="clearfix pt20 mb110">
|
||||
<label class="panel-form-label label fl color-dark-grey"><span class="color-orange mr5">*</span>课程名称 </label>
|
||||
<div class="pr fl with75">
|
||||
<input type="text" name="course[course_list]" autocomplete="off" style="width: 100%;" id="new_course_list" class="task task-height-40 panel-box-sizing fl color-grey" maxlength="100" placeholder="例如:数据结构">
|
||||
|
|
@ -19,6 +19,18 @@
|
|||
</div>
|
||||
<div class="cl"></div>
|
||||
<span class="color-orange fl none" id="new_course_syllabus_notice" style="margin-left:25%;"><i class="fa fa-exclamation-circle mr5" ></i>请先输入课程</span>
|
||||
|
||||
<div class="tusi" style="left:108% ">
|
||||
<div class="entry">
|
||||
<em></em>
|
||||
<span class="after"></span>
|
||||
<p class="color-grey mt10" style="height: 26px;line-height: 26px;">注意:只需要填写课程的全称即可</p>
|
||||
<p class="color-grey ml50" style="height: 26px;line-height: 26px;margin-left: 35px;"><i class="fa fa-check-circle color-light-green mr5"></i>正确示例:数据结构</p>
|
||||
<p class="color-grey" style="height: 26px;line-height: 26px;margin-left: 35px;"><i class="fa fa-times-circle color-orange mr5"></i>错误示例:数据结构2017本部</p>
|
||||
<p class="color-grey" style="height: 26px;line-height: 26px;margin-left: 35px;"><i class="fa fa-times-circle color-orange mr5"></i>错误示例:数据结构2017秋季</p>
|
||||
<p class="color-grey" style="height: 26px;line-height: 26px;margin-left: 35px;"><i class="fa fa-times-circle color-orange mr5"></i>错误示例:数据结构2017电子商务1班</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="pt20 clearfix mb40">
|
||||
<label class="panel-form-label label fl color-dark-grey"><span class="color-orange mr5">*</span>课堂名称 </label>
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
<input style="display: none;" name="exercise_choice" id="exercise_choice_<%=exercise_question.id%>" value="<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s) %>"/>
|
||||
<label class="panel-form-label fl"><span class="mr10">题目</span></label>
|
||||
<input name="question_type" value="<%=exercise_question.question_type %>" type="hidden">
|
||||
<textarea name="question_title" id="poll_questions_title_<%=exercise_question.id %>" class="panel-form-width2-690 fl panel-box-sizing" placeholder="请输入单选题的题干" type="text" oninput="autoHeight('#poll_questions_title_<%=exercise_question.id %>',30)"><%=exercise_question.question_title %></textarea>
|
||||
<textarea name="question_title" id="poll_questions_title_<%=exercise_question.id %>" class="panel-form-width2-690 fl panel-box-sizing undis" placeholder="请输入单选题的题干"><%=exercise_question.question_title.html_safe %></textarea>
|
||||
</li>
|
||||
<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>
|
||||
<li class="clearfix pr mb20">
|
||||
|
|
@ -61,4 +61,4 @@
|
|||
</li>
|
||||
</div>
|
||||
</div>
|
||||
<% end%>
|
||||
<% end %>
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
<input style="display: none;" name="exercise_choice" id="exercise_choice_<%=exercise_question.id%>" value="<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s) %>"/>
|
||||
<label class="panel-form-label fl"><span class="mr10">题目</span></label>
|
||||
<input name="question_type" value="<%=exercise_question.question_type %>" type="hidden">
|
||||
<textarea name="question_title" id="poll_questions_title_<%=exercise_question.id %>" class="panel-form-width2-690 fl panel-box-sizing" placeholder="请输入多选题的题干" type="text" oninput="autoHeight('#poll_questions_title_<%=exercise_question.id %>',30)"><%=exercise_question.question_title %></textarea>
|
||||
<textarea name="question_title" id="poll_questions_title_<%=exercise_question.id %>" class="panel-form-width2-690 fl panel-box-sizing undis"><%=exercise_question.question_title.html_safe %></textarea>
|
||||
</li>
|
||||
|
||||
<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>
|
||||
|
|
|
|||
|
|
@ -13,11 +13,11 @@
|
|||
<li class="clearfix pr mb20">
|
||||
<label class="panel-form-label fl"><span class="mr10">题目</span></label>
|
||||
<input name="question_type" value="<%=exercise_question.question_type %>" type="hidden">
|
||||
<textarea maxlength="250" class="panel-form-width2-690 fl panel-box-sizing" name="question_title" id="poll_questions_title_<%=exercise_question.id %>" placeholder="请输入简答题的题干" type="text" oninput="autoHeight('#poll_questions_title_<%=exercise_question.id %>',30)"><%=exercise_question.question_title %></textarea>
|
||||
<textarea maxlength="250" class="panel-form-width2-690 fl panel-box-sizing undis" name="question_title" id="poll_questions_title_<%=exercise_question.id %>"><%=exercise_question.question_title.html_safe %></textarea>
|
||||
</li>
|
||||
<li class="clearfix pr mb20">
|
||||
<label class="panel-form-label fl"><span class="fr mr10 color-grey" name="option_spans">参考答案</span></label>
|
||||
<textarea class="fl panel-box-sizing with90 task-height-150 pl5 pt5 candiate_answer" name="exercise_choice" placeholder="如有参考答案,请输入参考答案"id="poll_questions_answer_<%=exercise_question.id %>"><%=exercise_question.exercise_standard_answers.empty? ? '' : exercise_question.exercise_standard_answers.first.answer_text %></textarea>
|
||||
<textarea class="fl panel-box-sizing with90 task-height-150 pl5 pt5 candiate_answer" name="exercise_choice" placeholder="如有参考答案,请输入参考答案" id="poll_questions_answer_<%=exercise_question.id %>"><%=exercise_question.exercise_standard_answers.empty? ? '' : exercise_question.exercise_standard_answers.first.answer_text %></textarea>
|
||||
</li>
|
||||
<li class="clearfix mb20">
|
||||
<label class="panel-form-label fl"><span class="mr10">分值</span></label>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
<input name="question_type" value="3" type="hidden">
|
||||
<label class="panel-form-label fl"><span class="mr10">题目</span></label>
|
||||
<input name="question_type" value="<%=exercise_question.question_type %>" type="hidden">
|
||||
<textarea maxlength="250" class="panel-form-width2-690 fl panel-box-sizing questionTitle" name="question_title" id="poll_questions_title_<%=exercise_question.id %>" placeholder="请输入填空题的题干(注意:目前仅支持一个空)" type="text" oninput="autoHeight('#poll_questions_title_<%=exercise_question.id %>',30)"><%=exercise_question.question_title %></textarea>
|
||||
<textarea maxlength="250" class="panel-form-width2-690 fl panel-box-sizing questionTitle undis" name="question_title" id="poll_questions_title_<%=exercise_question.id %>"><%=exercise_question.question_title.html_safe %></textarea>
|
||||
</li>
|
||||
<% exercise_question.exercise_standard_answers.reorder("created_at").each_with_index do |exercise_choice,index| %>
|
||||
<li class="clearfix pr mb20">
|
||||
|
|
|
|||
|
|
@ -1,6 +1,3 @@
|
|||
<% content_for :header_tags do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
|
||||
<% end %>
|
||||
<div class="edu-con-top user_bg_shadow bor-grey-e clearfix mb20" id="exercise_head">
|
||||
<div class="<%= is_edit ? '' : 'none' %>" id="exercise_head_show">
|
||||
<%= render :partial => 'show_head', :locals => {:exercise => @exercise} %>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,356 @@
|
|||
<% edit_mode = @is_new && @is_teacher %>
|
||||
<div id="homework_publish_setting">
|
||||
<!--发布设置-->
|
||||
<div>
|
||||
<div class="<%= edit_mode ? 'none' : '' %>" id="show_exercise_setting">
|
||||
<div class="bor-bottom-greyE pt10 pb10 pr10">
|
||||
<div class="clearfix mb15">
|
||||
<p class="ml15 fl font-16 mt5">发布设置</p>
|
||||
<% if @is_teacher %>
|
||||
<a href="javascript:void(0);" class="white-btn orange-btn fr mr15 mt15" title="编辑" onclick="show_ex_edit_setting();">编辑</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="ml30 mr30">
|
||||
<div class="clearfix">
|
||||
<ul>
|
||||
<li class="clearfix mb15 edu-position pl30">
|
||||
<label class="panel-form-label fl mr10">发布时间</label>
|
||||
<input type="text" class="disabled-bg fl task-form-15 task-height-40 panel-box-sizing" value="<%= format_time @exercise.publish_time %>" disabled>
|
||||
<div class="popup_tip_box fontGrey2" style="right:-15px; top:0px; width:405px;">
|
||||
<em></em>
|
||||
<span></span>
|
||||
<p>发布之前,学生不会收到试卷</p>
|
||||
</div>
|
||||
</li>
|
||||
<li class="clearfix mb15 edu-position pl30">
|
||||
<label class=" panel-form-label fl mr10">截止时间</label>
|
||||
<input type="text" class="disabled-bg fl task-form-15 task-height-40 panel-box-sizing" id="show_end_time" value="<%= format_time @exercise.end_time %>" disabled>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<!--<li class="clearfix mb15 edu-position pl30">-->
|
||||
<!--<label class=" panel-form-label fl mr10">结束时间</label>-->
|
||||
<!--<input type="text" class="disabled-bg fl task-form-15 task-height-40 panel-box-sizing" id="show_archive_time" value="" disabled="">-->
|
||||
<!--<div class="popup_tip_box fontGrey2" style="right:-15px; top:0px;width:405px;">-->
|
||||
<!--<em></em>-->
|
||||
<!--<span></span>-->
|
||||
<!--<p>结束之后,系统自动归档试卷</p>-->
|
||||
<!--</div>-->
|
||||
<!--</li>-->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bor-bottom-greyE pt10 pb10 pr10">
|
||||
<div class="clearfix mb15">
|
||||
<p class="ml15 fl font-16 mt10">答题设置</p>
|
||||
</div>
|
||||
<div class="ml30 mr30" style="padding-bottom:20px;">
|
||||
<div class="clearfix">
|
||||
<ul>
|
||||
<!--<li class="clearfix mb20 edu-position pl30">-->
|
||||
<!--<label class="panel-form-label fl mr10">答题时长</label>-->
|
||||
<!--<input type="text" value="<%#= @exercise.time.to_i == -1 ? '' : @exercise.time %>" disabled class="fl task-form-15 task-height-40 panel-box-sizing disabled-bg">-->
|
||||
<!--<label class="fl mt8 ml5">分钟</label>-->
|
||||
<!--<div class="popup_tip_box fontGrey2" style="right:-15px; top:0px;width:405px;">-->
|
||||
<!--<em></em>-->
|
||||
<!--<span></span>-->
|
||||
<!--<p>答题时长不填写,则表示不限时长</p>-->
|
||||
<!--<p>学生答题时间即使没有超过答题时长的限制</p>-->
|
||||
<!--<p>但是已到截止时间点,则系统自动为正在答题的学生提交试卷</p>-->
|
||||
<!--</div>-->
|
||||
<!--</li>-->
|
||||
<li class="clearfix mb20 edu-position pl30">
|
||||
<label class="panel-form-label fl mr10">答题显示</label>
|
||||
<input class="magic-checkbox fl mt5 magic-checkbox_show" id="dt_1" disabled type="checkbox" <%= @exercise.question_random == 1 ? 'checked' : '' %>>
|
||||
<label class="fl" for="dt_1">题目顺序随机打乱</label>
|
||||
<span class="fl color-grey mt5">(选中则学生答题时,题目顺序按照题型随机显示)</span>
|
||||
<div class="cl"></div>
|
||||
<input class="magic-checkbox fl mt5 magic-checkbox_show" id="dt_2" disabled type="checkbox" <%= @exercise.choice_random == 1 ? 'checked' : '' %>>
|
||||
<label class="fl" for="dt_2" style="margin-left: 11%;">选项顺序随机打乱</label>
|
||||
<span class="fl color-grey mt5">(选中则学生答题时,选项顺序随机显示)</span>
|
||||
</li>
|
||||
</ul>
|
||||
<!--<ul>-->
|
||||
<!--<li class="clearfix mb20 edu-position pl30">-->
|
||||
<!--<label class="panel-form-label fl mr10">补交答题</label>-->
|
||||
<!--<input id="edit_allow_late_1" disabled="" class="magic-radio fl" type="radio" name="homework_allow_late" value="1">-->
|
||||
<!--<label for="edit_allow_late_1" class="fl mr30">允许</label>-->
|
||||
<!--<input id="edit_allow_late_0" disabled="" class="magic-radio fl" type="radio" name="homework_allow_late" value="0" checked="">-->
|
||||
<!--<label for="edit_allow_late_0" class="fl">禁止</label>-->
|
||||
<!--<div class="popup_tip_box fontGrey2" style="right:-15px; top:0px;width:405px;">-->
|
||||
<!--<em></em>-->
|
||||
<!--<span></span>-->
|
||||
<!--<p>允许补交,则在补交截止日期之前,未答题的学生可以补交答题</p>-->
|
||||
<!--<p>但是在发布截止日期~补交截止时间内才答题的学生,将被扣迟交分</p>-->
|
||||
<!--</div>-->
|
||||
<!--</li>-->
|
||||
<!--<li class="clearfix mb20 edu-position pl30">-->
|
||||
<!--<label class="panel-form-label fl mr10"> </label>-->
|
||||
<!--<label class="mt8 fl mr10">截止时间</label>-->
|
||||
<!--<input type="text" value="10" class="fl task-form-15 task-height-40 panel-box-sizing disabled-bg" disabled="" placeholder="5">-->
|
||||
<!--</li>-->
|
||||
<!--<li class="clearfix mb20 edu-position pl30">-->
|
||||
<!--<label class="panel-form-label fl mr10"> </label>-->
|
||||
<!--<label class="mt8 fl mr10">迟交扣分</label>-->
|
||||
<!--<input type="text" value="10" class="fl task-form-15 task-height-40 panel-box-sizing disabled-bg" disabled="" placeholder="5">-->
|
||||
<!--</li>-->
|
||||
<!--</ul>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bor-bottom-greyE pt10 pb10 pr10">
|
||||
<div class="clearfix mb15">
|
||||
<p class="ml15 fl font-16 mt10">公开设置</p>
|
||||
</div>
|
||||
<div class="ml30 mr30 mb15">
|
||||
<div class="clearfix">
|
||||
<ul>
|
||||
<li class="clearfix">
|
||||
<label class="panel-form-label fl mr10"> </label>
|
||||
<input class="magic-checkbox fl mt5 magic-checkbox_show" type="checkbox" disabled <%= @exercise.score_open ? 'checked' : '' %>>
|
||||
<label class="fl">公开成绩</label>
|
||||
<span class="fl color-grey">(选中则在截止时间之后对班级学生公开所有成员的成绩,否则不公开)</span>
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<label class="panel-form-label fl mr10"> </label>
|
||||
<input class="magic-checkbox fl mt5 magic-checkbox_show" type="checkbox" disabled <%= @exercise.answer_open ? 'checked' : '' %>>
|
||||
<label class="fl">公开答案</label>
|
||||
<span class="fl color-grey">(选中则在截止时间之后对班级学生公开试卷题目的答案,否则不公开)</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="<%= edit_mode ? '' : 'none' %>" id="edit_exercise_setting">
|
||||
<%= form_tag(ex_setting_exercise_path(@exercise), :method => "post", :id => 'exercise_setting_form') do |f| %>
|
||||
<div class="bor-bottom-greyE pt10 pb10 pr10">
|
||||
<div class="clearfix mb15">
|
||||
<p class="ml15 fl font-16 mt5">发布设置</p>
|
||||
</div>
|
||||
<div class="ml30 mr30">
|
||||
<div class="clearfix">
|
||||
<ul>
|
||||
<li class="clearfix mb15 edu-position pl30">
|
||||
<label class="panel-form-label fl mr10">发布时间</label>
|
||||
<input type="text" name="exercise_publish_time" readonly value="<%= format_time @exercise.publish_time %>" <%= @exercise.try(:exercise_status) > 1 ? 'disabled' : '' %> class="fl task-form-15 task-height-40 panel-box-sizing <%= @exercise.try(:exercise_status) > 1 ? 'disabled-bg' : '' %>" placeholder="请选择发布时间">
|
||||
<span class="color-orange fl ml20 mt5 none" id="exercise_publish_time_notice"><i class="fa fa-exclamation-circle mr5 color-orange"></i></span>
|
||||
<div class="popup_tip_box fontGrey2" style="right:-15px; top:0px; width:405px;">
|
||||
<em></em>
|
||||
<span></span>
|
||||
<p>发布之前,学生不会收到试卷</p>
|
||||
</div>
|
||||
</li>
|
||||
<li class="clearfix mb15 edu-position pl30">
|
||||
<label class="panel-form-label fl mr10">截止时间</label>
|
||||
<input type="text" name="exercise_end_time" readonly value="<%= format_time @exercise.end_time %>" <%= @exercise.try(:exercise_status) == 3 ? 'disabled' : '' %> class="fl task-form-15 task-height-40 panel-box-sizing <%= @exercise.try(:exercise_status) == 3 ? 'disabled-bg' : '' %>" placeholder="请选择截止时间">
|
||||
<span class="color-orange fl ml20 mt5 none" id="exercise_end_time_notice">
|
||||
<i class="fa fa-exclamation-circle mr5 color-orange"></i>
|
||||
</span>
|
||||
<span class="color-orange fl mt5 none">不能早于发布时间</span>
|
||||
</li>
|
||||
<!--<li class="clearfix mb15 edu-position pl30">-->
|
||||
<!--<label class=" panel-form-label fl mr10">结束时间</label>-->
|
||||
<!--<input type="text" name="homework_archive_time" readonly="" value="" class=" fl task-form-15 task-height-40 panel-box-sizing" placeholder="请选择结束时间">-->
|
||||
<!--<span class="color-orange fl ml20 mt5 none" id="homework_archive_time_notice"><i class="fa fa-exclamation-circle mr5 color-orange"></i></span>-->
|
||||
<!--<div class="popup_tip_box fontGrey2" style="right:-15px; top:0px;width:405px;">-->
|
||||
<!--<em></em>-->
|
||||
<!--<span></span>-->
|
||||
<!--<p>结束之后,系统自动归档试卷</p>-->
|
||||
<!--</div>-->
|
||||
<!--</li>-->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bor-bottom-greyE pt10 pb10 pr10">
|
||||
<div class="clearfix mb15">
|
||||
<p class="ml15 fl font-16 mt10">答题设置</p>
|
||||
</div>
|
||||
<div class="ml30 mr30" style="padding-bottom:20px;">
|
||||
<div class="clearfix">
|
||||
<ul>
|
||||
<!--<li class="clearfix mb20 edu-position pl30">-->
|
||||
<!--<label class="panel-form-label fl mr10">答题时长</label>-->
|
||||
<!--<input type="text" name="time" <%#= @exercise.try(:exercise_status) == 3 ? 'disabled' : '' %> value="<%#= @exercise.time.to_i == -1 ? '' : @exercise.time %>" class="fl task-form-15 task-height-40 panel-box-sizing">-->
|
||||
<!--<label class="fl mt8 ml5">分钟</label>-->
|
||||
<!--<div class="popup_tip_box fontGrey2" style="right:-15px; top:0px;width:405px;">-->
|
||||
<!--<em></em>-->
|
||||
<!--<span></span>-->
|
||||
<!--<p>答题时长不填写,则表示不限时长</p>-->
|
||||
<!--<p>学生答题时间即使没有超过答题时长的限制</p>-->
|
||||
<!--<p>但是已到截止时间点,则系统自动为正在答题的学生提交试卷</p>-->
|
||||
<!--</div>-->
|
||||
<!--</li>-->
|
||||
<li class="clearfix mb20 edu-position pl30">
|
||||
<label class="panel-form-label fl mr10">答题显示</label>
|
||||
<input name="question_random" <%= @exercise.try(:exercise_status) == 3 ? 'disabled' : '' %> class="magic-checkbox fl mt5 magic-checkbox_show" id="dt_3" type="checkbox" <%= @exercise.question_random == 1 ? 'checked' : '' %>>
|
||||
<label class="fl" for="dt_3">题目顺序随机打乱</label>
|
||||
<span class="fl color-grey mt5">(选中则学生答题时,题目顺序按照题型随机显示)</span>
|
||||
<div class="cl"></div>
|
||||
<input name="choice_random" <%= @exercise.try(:exercise_status) == 3 ? 'disabled' : '' %> class="magic-checkbox fl mt5 magic-checkbox_show" id="dt_4" type="checkbox" <%= @exercise.choice_random == 1 ? 'checked' : '' %>>
|
||||
<label class="fl" for="dt_4" style="margin-left: 11%;">选项顺序随机打乱</label>
|
||||
<span class="fl color-grey mt5">(选中则学生答题时,选项顺序随机显示)</span>
|
||||
</li>
|
||||
</ul>
|
||||
<!--<ul>-->
|
||||
<!--<li class="clearfix mb20 edu-position pl30">-->
|
||||
<!--<label class="panel-form-label fl mr10">补交答题</label>-->
|
||||
<!--<input id="edit_allow_late_2" class="magic-radio fl" type="radio" name="homework_allow_late_1" value="1">-->
|
||||
<!--<label for="edit_allow_late_2" class="fl mr30 mt3">允许</label>-->
|
||||
<!--<input id="edit_allow_late_3" class="magic-radio fl" type="radio" name="homework_allow_late_1" value="0" checked="">-->
|
||||
<!--<label for="edit_allow_late_3" class="fl mt3">禁止</label>-->
|
||||
<!--<div class="popup_tip_box fontGrey2" style="right:-15px; top:0px;width:405px;">-->
|
||||
<!--<em></em>-->
|
||||
<!--<span></span>-->
|
||||
<!--<p>允许补交,则在补交截止日期之前,未答题的学生可以补交答题</p>-->
|
||||
<!--<p>但是在发布截止日期~补交截止时间内才答题的学生,将被扣迟交分</p>-->
|
||||
<!--</div>-->
|
||||
<!--</li>-->
|
||||
<!--<li class="clearfix mb20 edu-position pl30">-->
|
||||
<!--<label class="panel-form-label fl mr10"> </label>-->
|
||||
<!--<label class="mt8 fl mr10">截止时间</label>-->
|
||||
<!--<input type="text" value="10" class="fl task-form-15 task-height-40 panel-box-sizing" placeholder="5">-->
|
||||
<!--</li>-->
|
||||
<!--<li class="clearfix mb20 edu-position pl30">-->
|
||||
<!--<label class="panel-form-label fl mr10"> </label>-->
|
||||
<!--<label class="mt8 fl mr10">迟交扣分</label>-->
|
||||
<!--<input type="text" value="10" class="fl task-form-15 task-height-40 panel-box-sizing" placeholder="5">-->
|
||||
<!--</li>-->
|
||||
<!--</ul>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pt10 pb10 pr10">
|
||||
<div class="clearfix mb15">
|
||||
<p class="ml15 fl font-16 mt10">公开设置</p>
|
||||
</div>
|
||||
<div class="ml30 mr30">
|
||||
<div class="clearfix">
|
||||
<ul>
|
||||
<li class="clearfix">
|
||||
<label class="panel-form-label fl mr10"> </label>
|
||||
<input name="score_open" class="magic-checkbox fl magic-checkbox_show" type="checkbox" id="public_scroe" <%= @exercise.score_open ? 'checked' : '' %>>
|
||||
<label class="fl" for="public_scroe" style="top:0px">公开成绩</label>
|
||||
<span class="fl color-grey">(选中则在截止时间之后对班级学生公开所有成员的成绩,否则不公开)</span>
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<label class="panel-form-label fl mr10"> </label>
|
||||
<input name="answer_open" class="magic-checkbox fl magic-checkbox_show" type="checkbox" id="public_answer" <%= @exercise.answer_open ? 'checked' : '' %>>
|
||||
<label class="fl" for="public_answer" style="top:0px">公开答案</label>
|
||||
<span class="fl color-grey">(选中则在截止时间之后对班级学生公开试卷题目的答案,否则不公开)</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!--主观题评分设置-->
|
||||
<!--<div class="bor-bottom-greyE pt10 pb10 pr10">-->
|
||||
<!--<div class="none" id="show_late_setting">-->
|
||||
<!--<div class="clearfix mb15">-->
|
||||
<!--<p class="ml15 fl font-16 mt10">主观题评分设置</p>-->
|
||||
<!--</div>-->
|
||||
<!--<div class="ml30 mr30" style="padding-bottom:20px;">-->
|
||||
<!--<div class="clearfix">-->
|
||||
<!--<ul>-->
|
||||
<!--<li class="clearfix mb20 edu-position pl30">-->
|
||||
<!--<label class="panel-form-label fl mr10">助教评分</label>-->
|
||||
<!--<input class="magic-radio fl mt5 magic-checkbox_show" id="zg_1" name="zg[]_1" disabled="" type="radio" checked="">-->
|
||||
<!--<label class="fl" for="zg_1">普通模式</label>-->
|
||||
<!--<span class="fl color-grey mt5">(选中则取各助教最终评分的平均分)</span>-->
|
||||
<!--<div class="cl"></div>-->
|
||||
<!--<input class="magic-radio fl mt5 magic-checkbox_show" id="zg_2" name="zg[]_1" disabled="" type="radio">-->
|
||||
<!--<label class="fl" for="zg_2" style="margin-left: 11%;">复审模式</label>-->
|
||||
<!--<span class="fl color-grey mt5">(选中则只取最终次的助教评分)</span>-->
|
||||
<!--</li>-->
|
||||
<!--</ul>-->
|
||||
<!--<ul>-->
|
||||
<!--<li class="clearfix mb20 edu-position pl30">-->
|
||||
<!--<label class="panel-form-label fl mr10">最终成绩</label>-->
|
||||
<!--<div class="popup_tip_box fontGrey2" style="right:-15px; top:0px;width:405px;">-->
|
||||
<!--<em></em>-->
|
||||
<!--<span></span>-->
|
||||
<!--<p>计算说明</p>-->
|
||||
<!--<p class="mb10">教师评分*其百分比+助教评分+其百分比+迟交扣分</p>-->
|
||||
<!--<p>注意</p>-->
|
||||
<!--<p>非零百分比的评分选项,在没有评分记录的情况下,其百分比平摊到另外</p><p>的评分选项上。例如教师评分60% + 助教评分40% ,学生A没有得到</p><p>教师评分,则最终成绩将按照助教评分100% 进行计算 </p>-->
|
||||
<!--</div>-->
|
||||
<!--</li>-->
|
||||
<!--<li class="clearfix mb20 edu-position pl30">-->
|
||||
<!--<label class="panel-form-label fl mr10"> </label>-->
|
||||
<!--<label class="mt8 fl mr10">教师评分</label>-->
|
||||
<!--<input type="text" value="10" class="fl task-form-15 task-height-40 panel-box-sizing disabled-bg" disabled="" placeholder="5">-->
|
||||
|
||||
<!--</li>-->
|
||||
<!--<li class="clearfix mb20 edu-position pl30">-->
|
||||
<!--<label class="panel-form-label fl mr10"> </label>-->
|
||||
<!--<label class="mt8 fl mr10">助教评分</label>-->
|
||||
<!--<input type="text" value="10" class="fl task-form-15 task-height-40 panel-box-sizing disabled-bg" disabled="" placeholder="5">-->
|
||||
<!--</li>-->
|
||||
<!--</ul>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--<div class="" id="edit_late_setting">-->
|
||||
<!--<div class="clearfix mb15">-->
|
||||
<!--<p class="ml15 fl font-16 mt10">主观题评分设置</p>-->
|
||||
<!--</div>-->
|
||||
<!--<div class="ml30 mr30" style="padding-bottom:20px;">-->
|
||||
<!--<div class="clearfix">-->
|
||||
<!--<ul>-->
|
||||
<!--<li class="clearfix mb20 edu-position pl30">-->
|
||||
<!--<label class="panel-form-label fl mr10">助教评分</label>-->
|
||||
<!--<input class="magic-radio fl mt5 magic-checkbox_show" id="zg_3" name="zg[]_2" type="radio" checked="">-->
|
||||
<!--<label class="fl" for="zg_3">普通模式</label>-->
|
||||
<!--<span class="fl color-grey mt5">(选中则取各助教最终评分的平均分)</span>-->
|
||||
<!--<div class="cl"></div>-->
|
||||
<!--<input class="magic-radio fl mt5 magic-checkbox_show" id="zg_4" name="zg[]_2" type="radio" checked="">-->
|
||||
<!--<label class="fl" for="zg_4" style="margin-left: 11%;">复审模式</label>-->
|
||||
<!--<span class="fl color-grey mt5">(选中则只取最终次的助教评分)</span>-->
|
||||
<!--</li>-->
|
||||
<!--</ul>-->
|
||||
<!--<ul>-->
|
||||
<!--<li class="clearfix mb20 edu-position pl30">-->
|
||||
<!--<label class="panel-form-label fl mr10">最终成绩</label>-->
|
||||
|
||||
<!--<div class="popup_tip_box fontGrey2" style="right:-15px; top:0px;width:405px;">-->
|
||||
<!--<em></em>-->
|
||||
<!--<span></span>-->
|
||||
<!--<p>计算说明</p>-->
|
||||
<!--<p class="mb10">教师评分*其百分比+助教评分*其百分比-迟交扣分</p>-->
|
||||
<!--<p>注意</p>-->
|
||||
<!--<p>非零百分比的评分选项,在没有评分记录的情况下,其百分比平摊到另外</p><p>的评分选项上。例如教师评分60% + 助教评分40% ,学生A没有得到</p><p>教师评分,则最终成绩将按照助教评分100% 进行计算 </p>-->
|
||||
<!--</div>-->
|
||||
<!--</li>-->
|
||||
<!--<li class="clearfix mb20 edu-position pl30">-->
|
||||
<!--<label class="panel-form-label fl mr10"> </label>-->
|
||||
<!--<label class="mt8 fl mr10">教师评分</label>-->
|
||||
<!--<input type="text" value="10" class="fl task-form-15 task-height-40 panel-box-sizing" placeholder="5">-->
|
||||
<!--</li>-->
|
||||
<!--<li class="clearfix mb20 edu-position pl30">-->
|
||||
<!--<label class="panel-form-label fl mr10"> </label>-->
|
||||
<!--<label class="mt8 fl mr10">助教评分</label>-->
|
||||
<!--<input type="text" value="10" class="fl task-form-15 task-height-40 panel-box-sizing" placeholder="5">-->
|
||||
<!--</li>-->
|
||||
<!--</ul>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
|
||||
<div class="clearfix mt15 mb15 mr15 pr10 <%= edit_mode ? '' : 'none' %>" id="exam_setting_submit_block">
|
||||
<a href="javascript:void(0);" onclick="ex_setting_form_submit();" class="task-btn task-btn-blue fr">保存</a>
|
||||
<a href="javascript:void(0);" onclick="s_op_confirm_box('<%= student_exercise_list_exercise_path(@exercise) %>', '修改的内容将全部丢失<br/>是否确认取消保存')" class="task-btn fr mr10">取消</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -82,7 +82,7 @@
|
|||
|
||||
<div class="clearfix ml15 mt10 mb15">
|
||||
<% question_list.each_with_index do |eq, index| %>
|
||||
<span id="ex_commit_status_<%= eq.id %>" class="checkstatus_box_big <%= User.current.exercise_answer.where(:exercise_question_id => eq.id).count > 0 ? 'post_btn_white' : 'post_btn_grey' %>"><%= index + 1 %></span>
|
||||
<a href="#mao<%= index + 1 %>" style="cursor:pointer" id="ex_commit_status_<%= eq.id %>" class="checkstatus_box_big <%= User.current.exercise_answer.where(:exercise_question_id => eq.id).count > 0 ? 'post_btn_white' : 'post_btn_grey' %>"><%= index + 1 %></a>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -90,9 +90,9 @@
|
|||
<% question_list.each_with_index do |exercise_question, i| %>
|
||||
<div class="question_item_con font-14 user_bg_shadow bor-grey-e mb20 pt15">
|
||||
<div class="clearfix pl15 pr15">
|
||||
<p class="fl font-15">第<%= i + 1 %>题:<span class="color-orange03 ml10">[<%= exercise_question.question_type_name %>]</span><span class="ml10"><%= exercise_question.question_score %></span>分</p>
|
||||
<p class="fl font-15" id="mao<%=i+1 %>">第<%= i + 1 %>题:<span class="color-orange03 ml10">[<%= exercise_question.question_type_name %>]</span><span class="ml10"><%= exercise_question.question_score %></span>分</p>
|
||||
</div>
|
||||
<pre class="exercise_que_title pl15 pr15"><%= exercise_question.question_title %></pre>
|
||||
<div class="pl15 pr15 justify"><%= exercise_question.question_title.html_safe %></div>
|
||||
<% case exercise_question.question_type %>
|
||||
<% when 1 %>
|
||||
<div class="pl15 pr15 mb15">
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
<div class="clearfix ml80 mt10 mb5">
|
||||
<% @exercise.exercise_questions.where(:question_type => [1, 2, 3]).each_with_index do |eq, index| %>
|
||||
<% is_correct = answer_is_correct(eq, user) %>
|
||||
<span class="checkstatus_box_big <%= is_correct ? 'post_btn_green' : 'post_btn_red' %>"><%= eq.question_number %></span>
|
||||
<a href="#mao<%= eq.question_number%>" style="cursor:pointer" class="checkstatus_box_big color_white <%= is_correct ? 'post_btn_green' : 'post_btn_red' %>"><%= eq.question_number %></a>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
|
|
@ -57,7 +57,7 @@
|
|||
<div class="clearfix ml80 mt10 mb15">
|
||||
<% @exercise.exercise_questions.where(:question_type => 4).each_with_index do |eq, index| %>
|
||||
<% ea = User.current.exercise_answer.where(:exercise_question_id => eq.id).first %>
|
||||
<span id="ex_comment_status_<%= eq.id %>" class="checkstatus_box_big <%= (ea && ea.score != -1) ? 'post_btn_white' : 'post_btn_grey' %>"><%= eq.question_number %></span>
|
||||
<a href="#mao<%= eq.question_number%>" style="cursor:pointer" id="ex_comment_status_<%= eq.id %>" class="checkstatus_box_big <%= (ea && ea.score != -1) ? 'post_btn_white' : 'post_btn_grey' %>"><%= eq.question_number %></a>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
<% @exercise.exercise_questions.each_with_index do |exercise_question, i| %>
|
||||
<div class="question_item_con font-14 user_bg_shadow bor-grey-e mb20 pt15">
|
||||
<div class="clearfix pl15 pr15">
|
||||
<p class="fl font-15">第<%= exercise_question.question_number %>题:<span class="color-orange03 ml10">[<%= exercise_question.question_type_name %>]</span><span class="ml10"><%= exercise_question.question_score %>分</span><span class="ml10 color-red"><%= question_commit_status exercise_question, @exercise_user.user %></span></p>
|
||||
<p class="fl font-15" id="mao<%= exercise_question.question_number %>">第<%= exercise_question.question_number %>题:<span class="color-orange03 ml10">[<%= exercise_question.question_type_name %>]</span><span class="ml10"><%= exercise_question.question_score %>分</span><span class="ml10 color-red"><%= question_commit_status exercise_question, @exercise_user.user %></span></p>
|
||||
<% if exercise_question.question_type != 4 %>
|
||||
<% is_correct = answer_is_correct(exercise_question, user) %>
|
||||
<p class="fr"><span class="<%= is_correct ? 'color-light-green' : 'color-red' %> mr3"><i class="mr5 fa <%= is_correct ? 'fa-check' : 'fa-close' %> font-14"></i><%= is_correct ? exercise_question.question_score : 0 %></span>分</p>
|
||||
|
|
@ -75,7 +75,7 @@
|
|||
<p class="fr" id="multi_q_score_<%= exercise_question.id %>"><span class="<%= answer.empty? ? 'color-red' : (answer.first.score == -1 || answer.first.score == 0 ? "color-red" : "color-light-green") %> mr3"><%= answer.empty? ? 0 : (answer.first.score == -1 ? "未批" : answer.first.score) %></span><%= answer.empty? ? "分" : (answer.first.score == -1 ? "" : "分") %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
<pre class="exercise_que_title pl15 pr15"><%= exercise_question.question_title %></pre>
|
||||
<div class="pl15 pr15 justify"><%= exercise_question.question_title.html_safe %></div>
|
||||
<% case exercise_question.question_type %>
|
||||
<% when 1 %>
|
||||
<div class="pl15 pr15 mb15">
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
<li><%= link_to "编辑", edit_exercise_path(exercise) %></li>
|
||||
<% end %>
|
||||
<!--<li><%#= link_to "预览", exercise_path(exercise) %></li>-->
|
||||
<li><%= link_to "设置", setting_exercise_path(exercise) %></li>
|
||||
<li><%= link_to "设置", student_exercise_list_exercise_path(exercise, :tab => 3) %></li>
|
||||
<li><%= link_to "导出成绩", student_exercise_list_exercise_path(exercise.id,:course_id => @course.id, :format => 'xls') %></li>
|
||||
<% unless exercise.is_public %>
|
||||
<li id="set_exercise_public_<%= exercise.id %>">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<% if exercise.id %>
|
||||
<%= form_for(ExerciseQuestion.new,
|
||||
<div nhname="new_exercise_mc_q">
|
||||
<% eq = ExerciseQuestion.new %>
|
||||
<%= form_for(eq,
|
||||
:html => {:multipart => true},
|
||||
:url => create_exercise_question_exercise_path(exercise.id),
|
||||
:remote => true ) do |f| %>
|
||||
|
|
@ -12,7 +14,9 @@
|
|||
</div>
|
||||
<li class="clearfix pr mb20">
|
||||
<label class="panel-form-label fl"><span class="mr10">题目</span></label>
|
||||
<textarea name="question_title" id="poll_questions_title" class="panel-form-width2-690 fl panel-box-sizing" placeholder="请输入单选题的题干" type="text" oninput="autoHeight('#poll_questions_title',30)"></textarea>
|
||||
<!--<textarea name="question_title" id="poll_questions_title" class="panel-form-width2-690 fl panel-box-sizing" placeholder="请输入单选题的题干" type="text" oninput="autoHeight('#poll_questions_title',30)"></textarea>-->
|
||||
<textarea id="poll_questions_title" name="question_title" class="panel-form-width2-690 fl panel-box-sizing undis"></textarea>
|
||||
|
||||
</li>
|
||||
<input style="display: none;" name="exercise_choice" id="exercise_choice_1"/>
|
||||
<li class="clearfix pr mb20">
|
||||
|
|
@ -58,6 +62,7 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<% if exercise.id %>
|
||||
<%= form_for(ExerciseQuestion.new,
|
||||
<div nhname="new_exercise_mc_q">
|
||||
<%= form_for(ExerciseQuestion.new,
|
||||
:html => { :multipart => true },
|
||||
:url=>create_exercise_question_exercise_path(exercise.id),
|
||||
:remote=>true ) do |f| %>
|
||||
|
|
@ -13,7 +14,7 @@
|
|||
</div>
|
||||
<li class="clearfix pr mb20">
|
||||
<label class="panel-form-label fl"><span class="mr10">题目</span></label>
|
||||
<textarea name="question_title" id="poll_questions_title" class="panel-form-width2-690 fl panel-box-sizing" placeholder="请输入多选题的题干" type="text" oninput="autoHeight('#poll_questions_title',30)"></textarea>
|
||||
<textarea id="poll_questions_title" name="question_title" class="panel-form-width2-690 fl panel-box-sizing undis"></textarea>
|
||||
</li>
|
||||
<li class="clearfix pr mb20">
|
||||
<label class="panel-form-label fl">
|
||||
|
|
@ -55,6 +56,7 @@
|
|||
</li>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<% if exercise.id %>
|
||||
<%= form_for(ExerciseQuestion.new,
|
||||
<div nhname="new_exercise_mc_q">
|
||||
<%= form_for(ExerciseQuestion.new,
|
||||
:html => { :multipart => true },
|
||||
:url=>create_exercise_question_exercise_path(exercise.id),
|
||||
:remote=>true ) do |f| %>
|
||||
|
|
@ -9,7 +10,7 @@
|
|||
<input name="quest_id" id="quest_id" value="0" type="hidden">
|
||||
<li class="clearfix pr mb20">
|
||||
<label class="panel-form-label fl"><span class="mr10">题目</span></label>
|
||||
<textarea maxlength="250" class="panel-form-width2-690 fl panel-box-sizing" name="question_title" id="poll_questions_title" placeholder="请输入简答题的题干" type="text" oninput="autoHeight('#poll_questions_title',30)"></textarea>
|
||||
<textarea id="poll_questions_title" name="question_title" class="panel-form-width2-690 fl panel-box-sizing undis"></textarea>
|
||||
</li>
|
||||
<li class="clearfix pr mb20">
|
||||
<label class="panel-form-label fl"><span class="fr mr10 color-grey" name="option_spans">参考答案</span></label>
|
||||
|
|
@ -29,6 +30,7 @@
|
|||
</li>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
|
|
|
|||
|
|
@ -1,9 +1,34 @@
|
|||
<a href="javascript:void(0);" class="fl mr20 add_item_part" onclick="add_MC();"><i class="fa fa-plus-circle color-light-green mr5"></i>单选题</a>
|
||||
<a href="javascript:void(0);" class="fl mr20 add_item_part" onclick="add_MCQ();"><i class="fa fa-plus-circle color-light-green mr5"></i>多选题</a>
|
||||
<a href="javascript:void(0);" class="fl mr20 add_item_part" onclick="add_single();"><i class="fa fa-plus-circle color-light-green mr5"></i>填空题</a>
|
||||
<a href="javascript:void(0);" class="fl add_item_part" onclick="add_multi();"><i class="fa fa-plus-circle color-light-green mr5"></i>简答题</a>
|
||||
<% content_for :header_tags do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
|
||||
<% end %>
|
||||
|
||||
<a href="javascript:void(0);" class="fl mr20 add_item_part" onclick="add_MC();">+ 单选题</a>
|
||||
<a href="javascript:void(0);" class="fl mr20 add_item_part" onclick="add_MCQ();">+ 多选题</a>
|
||||
<a href="javascript:void(0);" class="fl mr20 add_item_part" onclick="add_single();">+ 填空题</a>
|
||||
<a href="javascript:void(0);" class="fl add_item_part" onclick="add_multi();">+ 简答题</a>
|
||||
|
||||
<div id="hidden_div_block" class="undis">
|
||||
<textarea style="display: none" id="hidden_textarea"></textarea>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
KindEditor.ready(function(K){
|
||||
$("#hidden_div_block").each(function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.div_form = $(this);
|
||||
params.placeholder = "请输入单选题的题干";
|
||||
|
||||
params.textarea = $("#hidden_textarea",params.div_form);
|
||||
if(params.textarea.data('init') == undefined) {
|
||||
params.editor = init_exercise_quetison_editor(params);
|
||||
//new_quetion_editor = params.editor;
|
||||
params.textarea.data('init', 1);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
function add_MC(){
|
||||
var forms = $("form.new_exercise_question");
|
||||
if($("#exercise_head_edit").is(":visible")){
|
||||
|
|
@ -11,10 +36,27 @@
|
|||
}else if(forms.length > 0){
|
||||
notice_box("请先保存正在编辑的题目再新建。");
|
||||
} else{
|
||||
//$.get("<%#= new_exercise_question_path(:exercise => @exercise, :type => "MC") %>");
|
||||
$("#new_poll_question").html("<%= escape_javascript(render :partial => 'new_MC', :locals => {:exercise=>@exercise}) %>");
|
||||
$("#poll_questions_title").focus();
|
||||
//sd_create_editor_from_data(<%#= @exercise.id %>, null, "100%", "<%#= @exercise.class.to_s %>");
|
||||
KindEditor.ready(function(K){
|
||||
$("div[nhname='new_exercise_mc_q']").each(function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.div_form = $(this);
|
||||
params.form = $("form",params.div_form);
|
||||
params.placeholder = "请输入单选题的题干";
|
||||
if(params.form==undefined || params.form.length==0){
|
||||
return;
|
||||
}
|
||||
params.textarea = $("textarea[name='question_title']",params.div_form);
|
||||
if(params.textarea.data('init') == undefined) {
|
||||
params.editor = init_exercise_quetison_editor(params);
|
||||
new_quetion_title_editor = params.editor;
|
||||
params.textarea.data('init', 1);
|
||||
}
|
||||
});
|
||||
});
|
||||
//div_form = $("div[nhname='new_exercise_mc_q']");
|
||||
//$(".ke-edit", div_form).css("height","48px");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -27,6 +69,24 @@
|
|||
} else{
|
||||
$("#new_poll_question").html("<%= escape_javascript(render :partial => 'new_MCQ', :locals => {:exercise=>@exercise}) %>");
|
||||
$("#poll_questions_title").focus();
|
||||
KindEditor.ready(function(K){
|
||||
$("div[nhname='new_exercise_mc_q']").each(function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.div_form = $(this);
|
||||
params.form = $("form",params.div_form);
|
||||
params.placeholder = "请输入多选题的题干";
|
||||
if(params.form==undefined || params.form.length==0){
|
||||
return;
|
||||
}
|
||||
params.textarea = $("textarea[name='question_title']",params.div_form);
|
||||
if(params.textarea.data('init') == undefined) {
|
||||
params.editor = init_exercise_quetison_editor(params);
|
||||
new_quetion_title_editor = params.editor;
|
||||
params.textarea.data('init', 1);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -39,6 +99,24 @@
|
|||
} else{
|
||||
$("#new_poll_question").html("<%= escape_javascript(render :partial => 'new_single', :locals => {:exercise=>@exercise}) %>");
|
||||
$("#poll_questions_title").focus();
|
||||
KindEditor.ready(function(K){
|
||||
$("div[nhname='new_exercise_mc_q']").each(function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.div_form = $(this);
|
||||
params.form = $("form",params.div_form);
|
||||
params.placeholder = "请输入填空题的题干(注意:目前仅支持一个空)";
|
||||
if(params.form==undefined || params.form.length==0){
|
||||
return;
|
||||
}
|
||||
params.textarea = $("textarea[name='question_title']",params.div_form);
|
||||
if(params.textarea.data('init') == undefined) {
|
||||
params.editor = init_exercise_quetison_editor(params);
|
||||
new_quetion_title_editor = params.editor;
|
||||
params.textarea.data('init', 1);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -51,6 +129,24 @@
|
|||
} else{
|
||||
$("#new_poll_question").html("<%= escape_javascript(render :partial => 'new_multi', :locals => {:exercise=>@exercise}) %>");
|
||||
$("#poll_questions_title").focus();
|
||||
KindEditor.ready(function(K){
|
||||
$("div[nhname='new_exercise_mc_q']").each(function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.div_form = $(this);
|
||||
params.form = $("form",params.div_form);
|
||||
params.placeholder = "请输入简答题的题干";
|
||||
if(params.form==undefined || params.form.length==0){
|
||||
return;
|
||||
}
|
||||
params.textarea = $("textarea[name='question_title']",params.div_form);
|
||||
if(params.textarea.data('init') == undefined) {
|
||||
params.editor = init_exercise_quetison_editor(params);
|
||||
new_quetion_title_editor = params.editor;
|
||||
params.textarea.data('init', 1);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<% if exercise.id %>
|
||||
<%= form_for(ExerciseQuestion.new,
|
||||
<div nhname="new_exercise_mc_q">
|
||||
<%= form_for(ExerciseQuestion.new,
|
||||
:html => { :multipart => true },
|
||||
:url=>create_exercise_question_exercise_path(exercise.id),
|
||||
:remote=>true ) do |f| %>
|
||||
|
|
@ -9,7 +10,7 @@
|
|||
<input name="question_type" value="3" type="hidden">
|
||||
<input name="quest_id" id="quest_id" value="0" type="hidden">
|
||||
<label class="panel-form-label fl"><span class="mr10">题目</span></label>
|
||||
<textarea maxlength="250" class="panel-form-width2-690 fl panel-box-sizing" name="question_title" id="poll_questions_title" placeholder="请输入填空题的题干(注意:目前仅支持一个空)" type="text" oninput="autoHeight('#poll_questions_title',30)"></textarea>
|
||||
<textarea id="poll_questions_title" name="question_title" class="panel-form-width2-690 fl panel-box-sizing undis"></textarea>
|
||||
</li>
|
||||
<li class="clearfix pr mb20">
|
||||
<label class="panel-form-label fl"><span class="fr mr10 color-grey" name="fill_span">答案 一</span></label>
|
||||
|
|
@ -38,6 +39,7 @@
|
|||
</li>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<a href="javascript:void(0)" onclick="exQuestionEdit(<%= exercise_question.id%>);"><i data-tip-down="编辑" class="fa fa-pencil color-orange05"></i></a>
|
||||
</p>
|
||||
</div>
|
||||
<pre class="exercise_que_title pl15 pr15"><%= exercise_question.question_title %></pre>
|
||||
<div class="pl15 pr15 justify upload_img table_maxWidth"><%= exercise_question.question_title.html_safe %></div>
|
||||
<div class="pl15 pr15 mb10">
|
||||
<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>
|
||||
<li class="clearfix">
|
||||
|
|
@ -41,11 +41,23 @@
|
|||
} else{
|
||||
$("#insert_new_poll_question_"+quest_id).html("<%= escape_javascript(render :partial => 'new_MC', :locals => {:exercise=>@exercise}) %>");
|
||||
$("#quest_id").val(quest_id);
|
||||
$("#poll_questions_title").focus();
|
||||
$(".questionTitle").on("input",function(){
|
||||
$(this).height(30);
|
||||
var scrollVal = $(this)[0].scrollHeight;
|
||||
$(this).height(scrollVal);
|
||||
KindEditor.ready(function(K){
|
||||
$("div[nhname='new_exercise_mc_q']").each(function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.div_form = $(this);
|
||||
params.form = $("form",params.div_form);
|
||||
params.placeholder = "请输入单选题的题干";
|
||||
if(params.form==undefined || params.form.length==0){
|
||||
return;
|
||||
}
|
||||
params.textarea = $("textarea[name='question_title']",params.div_form);
|
||||
if(params.textarea.data('init') == undefined) {
|
||||
params.editor = init_exercise_quetison_editor(params);
|
||||
new_quetion_title_editor = params.editor;
|
||||
params.textarea.data('init', 1);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<a href="javascript:void(0)" onclick="exQuestionEdit(<%= exercise_question.id%>);"><i data-tip-down="编辑" class="fa fa-pencil color-orange05"></i></a>
|
||||
</p>
|
||||
</div>
|
||||
<pre class="exercise_que_title pl15 pr15"><%= exercise_question.question_title %></pre>
|
||||
<div class="pl15 pr15 justify upload_img table_maxWidth"><%= exercise_question.question_title.html_safe %></div>
|
||||
<div class="pl15 pr15 mb10">
|
||||
<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>
|
||||
<li class="clearfix">
|
||||
|
|
@ -40,11 +40,23 @@
|
|||
} else {
|
||||
$("#insert_new_poll_question_"+quest_id).html("<%= escape_javascript(render :partial => 'new_MCQ', :locals => {:exercise=>@exercise}) %>");
|
||||
$("#quest_id").val(quest_id);
|
||||
$("#poll_questions_title").focus();
|
||||
$(".questionTitle").on("input",function(){
|
||||
$(this).height(30);
|
||||
var scrollVal = $(this)[0].scrollHeight;
|
||||
$(this).height(scrollVal);
|
||||
KindEditor.ready(function(K){
|
||||
$("div[nhname='new_exercise_mc_q']").each(function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.div_form = $(this);
|
||||
params.form = $("form",params.div_form);
|
||||
params.placeholder = "请输入多选题的题干";
|
||||
if(params.form==undefined || params.form.length==0){
|
||||
return;
|
||||
}
|
||||
params.textarea = $("textarea[name='question_title']",params.div_form);
|
||||
if(params.textarea.data('init') == undefined) {
|
||||
params.editor = init_exercise_quetison_editor(params);
|
||||
new_quetion_title_editor = params.editor;
|
||||
params.textarea.data('init', 1);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}else {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<a href="javascript:void(0)" onclick="exQuestionEdit(<%= exercise_question.id%>);"><i data-tip-down="编辑" class="fa fa-pencil color-orange05"></i></a>
|
||||
</p>
|
||||
</div>
|
||||
<pre class="exercise_que_title pl15 mb10 pr15"><%= exercise_question.question_title %></pre>
|
||||
<div class="pl15 pr15 justify upload_img table_maxWidth"><%= exercise_question.question_title.html_safe %></div>
|
||||
<div class="clearfix bor-top-greyE padding15 answer_con">
|
||||
<p>参考答案:</p>
|
||||
<pre class="exercise_que_title" style="text-align:justify;"><%= exercise_question.exercise_standard_answers.count > 0 ? exercise_question.exercise_standard_answers.first.answer_text : "无"%></pre>
|
||||
|
|
@ -33,11 +33,23 @@
|
|||
} else {
|
||||
$("#insert_new_poll_question_"+quest_id).html("<%= escape_javascript(render :partial => 'new_multi', :locals => {:exercise=>@exercise}) %>");
|
||||
$("#quest_id").val(quest_id);
|
||||
$("#poll_questions_title").focus();
|
||||
$(".questionTitle").on("input",function(){
|
||||
$(this).height(30);
|
||||
var scrollVal = $(this)[0].scrollHeight;
|
||||
$(this).height(scrollVal);
|
||||
KindEditor.ready(function(K){
|
||||
$("div[nhname='new_exercise_mc_q']").each(function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.div_form = $(this);
|
||||
params.form = $("form",params.div_form);
|
||||
params.placeholder = "请输入简答题的题干";
|
||||
if(params.form==undefined || params.form.length==0){
|
||||
return;
|
||||
}
|
||||
params.textarea = $("textarea[name='question_title']",params.div_form);
|
||||
if(params.textarea.data('init') == undefined) {
|
||||
params.editor = init_exercise_quetison_editor(params);
|
||||
new_quetion_title_editor = params.editor;
|
||||
params.textarea.data('init', 1);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<a href="javascript:void(0)" onclick="exQuestionEdit(<%= exercise_question.id%>);"><i data-tip-down="编辑" class="fa fa-pencil color-orange05"></i></a>
|
||||
</p>
|
||||
</div>
|
||||
<pre class="exercise_que_title pl15 pr15"><%= exercise_question.question_title %></pre>
|
||||
<div class="pl15 pr15 justify upload_img table_maxWidth"><%= exercise_question.question_title.html_safe %></div>
|
||||
<div class="pl15 pr15 pt10 pb10 bor-top-greyE">
|
||||
<% exercise_question.exercise_standard_answers.reorder("created_at").each_with_index do |exercise_choice,index| %>
|
||||
<p>候选答案<%= convert_to_chi_num(index+1) %>:<%= exercise_choice.answer_text%></p>
|
||||
|
|
@ -34,11 +34,23 @@
|
|||
} else {
|
||||
$("#insert_new_poll_question_"+quest_id).html("<%= escape_javascript(render :partial => 'new_single', :locals => {:exercise=>@exercise}) %>");
|
||||
$("#quest_id").val(quest_id);
|
||||
$("#poll_questions_title").focus();
|
||||
$(".questionTitle").on("input",function(){
|
||||
$(this).height(30);
|
||||
var scrollVal = $(this)[0].scrollHeight;
|
||||
$(this).height(scrollVal);
|
||||
KindEditor.ready(function(K){
|
||||
$("div[nhname='new_exercise_mc_q']").each(function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.div_form = $(this);
|
||||
params.form = $("form",params.div_form);
|
||||
params.placeholder = "请输入填空题的题干(注意:目前仅支持一个空)";
|
||||
if(params.form==undefined || params.form.length==0){
|
||||
return;
|
||||
}
|
||||
params.textarea = $("textarea[name='question_title']",params.div_form);
|
||||
if(params.textarea.data('init') == undefined) {
|
||||
params.editor = init_exercise_quetison_editor(params);
|
||||
new_quetion_title_editor = params.editor;
|
||||
params.textarea.data('init', 1);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<div class="edu-con-top user_bg_shadow bor-grey-e clearfix mb20">
|
||||
<p class="ml15 color-grey3 fl">编辑试卷</p>
|
||||
<%= link_to "返回", student_exercise_list_exercise_path(@exercise), :class => "fr font-12 color-grey mr15 mt5" %>
|
||||
<%= link_to "设置", setting_exercise_path(@exercise), :class => "fr font-12 mr15 mt5 color-grey" %>
|
||||
<%= link_to "设置", student_exercise_list_exercise_path(@exercise, :tab => 3), :class => "fr font-12 mr15 mt5 color-grey" %>
|
||||
</div>
|
||||
|
||||
<%= render :partial => "exercise/edu_edit_form", :locals => {:is_edit => true} %>
|
||||
|
|
|
|||
|
|
@ -22,98 +22,211 @@
|
|||
<span><%= @exercise.exercise_name %></span>
|
||||
</p>
|
||||
<%= link_to "返回", exercise_index_path(:course_id => @course.id), :class => "fr font-12 mr15 mt3 color-grey" %>
|
||||
<% if @is_teacher %>
|
||||
<%= link_to "设置", setting_exercise_path(@exercise), :class => "fr font-12 mr15 mt3 color-grey" %>
|
||||
<% else %>
|
||||
<!--学生查看时显示-->
|
||||
<%= link_to "查看设置", setting_exercise_path(@exercise), :class => "fr font-12 mr15 mt3 color-grey" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="edu-tab clearfix mb20">
|
||||
<ul id="edu-tab-nav" class="border-bottom-orange">
|
||||
<li id="edu-tab-nav-2" class="new-tab-nav background-orange">
|
||||
<li id="edu-tab-nav-1" class="new-tab-nav background-orange" onclick="HoverLi(1);">
|
||||
<a href="javascript:void(0);" class="tab_type">答题统计</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div id="list_count" class="user_bg_shadow bor-grey-e padding15">
|
||||
<!--老师显示部分-->
|
||||
<% if @is_teacher %>
|
||||
<form id="exercise_user_search_form">
|
||||
<li class="clearfix mb5">
|
||||
<%= link_to "导出成绩", student_exercise_list_exercise_path(@exercise, :course_id => @course.id, :format => 'xls'), :id => "export_exercise_work", :class => "fr white-btn orange-btn ml10 mt8" %>
|
||||
<div class="edu-find fr mr40 with20 pr">
|
||||
<div class="edu-find-input">
|
||||
<input type="text" class="with100 panel-box-sizing" maxlength="20" placeholder="姓名、学号关键字检索" value="<%= @name %>" id="student_user_name">
|
||||
<!--<i class="fa fa-close mr5 color-grey edu-close" onclick="colse_searchbox();"></i>-->
|
||||
<span class="edu-close" onclick="clear_searchbox();" data-tip-down="关闭">×</span>
|
||||
</div>
|
||||
<a href="javascript:void(0);" onclick="SearchByName_ex();" class="edu-open font-16 color-grey "><i class="fa fa-search"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
<input id="exercise_id" type="hidden" value="<%= @exercise.id %>">
|
||||
<li class="clearfix mb5">
|
||||
<span class="ml33 fl mr10 color-grey">你的评阅:</span>
|
||||
<span class="fl mr25">
|
||||
<a href="javascript:void(0);" id="ex_comment_no_limit" class="<%= @comment.blank? ? 'color-orange03' : '' %>">不限</a>
|
||||
</span>
|
||||
<input id="not_comment" class="magic-checkbox fl" type="checkbox" value="0" name="ex_comment[]" <%= !@comment.blank? && @comment.include?('0') ? 'checked' : '' %>>
|
||||
<label for="not_comment" class="fl mr25" style="top: 0px;">未评<span>(<%= un_commit_num @exercise %>)</span></label>
|
||||
<input id="has_comment" class="magic-checkbox fl" type="checkbox" value="1" name="ex_comment[]" <%= !@comment.blank? && @comment.include?('1') ? 'checked' : '' %>>
|
||||
<label for="has_comment" class="fl mr25" style="top: 0px;">已评<span>(<%= has_commit_num @exercise %>)</span></label>
|
||||
</li>
|
||||
<li class="clearfix mb5">
|
||||
<span class="ml33 fl mr10 color-grey">作品状态:</span>
|
||||
<span class="fl mr25">
|
||||
<a href="javascript:void(0);" id="ex_status_no_limit" class="<%= @status.blank? ? 'color-orange03' : '' %>">不限</a>
|
||||
</span>
|
||||
<input id="work_status_1" class="magic-checkbox fl" type="checkbox" value="0" name="ex_status[]" <%= !@status.blank? && @status.include?('0') ? 'checked' : '' %>>
|
||||
<label for="work_status_1" class="fl mr25" style="top: 0px;">未提交<span>(<%= un_commit_num @exercise %>)</span></label>
|
||||
<input id="work_status_2" class="magic-checkbox fl" type="checkbox" value="1" name="ex_status[]" <%= !@status.blank? && @status.include?('1') ? 'checked' : '' %>>
|
||||
<label for="work_status_2" class="fl mr25" style="top: 0px;">已提交<span>(<%= has_commit_num @exercise %>)</span></label>
|
||||
</li>
|
||||
<li class="clearfix mb5">
|
||||
<span class="ml33 fl mr10 color-grey">分班情况:</span>
|
||||
<span class="fl mr25">
|
||||
<a href="javascript:void(0);" id="ex_group_no_limit" class="<%= @group.blank? ? 'color-orange03' : '' %>">不限</a>
|
||||
</span>
|
||||
<% @exercise.course.course_groups.each do |group| %>
|
||||
<input id="group_<%= group.id %>" class="magic-checkbox fl" type="checkbox" value="<%= group.id %>" name="ex_group[]" <%= !@group.blank? && @group.include?(group.id) ? 'checked' : '' %>>
|
||||
<label for="group_<%= group.id %>" class="fl mr25" style="top: 0px;"><%= group.name %><span>(<%= group.members.count %>)</span></label>
|
||||
<% end %>
|
||||
<input id="group_0" class="magic-checkbox fl" type="checkbox" value="0" name="ex_group[]">
|
||||
<label for="group_0" class="fl mr25" style="top: 0px;">未分班<span>(<%= @no_group_count %>)</span></label>
|
||||
</li>
|
||||
</form>
|
||||
<% elsif User.current.member_of_course?(@exercise.course) %>
|
||||
<!--学生显示部分-->
|
||||
<p class="clearfix">
|
||||
<li id="edu-tab-nav-2" class="new-tab-nav" onclick="HoverLi(2);">
|
||||
<a href="javascript:void(0);" class="tab_type">试卷预览</a>
|
||||
</li>
|
||||
<li id="edu-tab-nav-3" class="new-tab-nav" onclick="HoverLi(3);">
|
||||
<a href="javascript:void(0);" class="tab_type">设置</a>
|
||||
</li>
|
||||
<%= link_to "导出成绩", student_exercise_list_exercise_path(@exercise, :course_id => @course.id, :format => 'xls'), :id => "export_exercise_work", :class => "fr white-btn orange-btn ml10 mt10 mr15" %>
|
||||
<% else %>
|
||||
<li id="edu-tab-nav-3" class="new-tab-nav" onclick="HoverLi(3);">
|
||||
<a href="javascript:void(0);" class="tab_type">查看设置</a>
|
||||
</li>
|
||||
<p class="fr">
|
||||
<% ex_user = @exercise.exercise_users.where(:user_id => User.current).first %>
|
||||
<% if ex_user %>
|
||||
<% if ex_user.commit_status > 0 %>
|
||||
<span class="edu-filter-btn edu-filter-btn-orange mb15">你已提交</span>
|
||||
<%= link_to '查看答题', ex_user.commit_status == 1 ? exercise_path(@exercise,:user_id => User.current.id) : show_student_result_exercise_path(@exercise,:user_id => User.current.id), :class => "white-btn orange-btn fr" %>
|
||||
<%= link_to '查看答题', ex_user.commit_status == 1 ? exercise_path(@exercise,:user_id => User.current.id) : show_student_result_exercise_path(@exercise,:user_id => User.current.id), :class => "white-btn orange-btn fr mt10 mr15" %>
|
||||
<% else %>
|
||||
<span class="edu-filter-btn edu-filter-btn-orange mb15">你未提交</span>
|
||||
<% if @exercise.exercise_status == 2 %>
|
||||
<%= link_to (ex_user.start_at.nil? ? "开始答题" : "继续答题"), exercise_path(@exercise,:user_id => User.current.id), :class => "white-btn orange-btn fr" %>
|
||||
<%= link_to (ex_user.start_at.nil? ? "开始答题" : "继续答题"), exercise_path(@exercise,:user_id => User.current.id), :class => "white-btn orange-btn fr mt10 mr15" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</p>
|
||||
<p class="clearfix font-12">
|
||||
<span class="fr color-grey ml10">(<%= @has_commit_count %>人已交)</span>
|
||||
<% if @exercise.exercise_status == 2 && @exercise.end_time > Time.now %>
|
||||
<% end_time = @exercise.end_time.to_time.to_i %>
|
||||
<span class="fr color-grey">答题剩余时间:<span class="color-orange03"><%= (end_time - Time.now.to_i) / (24*60*60) %></span>天<span class="color-orange03"><%= ((end_time - Time.now.to_i) % (24*60*60)) / (60*60)%></span>小时<span class="color-orange03"><%= (((end_time - Time.now.to_i) % (24*60*60)) % (60*60)) / 60%></span>分</span>
|
||||
<% elsif @exercise.exercise_status == 3 %>
|
||||
<span class="color-orange ml30">提交已截止</span>
|
||||
<% end %>
|
||||
</p>
|
||||
<% end %>
|
||||
</ul>
|
||||
<div id="edu-tab-con-1">
|
||||
<div id="list_count" class="user_bg_shadow bor-grey-e padding15">
|
||||
<!--老师显示部分-->
|
||||
<% if @is_teacher %>
|
||||
<form id="exercise_user_search_form">
|
||||
<li class="clearfix mb5">
|
||||
|
||||
<div id="exercise_student_work_list">
|
||||
<%= render :partial => "exercise/student_exercise"%>
|
||||
<div class="edu-find fr mr20 with20 pr">
|
||||
<div class="edu-find-input">
|
||||
<input type="text" class="with100 panel-box-sizing" maxlength="20" placeholder="姓名、学号关键字检索" value="<%= @name %>" id="student_user_name">
|
||||
<!--<i class="fa fa-close mr5 color-grey edu-close" onclick="colse_searchbox();"></i>-->
|
||||
<span class="edu-close" onclick="clear_searchbox();" data-tip-down="关闭">×</span>
|
||||
</div>
|
||||
<a href="javascript:void(0);" onclick="SearchByName_ex();" class="edu-open font-16 color-grey "><i class="fa fa-search"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
<input id="exercise_id" type="hidden" value="<%= @exercise.id %>">
|
||||
<li class="clearfix mb5">
|
||||
<span class="ml33 fl mr10 color-grey">你的评阅:</span>
|
||||
<span class="fl mr25">
|
||||
<a href="javascript:void(0);" id="ex_comment_no_limit" class="<%= @comment.blank? ? 'color-orange03' : '' %>">不限</a>
|
||||
</span>
|
||||
<input id="not_comment" class="magic-checkbox fl" type="checkbox" value="0" name="ex_comment[]" <%= !@comment.blank? && @comment.include?('0') ? 'checked' : '' %>>
|
||||
<label for="not_comment" class="fl mr25" style="top: 0px;">未评<span>(<%= un_commit_num @exercise %>)</span></label>
|
||||
<input id="has_comment" class="magic-checkbox fl" type="checkbox" value="1" name="ex_comment[]" <%= !@comment.blank? && @comment.include?('1') ? 'checked' : '' %>>
|
||||
<label for="has_comment" class="fl mr25" style="top: 0px;">已评<span>(<%= has_commit_num @exercise %>)</span></label>
|
||||
</li>
|
||||
<li class="clearfix mb5">
|
||||
<span class="ml33 fl mr10 color-grey">作品状态:</span>
|
||||
<span class="fl mr25">
|
||||
<a href="javascript:void(0);" id="ex_status_no_limit" class="<%= @status.blank? ? 'color-orange03' : '' %>">不限</a>
|
||||
</span>
|
||||
<input id="work_status_1" class="magic-checkbox fl" type="checkbox" value="0" name="ex_status[]" <%= !@status.blank? && @status.include?('0') ? 'checked' : '' %>>
|
||||
<label for="work_status_1" class="fl mr25" style="top: 0px;">未提交<span>(<%= un_commit_num @exercise %>)</span></label>
|
||||
<input id="work_status_2" class="magic-checkbox fl" type="checkbox" value="1" name="ex_status[]" <%= !@status.blank? && @status.include?('1') ? 'checked' : '' %>>
|
||||
<label for="work_status_2" class="fl mr25" style="top: 0px;">已提交<span>(<%= has_commit_num @exercise %>)</span></label>
|
||||
</li>
|
||||
<li class="clearfix mb5">
|
||||
<span class="ml33 fl mr10 color-grey">分班情况:</span>
|
||||
<span class="fl mr25">
|
||||
<a href="javascript:void(0);" id="ex_group_no_limit" class="<%= @group.blank? ? 'color-orange03' : '' %>">不限</a>
|
||||
</span>
|
||||
<% @exercise.course.course_groups.each do |group| %>
|
||||
<input id="group_<%= group.id %>" class="magic-checkbox fl" type="checkbox" value="<%= group.id %>" name="ex_group[]" <%= !@group.blank? && @group.include?(group.id) ? 'checked' : '' %>>
|
||||
<label for="group_<%= group.id %>" class="fl mr25" style="top: 0px;"><%= group.name %><span>(<%= group.members.count %>)</span></label>
|
||||
<% end %>
|
||||
<input id="group_0" class="magic-checkbox fl" type="checkbox" value="0" name="ex_group[]">
|
||||
<label for="group_0" class="fl mr25" style="top: 0px;">未分班<span>(<%= @no_group_count %>)</span></label>
|
||||
</li>
|
||||
</form>
|
||||
<% elsif User.current.member_of_course?(@exercise.course) %>
|
||||
<!--学生显示部分-->
|
||||
<div class="clearfix mb10">
|
||||
<p class="fl">
|
||||
<% ex_user = @exercise.exercise_users.where(:user_id => User.current).first %>
|
||||
<% if ex_user %>
|
||||
<% if ex_user.commit_status > 0 %>
|
||||
<span class="edu-filter-btn edu-filter-btn-orange">你已提交</span>
|
||||
<%#= link_to '查看答题', ex_user.commit_status == 1 ? exercise_path(@exercise,:user_id => User.current.id) : show_student_result_exercise_path(@exercise,:user_id => User.current.id), :class => "white-btn orange-btn fr" %>
|
||||
<% else %>
|
||||
<span class="edu-filter-btn edu-filter-btn-orange">你未提交</span>
|
||||
<%# if @exercise.exercise_status == 2 %>
|
||||
<%#= link_to (ex_user.start_at.nil? ? "开始答题" : "继续答题"), exercise_path(@exercise,:user_id => User.current.id), :class => "white-btn orange-btn fr" %>
|
||||
<%# end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</p>
|
||||
|
||||
<p class="fr font-12 mt8">
|
||||
<span class="fr color-grey ml10">(<%= @has_commit_count %>人已交)</span>
|
||||
<% if @exercise.exercise_status == 2 && @exercise.end_time > Time.now %>
|
||||
<% end_time = @exercise.end_time.to_time.to_i %>
|
||||
<span class="fr color-grey">答题剩余时间:<span class="color-orange03"><%= (end_time - Time.now.to_i) / (24*60*60) %></span>天<span class="color-orange03"><%= ((end_time - Time.now.to_i) % (24*60*60)) / (60*60)%></span>小时<span class="color-orange03"><%= (((end_time - Time.now.to_i) % (24*60*60)) % (60*60)) / 60%></span>分</span>
|
||||
<% elsif @exercise.exercise_status == 3 %>
|
||||
<span class="color-orange ml30">提交已截止</span>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div id="exercise_student_work_list">
|
||||
<%= render :partial => "exercise/student_exercise"%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="edu-tab-con-2" class="undis">
|
||||
<div id="exercise_question_list">
|
||||
<div class="edu-con-top user_bg_shadow bor-grey-e clearfix mb20">
|
||||
<div class="ml15 mr15">
|
||||
<% if @is_teacher && @exercise.exercise_status == 1 %>
|
||||
<%= link_to '编辑', edit_exercise_path(@exercise), :class => "white-btn orange-btn fr mb10 mt5" %>
|
||||
<% end %>
|
||||
<p style="text-align: center; font-size: 16px; width: 98%;" class="fl"><%= @exercise.try(:exercise_name) %></p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="ml15 mr15 mt15">
|
||||
<pre class="color-grey font-14 exercise_que_title"><%= @exercise.try(:exercise_description).nil? ? "" : @exercise.try(:exercise_description).html_safe%></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="total_questions_score">
|
||||
<%= render :partial => "exercise/total_questions_score" %>
|
||||
</div>
|
||||
|
||||
<div class="clearfix">
|
||||
<% @exercise.exercise_questions.each_with_index do |exercise_question, i| %>
|
||||
<div class="question_item_con font-14 user_bg_shadow bor-grey-e mb20 pt15">
|
||||
<div class="clearfix pl15 pr15">
|
||||
<p class="fl font-15" id="mao<%= exercise_question.question_number %>">第<%= exercise_question.question_number %>题:<span class="color-orange03 ml10">[<%= exercise_question.question_type_name %>]</span><span class="ml10"><%= exercise_question.question_score %>分</span></p>
|
||||
</div>
|
||||
<div class="pl15 pr15 justify upload_img table_maxWidth"><%= exercise_question.question_title.html_safe %></div>
|
||||
<% case exercise_question.question_type %>
|
||||
<% when 1 %>
|
||||
<div class="pl15 pr15 mb15">
|
||||
<% exercise_choices = @exercise.choice_random == 1 ? exercise_question.exercise_choices.shuffle : exercise_question.exercise_choices.reorder("choice_position") %>
|
||||
<% exercise_choices.each_with_index do |exercise_choice,index| %>
|
||||
<li class="clearfix">
|
||||
<input name="exercise_choice_<%= exercise_question.id %>" class="magic-radio fl mt5 magic-checkbox_show" id="exercise_<%= exercise_choice.id %>_exercise_choice_id" type="radio">
|
||||
<label class="fl color-grey3" for="exercise_<%= exercise_choice.id %>_exercise_choice_id"><%= convert_to_char((index+1).to_s)%> <%= exercise_choice.choice_text%></label>
|
||||
</li>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="pl15 pr15 pt10 pb10 bor-top-greyE">
|
||||
标准答案:<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s) %>
|
||||
</div>
|
||||
<% when 2 %>
|
||||
<div class="pl15 pr15 mb15">
|
||||
<% exercise_choices = @exercise.choice_random == 1 ? exercise_question.exercise_choices.shuffle : exercise_question.exercise_choices.reorder("choice_position") %>
|
||||
<% exercise_choices.each_with_index do |exercise_choice,index| %>
|
||||
<li class="clearfix">
|
||||
<input name="exercise_choice_<%= exercise_question.id %>" class="magic-checkbox fl mt5 magic-checkbox_show" id="exercise_<%= exercise_choice.id %>_exercise_choice_id" type="checkbox">
|
||||
<label class="fl color-grey3" for="exercise_<%= exercise_choice.id %>_exercise_choice_id"><%= convert_to_char((index+1).to_s)%> <%= exercise_choice.choice_text%></label>
|
||||
</li>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class=" pl15 pr15 pt10 pb10 bor-top-greyE">
|
||||
标准答案:<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s) %>
|
||||
</div>
|
||||
<% when 3 %>
|
||||
<div class="pl15 pr15 pt10 pb10 bor-top-greyE">
|
||||
<% exercise_question.exercise_standard_answers.reorder("created_at").each_with_index do |exercise_choice,index| %>
|
||||
<p>候选答案<%= convert_to_chi_num(index+1) %>:<%= exercise_choice.answer_text%></p>
|
||||
<% end %>
|
||||
</div>
|
||||
<% when 4 %>
|
||||
<div class="clearfix bor-top-greyE padding15 answer_con">
|
||||
<p>参考答案</p>
|
||||
<pre class="exercise_que_title"><%= exercise_question.exercise_standard_answers.count > 0 ? exercise_question.exercise_standard_answers.first.answer_text : "无"%></pre>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="edu-tab-con-3" class="user_bg_shadow bor-grey-e undis">
|
||||
<%= render :partial => "exercise_setting" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function(){
|
||||
<% if @tab == 3 %>
|
||||
$("#edu-tab-nav-3").click();
|
||||
<% end %>
|
||||
})
|
||||
|
||||
function HoverLi(n){
|
||||
for(var i=1;i<=3;i++){
|
||||
$('#edu-tab-nav-'+i).removeClass('background-orange');
|
||||
$('#edu-tab-con-'+i).addClass('undis');
|
||||
}
|
||||
$('#edu-tab-con-'+n).removeClass('undis');
|
||||
$('#edu-tab-nav-'+n).addClass('background-orange');
|
||||
}
|
||||
</script>
|
||||
|
|
@ -29,4 +29,6 @@
|
|||
$("#show_poll_questions_<%= @exercise_question.id %>").html("<%= escape_javascript(render :partial => 'show_single', :locals => {:exercise_question => @exercise_question}) %>");
|
||||
<% elsif @exercise_question.question_type == 4%>
|
||||
$("#show_poll_questions_<%= @exercise_question.id %>").html("<%= escape_javascript(render :partial => 'show_multi', :locals => {:exercise_question => @exercise_question}) %>");
|
||||
<% end%>
|
||||
<% end%>
|
||||
$(".data-tip-down").html("");
|
||||
$(".data-tip-down").hide();
|
||||
|
|
@ -10,11 +10,11 @@
|
|||
<% if file.attachment_histories.count == 0 %>
|
||||
<%= link_to truncate(file.filename,length: 40, omission: '...'),
|
||||
download_named_attachment_path(file.id, file.filename),
|
||||
:title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "linkGrey3 f_14" %>
|
||||
:title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "color-grey3 f_14" %>
|
||||
<% else %>
|
||||
<%= link_to truncate(file.filename,length: 40, omission: '...'), attachment_history_download_path(file.id),
|
||||
:title => file.filename+"\n"+file.description.to_s,
|
||||
:class => "linkGrey3 f_14",
|
||||
:class => "color-grey3 f_14",
|
||||
:style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;", :remote=>true %>
|
||||
<% end %>
|
||||
<%#= file_preview_eye(file, class: 'preview') %>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<div class="edu-class-container edu-position">
|
||||
<p class="mb10 font-14">
|
||||
<i class="fa fa-map-marker mr5 color-grey"></i>
|
||||
<a href="<%= user_path(@user) %>"><%= @user.show_name %></a> > 论坛
|
||||
<a href="<%= user_path(@user) %>"><%= @user.show_name %></a> > 讨论区
|
||||
</p>
|
||||
<div class="edu-class-top clearfix mb30 pr user_bg_shadow bor-grey-e">
|
||||
<div class="clearfix">
|
||||
|
|
@ -11,19 +11,19 @@
|
|||
</a>
|
||||
<div class="fl ml15">
|
||||
<li class="font-16"><a href="<%= user_path(@user.show_name) %>" class="color-grey3"><%= @user.show_name %></a></li>
|
||||
<li class="mt5 color-grey"><%= @user.login %></li>
|
||||
<li class="mt5 color-grey font-12"><%= @user.login %></li><!--三分钟前登录-->
|
||||
</div>
|
||||
</div>
|
||||
<ul class="fr" style="padding: 10px 0px;text-align:right">
|
||||
<li class="fl" style="text-align:center"><span class="color-orange font-bd" id="all_syllabuses"><%= @memos_praise_count %></span><br><span>被赞</span></li>
|
||||
<li class="fl" style="text-align:center;margin-left: 60px;"><span class="color-orange font-bd" id="all_syllabuses"><%= @my_memos_count %></span><br><span>回复/评论</span></li>
|
||||
<li class="fl" style="text-align:center;margin-left: 60px;"><span class="color-orange font-bd" id="all_syllabuses"><%= @my_forums_count %></span><br><span>主题</span></li>
|
||||
<li class="fl" style="text-align:center"><span class="color-orange03 font-bd" id="all_syllabuses"><%= @memos_praise_count %></span><br><span>被赞</span></li>
|
||||
<li class="fl" style="text-align:center;margin-left: 60px;"><span class="color-orange03 font-bd" id="all_syllabuses"><%= @my_memos_count %></span><br><span>回复/评论</span></li>
|
||||
<li class="fl" style="text-align:center;margin-left: 60px;"><span class="color-orange03 font-bd" id="all_syllabuses"><%= @my_forums_count %></span><br><span>主题</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix user_bg_shadow bor-grey-e">
|
||||
<div class="clearfix pt10 pb10 pl15 pr15 bor-bottom-greyE">
|
||||
<p class="color-grey3 fl font-16">问吧</p>
|
||||
<p class="color-grey3 fl font-16">帖子</p>
|
||||
<a href="<%= new_forum_memo_path(:forum_id => Forum.first.id, :forum_index => true) %>" class="mt3 white-btn orange-btn fr">+ 新话题</a>
|
||||
</div>
|
||||
<div id="forum_list" class="forum_table mh650">
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
<%= memo.subject %>
|
||||
</a>
|
||||
<% if memo.sticky %>
|
||||
<span class="btn-top btn-cir-red mt7 ml5 fl">顶</span>
|
||||
<span class="btn-top btn-cir-orange mt7 ml5 fl">顶</span>
|
||||
<% end %>
|
||||
</p>
|
||||
<div style="width: 1091px; height: 30px;" class="overellipsis color-dark-grey mb10"><%= memo.content.html_safe %></div>
|
||||
|
|
@ -47,10 +47,16 @@
|
|||
<span class="fl ml30"><%= time_from_now memo.updated_at %></span>
|
||||
<!--<span class="fl ml50">最后回复:</span>-->
|
||||
<p class="font-12 mt5 fr">
|
||||
<span class="mr20 fl" style="cursor: default;" data-tip-down="浏览数"><i class="fa fa-eye mr5"></i><%= memo.viewed_count %></span>
|
||||
<span class="mr20 fl" style="cursor: default;" data-tip-down="点赞数"><i class="fa fa-thumbs-o-up mr5"></i><%= get_praise_num(memo) %></span>
|
||||
<span class="mr10 fl" style="cursor: default;" data-tip-down="回复数"><i class="fa fa-comments-o mr5"></i><%= Memo.where(:root_id => memo.id).count %></span>
|
||||
<!--<span class="fl">类别:分享</span>-->
|
||||
<% if memo.viewed_count > 0%>
|
||||
<span class="mr10 fl" style="cursor: default;" data-tip-down="浏览数"><i class="fa fa-eye mr5"></i><%= memo.viewed_count %></span>
|
||||
<% end %>
|
||||
<% if get_praise_num(memo) > 0%>
|
||||
<span class="mr10 ml10 fl" style="cursor: default;" data-tip-down="点赞数"><i class="fa fa-thumbs-o-up mr5"></i><%= get_praise_num(memo) %></span>
|
||||
<% end %>
|
||||
<% if Memo.where(:root_id => memo.id).count > 0%>
|
||||
<span class="mr10 ml10 fl" style="cursor: default;" data-tip-down="回复数"><i class="fa fa-comments-o mr5"></i><%= Memo.where(:root_id => memo.id).count %></span>
|
||||
<% end %>
|
||||
<!--<span class="fl">类别:分享</span>-->
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -146,16 +146,16 @@
|
|||
$.ajax({
|
||||
url: '<%= game_build_myshixun_game_path(@game, :myshixun_id => @myshixun) %>',
|
||||
success: function (data){
|
||||
timeID = setInterval(function(){
|
||||
/* timeID = setInterval(function(){
|
||||
$.ajax({
|
||||
url: '<%= get_waiting_time_myshixun_game_path(@game, :myshixun_id => @myshixun) %>',
|
||||
url: '<%#= get_waiting_time_myshixun_game_path(@game, :myshixun_id => @myshixun) %>',
|
||||
data:{resubmit:data.resubmit},
|
||||
async: false,
|
||||
success: function(data){
|
||||
console.log(data);
|
||||
if(data.onRun == 1){
|
||||
clearInterval(timeID);
|
||||
$("#game_wating_time").html("");
|
||||
$("#game_wating_time").html("");*/
|
||||
// 每2s匹配一次状态,成功2 评测中1 评测 0
|
||||
var intId = setInterval(function(){
|
||||
var ajaxTimeoutTest = $.ajax({
|
||||
|
|
@ -271,7 +271,7 @@
|
|||
}}
|
||||
});
|
||||
}, 2000);
|
||||
}else if(data.onRun == 0){
|
||||
/*}else if(data.onRun == 0){
|
||||
mintes = parseInt(data.waitingTime / 60);
|
||||
if(mintes > 1){
|
||||
$("#game_wating_time").html("目前正有" + data.waitNum + "个任务正在等待,大约需要等待" + mintes + "分钟")
|
||||
|
|
@ -281,7 +281,7 @@
|
|||
}
|
||||
}
|
||||
})
|
||||
}, 2000);
|
||||
}, 2000);*/
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -54,11 +54,6 @@
|
|||
<div id="codetab_con_2" class="undis -relative"></div>
|
||||
<div id="current_repository_path" class="undis"><%= file_update_myshixun_game_path(@game, :myshixun_id => @myshixun, :path => @path) %></div>
|
||||
<script>
|
||||
$(function(){
|
||||
<% if @myshixun.shixun.try(:webssh) %>
|
||||
LoadingWebssh();
|
||||
<% end %>
|
||||
});
|
||||
var H = 2;
|
||||
function g_l(o){return document.getElementById(o);}
|
||||
function HoverLi_new(n){
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@
|
|||
</div>
|
||||
<div class="panel-bg-grey clearfix color-grey font-12">
|
||||
<p class="fl ml15">共 <span class="color-orange"><%= @hw_count %></span>个搜索结果</p>
|
||||
<%= link_to '引用次数排序', homework_bank_index_path(:type => @type, :order => "quotes", :search => @search, :sort => @r_sort, :property=>@property), :class => "fr mr15 #{@order == 'quotes' ? 'color-blue' : ''}", :remote => true %>
|
||||
<%= link_to '引用次数排序', homework_bank_index_path(:type => @type, :order => "quotes", :search => @search, :sort => @r_sort, :property=>@property), :class => "fr mr15 #{@order == 'quotes' ? 'color-orange03' : ''}", :remote => true %>
|
||||
<span class="mr5 ml5 fr">|</span>
|
||||
<%= link_to '更新时间排序', homework_bank_index_path(:type => @type, :order => "updated_at", :search => @search, :sort => @r_sort, :property=>@property), :class => "fr #{@order == 'updated_at' ? 'color-blue' : ''}", :remote => true %>
|
||||
<%= link_to '更新时间排序', homework_bank_index_path(:type => @type, :order => "updated_at", :search => @search, :sort => @r_sort, :property=>@property), :class => "fr #{@order == 'updated_at' ? 'color-orange03' : ''}", :remote => true %>
|
||||
</div>
|
||||
<div class="user_bg_shadow">
|
||||
<div class="edu-con-top clearfix">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<div class="edu-con-top user_bg_shadow">
|
||||
<p class="ml15 color-grey"><%= edit_mode ? '编辑' : '新建' %>普通作业</p>
|
||||
<div class="edu-con-top user_bg_shadow bor-grey-e">
|
||||
<p class="ml15 color-grey3"><%= edit_mode ? '编辑' : '新建' %>普通作业</p>
|
||||
</div>
|
||||
<div class="alert alert-red mt15 none" id="new_homework_notice">
|
||||
<button class="task-close fr" type="button" id="close_button">×</button>
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
<ul>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="edu-con-bg01 mt15 user_bg_shadow" style="padding:30px 0;">
|
||||
<div class="edu-con-bg01 mt15 user_bg_shadow bor-grey-e" style="padding:30px 0;">
|
||||
<div class="ml30 mr30">
|
||||
<div class="">
|
||||
<ul>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
<div class="mh440">
|
||||
<table class="edu-pop-table color-grey edu-txt-center table-pa5" cellspacing="0" cellpadding="0">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -21,7 +22,7 @@
|
|||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
<div class="clearfix fr mt15">
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue fr" onclick="new_shixun_homework_bank();">选择</a>
|
||||
|
|
|
|||
|
|
@ -21,6 +21,11 @@
|
|||
<% allow_late = homework_common.allow_late ? '已开启补交' : '未开启补交' %>
|
||||
<span class="edu-filter-btn <%= homework_status_color allow_late %> ml10 fl mt3"><%= allow_late %></span>
|
||||
<% end %>
|
||||
|
||||
<% if false %>
|
||||
<span class="btn-top btn-cir-orange ml10 fl mt5">未提交</span>
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
<p class="color-grey font-12 mt20">
|
||||
|
||||
|
|
|
|||
|
|
@ -82,8 +82,8 @@
|
|||
<% end %>
|
||||
|
||||
<% unless (is_teacher || is_TA || is_TE || is_ST) %>
|
||||
<div id="join_in_course_header" class="join">
|
||||
<p class="joinclass"><%= link_to "加入课堂", join_private_courses_courses_path, :remote => true, :method => "post", :class => 'color_white' %></p>
|
||||
<div id="join_in_course_header" class="fr">
|
||||
<p><%= link_to "加入课堂", join_private_courses_courses_path, :remote => true, :method => "post", :class => 'white-btn orange-btn' %></p>
|
||||
</div>
|
||||
<% end %>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
<li><%= link_to "全部实训", shixuns_path, :class => "new-nav-a font-16" %></li>
|
||||
<li><%= link_to "实训路径", subjects_path, :class => "new-nav-a font-16" %></li>
|
||||
<li><%= link_to "在线课堂", courses_path, :class => "new-nav-a font-16" %></li>
|
||||
<li><%= link_to "论坛", forums_path, :class => "new-nav-a font-16" %></li>
|
||||
<li><%= link_to "讨论区", forums_path, :class => "new-nav-a font-16" %></li>
|
||||
|
||||
<!-- <li><%#= link_to "论坛", forums_path, :class =>"new-nav-a", :target => "_blank" %></li>-->
|
||||
<!-- <li><%#= link_to "帮助中心", "#{Setting.protocol}://#{Setting.host_name}/forums/1/memos/1168", :class => "new-nav-a", :target=>"_blank" %></li>-->
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<%= favicon %>
|
||||
<%= javascript_heads %>
|
||||
<%= heads_for_theme %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'css/structure','css/edu-common', 'css/edu-public','css/taskstyle', 'css/font-awesome', 'css/edu-class', 'css/edu-popup', 'css/ketang','css/edu-subject', 'css/magic-check', "css/edu-admin", "bootstrap/bootstrap-min.css" %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'css/structure','css/edu-common', 'css/edu-public','css/taskstyle', 'css/font-awesome', 'css/edu-class', 'css/edu-popup', 'css/ketang','css/edu-subject', 'css/magic-check', "css/edu-admin", "bootstrap/bootstrap-min.css", 'prettify.css' %>
|
||||
<%= javascript_include_tag "edu/application",'edu/base_edu','baiduTemplate','jquery.datetimepicker.js','edu/course','attachments' %>
|
||||
<%= call_hook :view_layouts_base_html_head %>
|
||||
<%= yield :header_tags -%>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
</div>
|
||||
<div class="cl"></div>
|
||||
<div id="schools_list" class="mt10 mb20 ml40 mr40">
|
||||
<%= render :partial => "managements/update_school_form", :locals => {:schools => schools, :edit_id => edit_id} %>
|
||||
<%#= render :partial => "managements/update_school_form", :locals => {:schools => schools, :edit_id => edit_id,:upload => upload} %>
|
||||
</div>
|
||||
<span id="choose_courses_notice" class="c_red"></span>
|
||||
<div class="task-popup-submit clearfix ml25">
|
||||
|
|
@ -20,12 +20,10 @@
|
|||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
|
||||
});
|
||||
$("#search_course_input").on('input',function(e){
|
||||
throttle(search_courses, window, e);
|
||||
});
|
||||
|
||||
function school_submit() {
|
||||
var checkboxs = $("input[name='school_id']:checked");
|
||||
if(checkboxs.length == 0) {
|
||||
|
|
@ -44,13 +42,24 @@
|
|||
return;
|
||||
}
|
||||
lastSearchCondition = $(e.target).val().trim();
|
||||
$.ajax({
|
||||
url: '<%= url_for(:controller => 'managements', :action => 'all_schools') %>'+'?search='+ e.target.value+'&school_id=<%= edit_id %>',
|
||||
type:'get',
|
||||
data: {is_observe:true},
|
||||
success: function(data){ },
|
||||
beforeSend: function(){ $(this).addClass('ajax-loading'); },
|
||||
complete: function(){ $(this).removeClass('ajax-loading'); }
|
||||
});
|
||||
<% if @upload %>
|
||||
$.ajax({
|
||||
url: '<%= url_for(:controller => 'managements', :action => 'all_schools') %>'+'?search='+ e.target.value+'&school_id=<%= edit_id %>&upload=<%= @upload %>',
|
||||
type:'get',
|
||||
data: {is_observe:true},
|
||||
success: function(data){ },
|
||||
beforeSend: function(){ $(this).addClass('ajax-loading'); },
|
||||
complete: function(){ $(this).removeClass('ajax-loading'); }
|
||||
});
|
||||
<% else %>
|
||||
$.ajax({
|
||||
url: '<%= url_for(:controller => 'managements', :action => 'all_schools') %>'+'?search='+ e.target.value+'&school_id=<%= edit_id %>',
|
||||
type:'get',
|
||||
data: {is_observe:true},
|
||||
success: function(data){ },
|
||||
beforeSend: function(){ $(this).addClass('ajax-loading'); },
|
||||
complete: function(){ $(this).removeClass('ajax-loading'); }
|
||||
});
|
||||
<% end %>
|
||||
}
|
||||
</script>
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
<% @c_shixuns.each_with_index do |c_shixun, index| %>
|
||||
<tr>
|
||||
<td><%= index + 1 %></td>
|
||||
<td class="edu-txt-left"><%= link_to c_shixun.name, subject_path(c_shixun) %></td>
|
||||
<td class="edu-txt-left"><%= link_to c_shixun.name, subject_path(c_shixun),target: '_blank' %></td>
|
||||
<td class="edu-txt-left"><%= c_shixun.user.try(:user_extensions).try(:school).try(:name).blank? ? "--" : c_shixun.user.try(:user_extensions).try(:school) %></td>
|
||||
<td><%= c_shixun.user.show_real_name %></td>
|
||||
<td><%= format_time c_shixun.created_at %></td>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
<% @c_shixuns.each_with_index do |c_shixun, index| %>
|
||||
<tr id="subject_shixun_<%= c_shixun.id %>">
|
||||
<td><%= index + 1 %></td>
|
||||
<td class="edu-txt-left"><%= link_to c_shixun.name, subject_path(c_shixun) %></td>
|
||||
<td class="edu-txt-left"><%= link_to c_shixun.name, subject_path(c_shixun),target: '_blank'%></td>
|
||||
<td><%= c_shixun.stages.count %></td>
|
||||
<td><%= c_shixun.stage_shixuns.count %></td>
|
||||
<td><%= c_shixun.status == 0 ? "编辑中" : (c_shixun.status == 1 ? "审核中" : "发布") %></td>
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
<%= ShixunMajorCourse.where(:course_list_id => courselist.id).map(&:shixun_id).count %>
|
||||
</td>
|
||||
<td>
|
||||
<%= courselist.user.try(:show_real_name) %>
|
||||
<%= link_to courselist.user.try(:show_real_name),user_path(courselist.user_id), target: '_blank' %>
|
||||
</td>
|
||||
<td><%= format_time courselist.created_at %></td>
|
||||
<td>
|
||||
|
|
|
|||
|
|
@ -32,8 +32,11 @@
|
|||
<td><%= format_time schools.created_at %></td>
|
||||
<td><%= format_time schools.updated_at %></td>
|
||||
<td>
|
||||
<i class="fa fa-edit font-16"></i>
|
||||
<%= link_to("修改", upload_logo_school_path(schools.id,:schools_name => @schools_name), :class => 'icon icon-copy') %>
|
||||
<a href="javascript:void(0);" onclick="delete_confirm_box('<%= delete_school_managements_path(:school => schools.id) %>', '确定要删除该部门吗?')">删除 </a>
|
||||
|
||||
<%#= link_to("修改", upload_logo_school_path(schools.id,:schools_name => @schools_name), :class => 'icon icon-copy') %>
|
||||
<%= link_to('更改', upload_logo_managements_path(:school => schools.id), :class => 'icon icon-copy',:target => '_blank') %>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
<table class="edu-pop-table edu-txt-center" cellspacing="0" cellpadding="0" style="table-layout: fixed;">
|
||||
<thead>
|
||||
<th width="9%">ID</th>
|
||||
<th width="16%" class="edu-txt-left">实训名称</th>
|
||||
<th width="14%" class="edu-txt-left">实训名称</th>
|
||||
<th width="6%">顶</th>
|
||||
<th width="6%">踩</th>
|
||||
<th width="8%">已通关</th>
|
||||
<th width="9%">已开启</th>
|
||||
<th width="7%">已通关</th>
|
||||
<th width="7%">已开启</th>
|
||||
<th width="7%">fork数</th>
|
||||
<th width="9%">创建者</th>
|
||||
<th class="eud-pointer" width="11%">发布时间<i class="fa <%= @sx_order == "desc" ? "fa-long-arrow-down" : "fa-long-arrow-up" %> color-light-green ml5" title="功能完善中,敬请期待"></i></th>
|
||||
<th width="9%">操作</th>
|
||||
|
|
@ -25,6 +26,7 @@
|
|||
</td>
|
||||
<td><%= Myshixun.where(:shixun_id => shixun.id, :status => 1).count %></td>
|
||||
<td><%= Myshixun.where(:shixun_id => shixun.id).count %></td>
|
||||
<td><%= Shixun.where(:fork_from =>shixun.id).count %></td>
|
||||
<td><%= shixun.owner.try(:show_real_name) %></td>
|
||||
<td><%= format_time shixun.created_at %></td>
|
||||
<td class="operate">
|
||||
|
|
@ -36,7 +38,7 @@
|
|||
</td>
|
||||
<td class="edu-txt-center">
|
||||
<input type="checkbox" name="homepage_show" value="<%= shixun.id %>" <%= shixun.homepage_show ? "checked" : "" %> class="ml-3 mr5 magic-checkbox" id="join_course_role_<%= shixun.id %>">
|
||||
<label style="top:-14px;" class="ml50" for="join_course_role_<%= shixun.id %>"></label>
|
||||
<label style="top:-14px;" class="ml40" for="join_course_role_<%= shixun.id %>"></label>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@
|
|||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div style="text-align:center;">
|
||||
<div class="pages_right_min" style="width:auto; display:inline-block;">
|
||||
<ul id="homework_pository_ref_pages">
|
||||
|
|
|
|||
|
|
@ -1,19 +1,39 @@
|
|||
<%= form_tag edit_applied_schools_managements_path(:applied_id =>edit_id), :id => 'schools_list_form' %>
|
||||
<div>
|
||||
<%#= hidden_field_tag(:send_id, edit_id) %>
|
||||
<div class="courseReferContainer" >
|
||||
<% if !schools.empty? && !@search.nil? %>
|
||||
<% schools.each do |school| %>
|
||||
<ul class="courseSend">
|
||||
<li class="" style="display:inline-block">
|
||||
<input name="school_id" id="search_school_<%= school.id %>" type="radio" value="<%= school.id %>" class="courseSendCheckbox magic-radio"/>
|
||||
<label for="search_school_<%= school.id %>"><%= truncate(school.name, :lendght => 25)%></label>
|
||||
</li>
|
||||
</ul>
|
||||
<% if defined?(upload) %>
|
||||
<%= form_tag school_upload_logo_managements_path(:applied_id => edit_id), :id => 'schools_list_form' %>
|
||||
<div>
|
||||
<div class="courseReferContainer" >
|
||||
<% if !schools.empty? && !@search.nil? %>
|
||||
<% schools.each do |school| %>
|
||||
<ul class="courseSend">
|
||||
<li class="" style="display:inline-block">
|
||||
<input name="school_id" id="search_school_<%= school.id %>" type="radio" value="<%= school.id %>" class="courseSendCheckbox magic-radio"/>
|
||||
<label for="search_school_<%= school.id %>"><%= truncate(school.name, :lendght => 25) %></label>
|
||||
</li>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= form_tag edit_applied_schools_managements_path(:applied_id => edit_id), :id => 'schools_list_form' %>
|
||||
<div>
|
||||
<div class="courseReferContainer" >
|
||||
<% if !schools.empty? && !@search.nil? %>
|
||||
<% schools.each do |school| %>
|
||||
<ul class="courseSend">
|
||||
<li class="" style="display:inline-block">
|
||||
<input name="school_id" id="search_school_<%= school.id %>" type="radio" value="<%= school.id %>" class="courseSendCheckbox magic-radio"/>
|
||||
<label for="search_school_<%= school.id %>"><%= truncate(school.name, :lendght => 25) %></label>
|
||||
</li>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
||||
<div class="cl"></div>
|
||||
<script>
|
||||
$(function(){
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
<tbody>
|
||||
<% @users.each do |user| %>
|
||||
<tr>
|
||||
<td><%= user.login %></td>
|
||||
<td><%= link_to user.login,user_path(user),target: '_blank' %></td>
|
||||
<td>
|
||||
<%#= link_to user.try(:show_real_name),user_path(user) %>
|
||||
<%= link_to user.try(:show_real_name), update_user_managements_path(:user => user), target: '_blank' %>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
<% if params[:is_observe].nil? %>
|
||||
var htmlvalue = " <%= escape_javascript( render :partial => 'managements/all_schools', :locals => {:schools => @schools, :edit_id => @edit_id}) %>";
|
||||
<% if params[:search].nil? %>
|
||||
var htmlvalue = "<%= escape_javascript( render :partial => 'managements/all_schools',:locals => {:schools => @schools, :edit_id => @edit_id}) %>";
|
||||
pop_box_new(htmlvalue, 400, 260);
|
||||
<% else %>
|
||||
$("#schools_list").html("<%= escape_javascript(render :partial => 'managements/update_school_form', :locals => {:schools => @schools, :edit_id => @edit_id}) %>");
|
||||
<% if params[:upload].present? %>
|
||||
$("#schools_list").html("<%= escape_javascript(render :partial => 'managements/update_school_form', :locals => {:schools => @schools, :edit_id => @edit_id, :upload => @upload}) %>");
|
||||
<% else %>
|
||||
$("#schools_list").html("<%= escape_javascript(render :partial => 'managements/update_school_form', :locals => {:schools => @schools, :edit_id => @edit_id}) %>");
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
<select class="task-form-15 task-height-30 fl" style="margin:0px 0px 0px 25px;width: 11%" name="keyword" id="condition_status">
|
||||
<option value="u_name">创建者姓名搜索</option>
|
||||
<option value="cla_name">课程名称搜索</option>
|
||||
<option value="dep_name">创建者单位搜索</option>
|
||||
</select>
|
||||
<input class="task-form-20 task-height-30 fl" name="search" maxlength="" placeholder="输入关键字进行搜索" type="text" style="height: 21px;" id="Look_name" >
|
||||
<a href="javascript:void(0);" class=" task-btn task-btn-blue ml5 mt3 fl mb5 " onclick="$('#class_publish_shixuns_search').submit();">搜索</a>
|
||||
|
|
|
|||
|
|
@ -2,13 +2,10 @@
|
|||
|
||||
<div class="edu-con-bg01 mt15">
|
||||
<div class="-task-con-per cl">
|
||||
<div class="photo fl" onclick="">
|
||||
<div class="photo fl" style="margin-left: 7%">
|
||||
<%= image_tag(url_to_avatar(@user), :class => "person", :width => 100, :height => 100, :alt => "头像") %>
|
||||
<div class="changephoto font-14">
|
||||
<a href="<%= avatar_account_path(:user_id => @user.id) %>" class="subchange" style="display: block" target="_blank">更换头像</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="-task-con-data fl">
|
||||
<div class="fl" style="width:78%" >
|
||||
<div class="top cl">
|
||||
<div class="top-left fl mt10 mb10">
|
||||
<p class="p1 font-16" style="overflow: hidden">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,118 @@
|
|||
<div class="col-width-10 mt20" style="padding:20px 0 0 300px">
|
||||
<%= form_tag school_message_update_managements_path ,method: "post",:id => "save_school" do %>
|
||||
<div class="clearfix ml30">
|
||||
<input type="hidden" value="<%= @school_name %>" name="school_name" class="w150">
|
||||
<%= image_tag(@school.try(:logo_link), id: "avatar_image", :class=>"school_avatar fl ml80", width:60,height:60) %>
|
||||
<a type="button" onclick="$('#file').click();" style="margin: 90px 0 0 0px;padding: 2px 5px;cursor: pointer;text-decoration: none;width: 70px;" class="fl color-grey">上传图片</a>
|
||||
<%= file_field_tag 'logo',:style => "display:none;", :id => "file", :onchange => "showPreview(this)"%>
|
||||
<a type="button"style="margin: 90px 0 0 0px;padding: 2px 5px;cursor: pointer;text-decoration: none;width: 70px;" class="fl color-grey" >删除图片</a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="panel-form mr15">
|
||||
<ul>
|
||||
<li class="clearfix">
|
||||
<label class="panel-form-label1 fl"><span class="color-red mr5">*</span>单位全称:</label>
|
||||
<input id="schoolname" name="schoolname" type="text" class="task-form-40 task-height-40 panel-box-sizing fl" onBlur='ifNameRepeat();$("#schoolrepeatnotice").attr("value",1);' placeholder="学校名称或者工作单位名称" value="<%= @school.name %>" readonly>
|
||||
<a href="<%= all_schools_managements_path(:school_id => @school.id, :upload => 1) %>" data-remote="true" class="fl task-btn task-btn-blue ml5 mt2">更改</a>
|
||||
</li>
|
||||
<li class="clearfix mb10">
|
||||
<label class="panel-form-label1 fl" > </label>
|
||||
<div class="fl"><span>示例:</span>
|
||||
<p><i class="fa fa-check-circle font-16 color-light-green mr5"></i>国防科学技术大学</p>
|
||||
<p><i class="fa fa-times-circle font-16 color-orange mr5"></i>国防科学技术大学四方坪校区</p>
|
||||
<p><i class="fa fa-times-circle font-16 color-orange mr5"></i>国防科学技术大学计算机学院</p>
|
||||
</div>
|
||||
</li>
|
||||
<li class="clearfix mb10">
|
||||
<label class="panel-form-label1 fl"><span class="color-red mr5">*</span>地区:</label>
|
||||
<select onchange="showcity(this.value, document.getElementById('schoolCity'));" name="province" id="schollProvince" class="fl task-height-40 task-form-20" style="width:19%; ">
|
||||
<option value="">--请选择省份--</option>
|
||||
<option value="北京">北京</option>
|
||||
<option value="上海">上海</option>
|
||||
<option value="广东">广东</option>
|
||||
<option value="江苏">江苏</option>
|
||||
<option value="浙江">浙江</option>
|
||||
<option value="重庆">重庆</option>
|
||||
<option value="安徽">安徽</option>
|
||||
<option value="福建">福建</option>
|
||||
<option value="甘肃">甘肃</option>
|
||||
<option value="广西">广西</option>
|
||||
<option value="贵州">贵州</option>
|
||||
<option value="海南">海南</option>
|
||||
<option value="河北">河北</option>
|
||||
<option value="黑龙江">黑龙江</option>
|
||||
<option value="河南">河南</option>
|
||||
<option value="湖北">湖北</option>
|
||||
<option value="湖南">湖南</option>
|
||||
<option value="江西">江西</option>
|
||||
<option value="吉林">吉林</option>
|
||||
<option value="辽宁">辽宁</option>
|
||||
<option value="内蒙古">内蒙古</option>
|
||||
<option value="宁夏">宁夏</option>
|
||||
<option value="青海">青海</option>
|
||||
<option value="山东">山东</option>
|
||||
<option value="山西">山西</option>
|
||||
<option value="陕西">陕西</option>
|
||||
<option value="四川">四川</option>
|
||||
<option value="天津">天津</option>
|
||||
<option value="新疆">新疆</option>
|
||||
<option value="西藏">西藏</option>
|
||||
<option value="云南">云南</option>
|
||||
<option value="香港">香港特别行政区</option>
|
||||
<option value="澳门">澳门特别行政区</option>
|
||||
<option value="台湾">台湾</option>
|
||||
<option value="海外">海外</option>
|
||||
</select>
|
||||
<select name="city" id="schoolCity" class="fl task-height-40" style="width:19%;margin-left:2%;"></select>
|
||||
<div class="cl"></div>
|
||||
<span class="color-orange fl hint none" id="province_notice" style="margin-left:90px;"><i class="fa fa-exclamation-circle mr5"></i>请选择省份和城市</span>
|
||||
</li>
|
||||
<li class="clearfix mb10">
|
||||
<label class="panel-form-label1 fl"><span class="color-red mr5">*</span>详细地址:</label>
|
||||
<input type="text" id="address" name="address" class="task-form-40 task-height-40 panel-box-sizing fl" placeholder="请填写完整的地址信息" value="<%= ApplyAddSchools.where(:school_id => @school.id,:status => 1).map(&:address).join("-") %>">
|
||||
<div class="cl"></div>
|
||||
<span class="color-orange fl hint none" id="address_notice" style="margin-left:90px;"><i class="fa fa-exclamation-circle mr5"></i>请填写单位的详细地址</span>
|
||||
</li>
|
||||
<li class="clearfix" style="margin-left:50%;">
|
||||
<a href="javascript:void(0);" class="task-btn mr10">取消</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue" onclick="submit_department()">确定</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% province = @school.province %>
|
||||
<% city = @school.city %>
|
||||
|
||||
<script>
|
||||
function submit_department(){
|
||||
if($("#address").val() == ''){
|
||||
$("#address_notice").show();
|
||||
}else{
|
||||
$("#save_school").submit();
|
||||
}
|
||||
|
||||
}
|
||||
function showPreview(source) {
|
||||
var file = source.files[0];
|
||||
if(window.FileReader) {
|
||||
var fr = new FileReader();
|
||||
fr.onloadend = function(e) {
|
||||
document.getElementById("avatar_image").src = e.target.result;
|
||||
};
|
||||
fr.readAsDataURL(file);
|
||||
}
|
||||
}
|
||||
var province = "<%= "#{province}" %>";
|
||||
var city = "<%= "#{city}" %>";
|
||||
init_province_and_city(document.getElementById('schollProvince'), province, document.getElementById('schoolCity'), city);
|
||||
/*
|
||||
function update_school(){
|
||||
var htmlvalue = "<%#= escape_javascript( render :partial => 'managements/all_schools',:locals => {:schools => @schools, :edit_id => @edit_id, :upload => 1}) %>";
|
||||
pop_box_new(htmlvalue, 400, 260);
|
||||
};*/
|
||||
|
||||
|
||||
</script>
|
||||
|
|
@ -1,5 +1,9 @@
|
|||
<div class="panel-mes-head clearfix">
|
||||
<h4 class="fl">全部回复<span class="ml5">(<%= count %>)</span></h4>
|
||||
<h4 class="fl">全部回复<span class="ml5">
|
||||
<% unless count == 0 %>
|
||||
(<%= count %>)
|
||||
<% end %>
|
||||
</span></h4>
|
||||
<p class="fr mr15">
|
||||
<a href="javascript:void(0);" class="mr15 white-btn orange-btn" onclick="editor_focus(<%= memo.id %>);"><i class="fa fa-comments-o mr5"></i>回复<!--<span class="ml5"><%#= count %></span>--></a>
|
||||
<!--<span class="mr10 color-grey"><i class="fa fa-eye color-grey mr5"></i><%#= @topic.visits %></span>-->
|
||||
|
|
@ -69,8 +73,8 @@
|
|||
<p class="fr mr10 orig_reply">
|
||||
<% if comment.creator_user == User.current %>
|
||||
<a href="javascript:void(0);" class="color-grey" id="delete_reply_<%= memo.id %>_<%=comment.id %>" onclick="delete_confirm_box_2('<%= forum_memo_path(comment.forum, comment, :user_activity_id => memo.id) %>', '确定要删除该条回复吗?')"><i class="fa fa-trash-o mr5"></i>删除</a>
|
||||
<span class="ml5 mr5 color-grey">|</span>
|
||||
<% end %>
|
||||
<span class="ml5 mr5 color-grey">|</span>
|
||||
<%= link_to(
|
||||
'<i class="fa fa-mail-reply mr5"></i>回复'.html_safe,
|
||||
{:controller => 'users' ,:action => 'reply_to',:reply_id => comment.id, :type => memo.class.to_s, :user_activity_id => memo.id},
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@
|
|||
<div class="edu-class-container edu-position">
|
||||
<p class="mb10 font-14">
|
||||
<i class="fa fa-map-marker mr5 color-grey"></i>
|
||||
<a href="<%= user_path(@user.show_name)%>"><%= @user.show_name %></a> > <a href="<%= forums_path %>">讨论 </a>
|
||||
<a href="<%= user_path(@user.show_name)%>"><%= @user.show_name %></a> > <a href="<%= forums_path %>">讨论区 </a>
|
||||
</p>
|
||||
<div class="edu-con-top user_bg_shadow bor-grey-e clearfix mb20">
|
||||
<p class="ml15 color-grey3 fl">
|
||||
讨论详情
|
||||
帖子详情
|
||||
</p>
|
||||
<!-- <p class="color-grey fr font-12 mr15 mt5"><a href="javascript:void(0)">返回</a></p>-->
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
<div class="panel-mes-head clearfix">
|
||||
<h4 class="fl">全部回复<span class="ml5">(<%= count %>)</span></h4>
|
||||
<h4 class="fl">全部回复<span class="ml5">
|
||||
<% unless count == 0 %>
|
||||
(<%= count %>)
|
||||
<% end %>
|
||||
</span></h4>
|
||||
<p class="fr mr15">
|
||||
<a href="javascript:void(0);" class="mr15 white-btn orange-btn" onclick="editor_focus(<%= activity.id %>);"><i class="fa fa-comments-o mr5"></i>回复<!--<span class="ml5"><%#= count %></span>--></a>
|
||||
<!--<span class="mr10 color-grey"><i class="fa fa-eye color-grey mr5"></i><%#= @topic.visits %></span>-->
|
||||
|
|
@ -38,29 +42,8 @@
|
|||
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 50, :height => 50, :alt => "用户头像"), user_url_in_org(comment.creator_user), :target => '_blank' %>
|
||||
</div>
|
||||
<div class="t_content fl">
|
||||
<div class="J_Comment_Info clearfix">
|
||||
<div class="t_info fl">
|
||||
<%= link_to comment.creator_user.show_real_name, user_url_in_org(comment.creator_user), :class => "content-username hide fl" %>
|
||||
<span class="t_area fl"><%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %></span>
|
||||
</div>
|
||||
<p class="fr mr10 orig_reply">
|
||||
<% if is_teacher || comment.creator_user == User.current%>
|
||||
<a href="javascript:void(0);" class="color-grey" id="delete_reply_<%=activity.id %>_<%=comment.id %>" onclick="delete_confirm_box_2('<%= delete_board_message_path(:id => comment, :user_activity_id => activity.id, :activity_id => activity.id) %>', '确定要删除该条回复吗?')"><i class="fa fa-trash-o mr5"></i>删除</a>
|
||||
<% end %>
|
||||
<span class="ml5 mr5 color-grey">|</span>
|
||||
<%= link_to(
|
||||
'<i class="fa fa-mail-reply mr5"></i>回复'.html_safe,
|
||||
{:controller => 'users' ,:action => 'reply_to',:reply_id => comment.id, :type => activity.class.to_s, :user_activity_id => activity.id},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply),:class => "color-grey") %>
|
||||
<span class="ml5 mr5 color-grey">|</span>
|
||||
<span class="reply_praise_count_<%= comment.id %>">
|
||||
<%=render :partial=> "praise_tread/edu_praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="J_Comment_Reply">
|
||||
|
||||
<div class="J_Comment_Reply">
|
||||
<div class="comment_orig_content" style="margin:0px">
|
||||
<% if !comment.parent.nil? && !comment.parent.parent.nil? %>
|
||||
<% parents_rely = [] %>
|
||||
|
|
@ -95,6 +78,29 @@
|
|||
<!--onmouseover="$('#delete_reply_<%#=activity.id %>_<%#=comment.id %>').show();" onmouseout="$('#delete_reply_<%#=activity.id %>_<%#=comment.id %>').hide();"-->
|
||||
<div class="comment_content clearfix" >
|
||||
<div class="color-grey3"><%= comment.content_detail.html_safe %></div>
|
||||
|
||||
<div class="J_Comment_Info clearfix">
|
||||
<div class="t_info fl">
|
||||
<%= link_to comment.creator_user.show_real_name, user_url_in_org(comment.creator_user), :class => "content-username hide fl" %>
|
||||
<span class="t_area fl"><%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %></span>
|
||||
</div>
|
||||
<p class="fr mr10 orig_reply">
|
||||
<% if is_teacher || comment.creator_user == User.current%>
|
||||
<a href="javascript:void(0);" class="color-grey" id="delete_reply_<%=activity.id %>_<%=comment.id %>" onclick="delete_confirm_box_2('<%= delete_board_message_path(:id => comment, :user_activity_id => activity.id, :activity_id => activity.id) %>', '确定要删除该条回复吗?')"><i class="fa fa-trash-o mr5"></i>删除</a>
|
||||
<% end %>
|
||||
<span class="ml5 mr5 color-grey">|</span>
|
||||
<%= link_to(
|
||||
'<i class="fa fa-mail-reply mr5"></i>回复'.html_safe,
|
||||
{:controller => 'users' ,:action => 'reply_to',:reply_id => comment.id, :type => activity.class.to_s, :user_activity_id => activity.id},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply),:class => "color-grey") %>
|
||||
<span class="ml5 mr5 color-grey">|</span>
|
||||
<span class="reply_praise_count_<%= comment.id %>">
|
||||
<%=render :partial=> "praise_tread/edu_praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="cl"></div>
|
||||
<div id="reply_message_<%= comment.id%>" class="reply_to_message"></div>
|
||||
|
|
|
|||
|
|
@ -2,19 +2,23 @@
|
|||
<a href='<%= praise_tread_praise_plus_path({:obj_id => activity.id,
|
||||
:obj_type => activity.class,
|
||||
:user_activity_id => user_activity_id,
|
||||
:type => type }) %>' data-remote="true" class="white-btn orange-btn" title="点赞">
|
||||
:type => type }) %>' data-remote="true" class="white-btn orange-btn" data-tip-down="点赞">
|
||||
<i class="fa fa-thumbs-up mr5"></i>赞
|
||||
<%# num = activity.praise_tread_cache ? activity.praise_tread_cache.praise_num : 0 %>
|
||||
<!--<span><%#= (num.nil? ? 0 : num) > 0 ? num : 0 %></span>-->
|
||||
<% unless get_praise_num(activity) == 0%>
|
||||
<span><%= get_praise_num(activity) %></span>
|
||||
<% end %>
|
||||
</a>
|
||||
<% else %>
|
||||
<a href='<%= praise_tread_praise_minus_path({:obj_id => activity.id,
|
||||
:obj_type => activity.class,
|
||||
:user_activity_id => user_activity_id,
|
||||
:type => type }) %>' data-remote="true" class="white-btn orange-bg-btn" title="取消点赞" >
|
||||
:type => type }) %>' data-remote="true" class="white-btn orange-bg-btn" data-tip-down ="取消点赞" >
|
||||
<i class="fa fa-thumbs-up mr5"></i>赞
|
||||
<span><%= get_praise_num(activity) %></span>
|
||||
<% unless get_praise_num(activity) == 0%>
|
||||
<span><%= get_praise_num(activity) %></span>
|
||||
<% end %>
|
||||
<%# num = activity.praise_tread_cache ? activity.praise_tread_cache.praise_num : 0 %>
|
||||
<!--<span><%#= (num.nil? ? 0 : num) > 0 ? num : 0 %></span>-->
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -2,19 +2,23 @@
|
|||
<a href='<%= praise_tread_praise_plus_path({:obj_id => activity.id,
|
||||
:obj_type => activity.class,
|
||||
:user_activity_id => user_activity_id,
|
||||
:type => type }) %>' data-remote="true" class="fr mr5 color-grey" title="点赞">
|
||||
:type => type }) %>' data-remote="true" class="fr mr5 color-grey" data-tip-down="点赞">
|
||||
<i class="fa fa-thumbs-up mr5"></i>赞
|
||||
<%# num = activity.praise_tread_cache ? activity.praise_tread_cache.praise_num : 0 %>
|
||||
<!-- <span class="ml5"><%#= (num.nil? ? 0 : num) > 0 ? num : 0 %></span>-->
|
||||
<span class="ml5"><%= get_praise_num(activity) %></span>
|
||||
<% unless get_praise_num(activity)==0 %>
|
||||
<span class="ml5"><%= get_praise_num(activity) %></span>
|
||||
<% end %>
|
||||
</a>
|
||||
<% else %>
|
||||
<a href='<%= praise_tread_praise_minus_path({:obj_id => activity.id,
|
||||
:obj_type => activity.class,
|
||||
:user_activity_id => user_activity_id,
|
||||
:type => type }) %>' data-remote="true" class="fr mr5 color-orange03" title="取消点赞" >
|
||||
:type => type }) %>' data-remote="true" class="fr mr5 color-orange03" data-tip-down="取消点赞" >
|
||||
<i class="fa fa-thumbs-up mr5"></i>赞
|
||||
<span class="ml5"><%= get_praise_num(activity) %></span>
|
||||
<% unless get_praise_num(activity)==0 %>
|
||||
<span class="ml5"><%= get_praise_num(activity) %></span>
|
||||
<% end %>
|
||||
<%# num = activity.praise_tread_cache ? activity.praise_tread_cache.praise_num : 0 %>
|
||||
<!--<span class="ml5"><%#= (num.nil? ? 0 : num) > 0 ? num : 0 %></span>-->
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -63,4 +63,25 @@
|
|||
</div>
|
||||
|
||||
<% html_title(l(:label_repository)) -%>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(window).load(function(){
|
||||
//set_popupbox_position();
|
||||
})
|
||||
$(window).resize(function(){
|
||||
//setposition();
|
||||
})
|
||||
function set_popupbox_position(){
|
||||
var wid1=parseInt($(document).width());
|
||||
var wid2=parseInt($(".newContainer").width());
|
||||
var wid3=parseInt($(".popup_tip_box").width());
|
||||
|
||||
if(wid1>wid2){
|
||||
$(".newContainer").width(wid1);
|
||||
}
|
||||
}
|
||||
|
||||
function setposition(){
|
||||
|
||||
}
|
||||
</script>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<div class="task-popup" style="width: 563px;">
|
||||
<div class=" task-popup-title clearfix">
|
||||
<h3 class="fl color-grey">提示</h3>
|
||||
<a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>
|
||||
<!--<a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>-->
|
||||
</div>
|
||||
<div class="task-popup-content">
|
||||
<p class="task-popup-text-center font-16">
|
||||
|
|
|
|||
|
|
@ -1,10 +1,24 @@
|
|||
<% update_visiti_count @shixun %>
|
||||
<div class="task-header">
|
||||
<div class="task-header-info">
|
||||
<h2 class="fl font-24">
|
||||
<a href="<%= user_path(@shixun.owner) %>" class="task-header-name fl"><%= @shixun.owner.try(:show_name) %></a>
|
||||
<span class="ml5 mr5 fl">/ </span><p class="task-header-title fl"><%= @shixun.name %></p>
|
||||
</h2>
|
||||
<div class="fl">
|
||||
<h2 class="fl font-24">
|
||||
<a href="<%= user_path(@shixun.owner) %>" class="task-header-name fl"><%= @shixun.owner.try(:show_name) %></a>
|
||||
<span class="ml5 mr5 fl">/ </span><p class="task-header-title fl"><%= @shixun.name %></p>
|
||||
</h2>
|
||||
<% if @shixun.fork_from.present? %>
|
||||
<% fork_shixun = Shixun.find(@shixun.fork_from) %>
|
||||
<div class="cl"></div>
|
||||
<span class="font-16 color-grey">forked from <a href="<%= shixun_path(fork_shixun) %>" class="color-orange05" target="_blank"><%= fork_shixun.owner.try(:show_name) %>/<%= fork_shixun.name %></a></span>
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
<% unless User.current.manager_of_shixun?(@shixun) %>
|
||||
<span class="font-16 color-grey fl" data-tip-down = "技术平台"><%= @shixun.language %></span>
|
||||
<span class="font-16 color-grey fl ml20" data-tip-down = "面向学员"><%= @shixun.shixun_trainee %></span>
|
||||
<span class="font-16 color-grey fl ml20" data-tip-down = "适用课程"><%= @shixun.shixun_major_courses.blank? ? "" : CourseList.where(:id => @shixun.shixun_major_courses.map(&:course_list_id)).map(&:name).join("、") %></span>
|
||||
<% end %>
|
||||
</div>
|
||||
<!-- <div><%#= link_to "测试", shixun_test_shixun_path(@shixun), :class => "fl ml10 mr10" %></div>-->
|
||||
<% myshixun = Myshixun.where(:user_id => User.current.id, :shixun_id => @shixun.id).first %>
|
||||
<% if allow_shixun_exec(@shixun) %>
|
||||
|
|
@ -36,21 +50,19 @@
|
|||
<a href="javascript:void(0);" class="fr shixun-task-ban-btn mr15">已关闭</a>
|
||||
<% end %>
|
||||
<% if (@shixun.can_copy && User.current.user_extensions.try(:identity) == 0 && User.current.professional_certification) %>
|
||||
<div class = "fr shixun-task-btn" data-tip-down = "基于这个实训修改形成新的实训">
|
||||
<a href="javascript:void(0);" class="fr pro_new_topbtn mr15 fork" title="fork成员列表"><%= Shixun.where(:fork_from => @shixun.id).count %></a>
|
||||
<a href="javascript:void(0);" onclick="op_confirm_box_loading('<%= copy_shixun_path(@shixun) %>', '复制将在后台执行</br>平台将为你创建一个新的同名实训和内容,请问是否继续?');" class = "pro_new_topbtn_left fr fork">
|
||||
<span class='vl_fork'></span>Fork
|
||||
</a>
|
||||
<div class = "fr shixun-task-btn">
|
||||
<span class="fr mr15" data-tip-down = "Fork实训列表">
|
||||
<a href="<%= fork_list_shixun_path(@shixun) %>" class="pro_new_topbtn fl fork"><%= Shixun.where(:fork_from => @shixun.id).count %></a>
|
||||
</span>
|
||||
<span class="fr" data-tip-down = "基于这个实训修改形成新的实训">
|
||||
<a href="javascript:void(0);" onclick="op_confirm_box_loading('<%= copy_shixun_path(@shixun) %>', '复制将在后台执行</br>平台将为你创建一个新的同名实训和内容,请问是否继续?');" class = "pro_new_topbtn_left fl fork">
|
||||
<span class='vl_fork'></span>Fork
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<% unless User.current.manager_of_shixun?(@shixun) %>
|
||||
<span class="font-16 color-grey fl" data-tip-down = "技术平台"><%= @shixun.language %></span>
|
||||
<span class="font-16 color-grey fl ml20" data-tip-down = "面向学员"><%= @shixun.shixun_trainee %></span>
|
||||
<span class="font-16 color-grey fl ml20" data-tip-down = "适用课程"><%= @shixun.shixun_major_courses.blank? ? "" : CourseList.where(:id => @shixun.shixun_major_courses.map(&:course_list_id)).map(&:name).join("、") %></span>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="loading_all" style="display: none">
|
||||
|
|
@ -64,14 +76,14 @@
|
|||
$(".task-header-info .shixun-task-btn").css("margin-top",$(".task-header-info").height() / 2 - 15);
|
||||
$(".shixun-task-ban-btn").css("margin-top",$(".task-header-info").height() / 2 - 15);
|
||||
|
||||
function apply_publish_shixun(url){
|
||||
if($("#apply_publish_shixun").attr("data-option") == '1'){
|
||||
$("#apply_publish_shixun").attr("data-option", 0);
|
||||
$("#apply_publish_shixun").addClass("disabled-grey-bg");
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'get'
|
||||
});
|
||||
}
|
||||
}
|
||||
function apply_publish_shixun(url){
|
||||
if($("#apply_publish_shixun").attr("data-option") == '1'){
|
||||
$("#apply_publish_shixun").attr("data-option", 0);
|
||||
$("#apply_publish_shixun").addClass("disabled-grey-bg");
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'get'
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,72 @@
|
|||
<div class="task-index">
|
||||
<div class="edu-con-top user_bg_shadow bor-grey-e clearfix mb20 mt30">
|
||||
<p class="ml15 fl color-grey3">
|
||||
<span>Fork实训列表</span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="mt30 mb30">
|
||||
<div class="task-index-list clearfix mb20 mh320">
|
||||
<% if @shixuns.blank? %>
|
||||
<div style="background: #fff;padding-bottom: 15px;" class="box_bg_shandow bor-grey-e ">
|
||||
<%= render :partial => "welcome/no_data" %>
|
||||
</div>
|
||||
<% else %>
|
||||
<% @shixuns.each do |shixun| %>
|
||||
<div class="task-index-list-box fl pr">
|
||||
<% if shixun.status == 2%>
|
||||
<p class="triangle-topright font-12"></p>
|
||||
<span class="triangle-font">已发布</span>
|
||||
<% end %>
|
||||
<% if shixun.status < 2 && !User.current.manager_of_shixun?(shixun) %>
|
||||
<div class="black-half">
|
||||
<div class="black-half-lock"><i class="fa fa-lock" style="font-size: 50px"></i></div>
|
||||
<div class="black-half-info font-16">非试用内容,需要授权</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="task-index-list-box-top xy_box" onclick="shixun_link('<%= shixun.identifier %>')" style="cursor: pointer;">
|
||||
<p class="task-index-list-title two_lines_show">
|
||||
<a href="javascript:void(0);"><%= shixun.name %></a>
|
||||
</p>
|
||||
<div class="clearfix task-index-list-user task_yx_bo">
|
||||
<a href="javascript:void(0);"><%= image_tag(url_to_avatar(shixun.owner), :width =>"60", :height => "60", :class => "panel-warp-img mr10 fl", :alt=>"头像") %></a>
|
||||
<span class="task-index-name task-hide fl"><%= shixun.owner.try(:show_name) %></span>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<span class="mt10 mb10"><%= shixun.language %></span>
|
||||
<p class="xy_level"><%= shixun.shixun_trainee %></p>
|
||||
</div>
|
||||
<ul class="task-index-list-box-bottom clearfix">
|
||||
<li><i class="fa fa-tasks color-light-green mr5" data-tip-down="实训任务"></i><span><%= shixun.challenges.count %></span></li>
|
||||
<li><i class="fa fa-users color-light-green mr5" data-tip-down="学习人数"></i><span><%= shixun.myshixuns.count %></span></li>
|
||||
<li><i class="fa fa-viacoin color-light-green mr5" data-tip-down="实训经验值"></i><span><%= shixun.shixun_score %></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<div style="text-align:center;">
|
||||
<div class="pages_right_min" style="width:auto; display:inline-block;">
|
||||
<ul id="homework_pository_ref_pages">
|
||||
<%= pagination_links_full @shixun_pages, @shixuns_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var timer="";
|
||||
$(".task-index-list-box").hover(function(ev){
|
||||
this.fn = function(){
|
||||
$(this).find(".black-half").show();
|
||||
}
|
||||
clearTimeout(timer);
|
||||
var item=$(this);
|
||||
timer=setTimeout(this.fn(),500);
|
||||
},function(){
|
||||
clearTimeout(timer);
|
||||
$(this).find(".black-half").hide();
|
||||
})
|
||||
</script>
|
||||
|
|
@ -94,6 +94,14 @@
|
|||
<input type="radio" class="undis" name="language" id="language_verilog" value="verilog">
|
||||
<label for="language_verilog">verilog</label>
|
||||
</li>
|
||||
<li class="fl">
|
||||
<input type="radio" class="undis" name="language" id="language_PHP" value="PHP">
|
||||
<label for="language_PHP">PHP</label>
|
||||
</li>
|
||||
<li class="fl">
|
||||
<input type="radio" class="undis" name="language" id="language_PHP/Web" value="PHP/Web">
|
||||
<label for="language_PHP/Web">PHP/Web</label>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
<div class="panel-mes-head clearfix">
|
||||
<p class="fl font-16">全部回复<span class="ml5">(<%= count %>)</span></p>
|
||||
<p class="fl font-16">全部回复<span class="ml5">
|
||||
<% unless count == 0 %>
|
||||
(<%= count %>)
|
||||
<% end %>
|
||||
</span></p>
|
||||
<p class="fr mr15">
|
||||
|
||||
<a href="javascript:void(0);" class="fr white-btn orange-btn" onclick="editor_focus(<%= activity.id %>);"><i class="fa fa-mail-reply mr5"></i>回复<!--<span class="ml5"><%#= count %></span>--></a>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
|
||||
<div class="df">
|
||||
<div class="orig_user fl">
|
||||
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => "32", :height => "32"), user_path(comment.creator_user), :target => "_blank", :alt => "用户头像" %>
|
||||
</div>
|
||||
|
|
@ -7,17 +9,17 @@
|
|||
autoUrl('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<div class="with90 fl" onmouseout="$(this).find('.reply-right').hide();" onmouseover="$(this).find('.reply-right').show();">
|
||||
<div class="orig_right" style="width: 96%">
|
||||
<div class="orig_content clearfix" id="reply_content_<%= comment.id %>">
|
||||
<div class="fl" style="flex:1" onmouseout="$(this).find('.reply-right').hide();" onmouseover="$(this).find('.reply-right').show();">
|
||||
<div class="orig_right" style="width: 99%">
|
||||
<div class="orig_content clearfix justify" id="reply_content_<%= comment.id %>">
|
||||
<%= comment.content_detail.html_safe %>
|
||||
</div>
|
||||
|
||||
<%= link_to comment.creator_user.show_real_name, user_path(comment.creator_user), :class => "content-username hide fl" %>
|
||||
<span class="t_area"><%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %></span>
|
||||
<div class="fr pr mr10 orig_reply h24" style="width: 110px">
|
||||
<div class="fr pr orig_reply h24" style="width: 110px">
|
||||
<div class="reply clearfix">
|
||||
<div class="reply-right none" style="position: absolute; right: -35px;">
|
||||
<div class="reply-right none" style="position: absolute; right: -0px;">
|
||||
<%= link_to('<i class="fa fa-mail-reply mr5"></i>回复'.html_safe,
|
||||
{:controller => 'users',
|
||||
:action => 'reply_to_comment',
|
||||
|
|
@ -39,4 +41,5 @@
|
|||
|
||||
<div id="reply_message_<%= comment.id%>" class="reply_to_message clearfix"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
|
@ -1,174 +1,174 @@
|
|||
<div class="show_hwork_arrow"></div>
|
||||
<div class="showHwork">
|
||||
<ul>
|
||||
<li class="fl" >
|
||||
<span class="tit_fb">上交时间:</span>
|
||||
<%=format_time work.commit_time %>
|
||||
<a href="javascript:void(0);" class="linkBlue mt5 mb5" style="margin-left:165px; width: 24px;" onclick="$('#about_hwork_<%= work.id%>').html('');">收起</a>
|
||||
</li>
|
||||
|
||||
<% if work.user == User.current && @homework.end_time >= Time.now %>
|
||||
<!-- 我的作业 && 匿评作业 && 未开启匿评,显示编辑和删除按钮 -->
|
||||
<li class="fr" >
|
||||
<%= link_to("", student_work_path(work),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "pic_del") %>
|
||||
</li>
|
||||
<li class="fr" >
|
||||
<%= link_to "",new_student_work_path(:homework => @homework.id),:class => "pic_edit"%>
|
||||
</li>
|
||||
<% end%>
|
||||
<% if @homework.homework_detail_manual.comment_status == 3 && work.user != User.current%>
|
||||
<!-- 匿评结束阶段,显示点赞按钮 -->
|
||||
<li class="fr" id="student_work_praise_<%= work.id%>">
|
||||
<%= render :partial => 'student_work_praise',:locals => {:work => work} %>
|
||||
</li>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
|
||||
<li>
|
||||
<span class="tit_fb">编程代码:</span>
|
||||
<div class="showHworkP break_word">
|
||||
<pre id="work-src_<%= work.id%>" style="display: none;"><%= work.description if work.description%></pre>
|
||||
<div class="fontGrey2 font_cus" id="work-code_<%= work.id%>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
|
||||
<div class="cl"></div>
|
||||
<li class="mt10">
|
||||
<span class="tit_fb ">
|
||||
测试结果:
|
||||
</span>
|
||||
<div class="show_hwork_p break_word">
|
||||
<% work.student_work_tests.each_with_index do |test, index| %>
|
||||
<div class="ProResultTop">
|
||||
<p class="c_blue fl">
|
||||
第<%= work.student_work_tests.count - index%>次测试
|
||||
</p>
|
||||
<span class="fr c_grey">
|
||||
<%= format_time(test.created_at).to_s %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% if test.status.to_i == -2 %>
|
||||
<div class="ProResultCon ">
|
||||
<%= test.results.first %>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="ProResultTable">
|
||||
<div class="ProResultUl">
|
||||
<% test.results.reverse.each_with_index do |x, i| %>
|
||||
<% unless x.nil? %>
|
||||
<%= %>
|
||||
<div>
|
||||
<span class="w60 T_C">测试<%=test.results.size-i%></span>
|
||||
<% if x["status"].to_i != 0 %>
|
||||
<% if x["status"].to_i == 2 %>
|
||||
<span class="w60 c_red">超时!</span>
|
||||
<% else %>
|
||||
<span class="w60 c_red">测试错误!</span>
|
||||
<% end %>
|
||||
<span style="width: 340px; padding-left: 20px;">
|
||||
<a href="javascript:void(0)" class="linkBlue test_result_link_expand">查看</a>
|
||||
</span>
|
||||
|
||||
<span class="w50">耗时:</span>
|
||||
<span class="w80"><pre><%=x["time_used"]==0?1:x["time_used"]%>毫秒</pre></span>
|
||||
<div class="cl"></div>
|
||||
<% else %>
|
||||
<span class="w60 c_green">测试正确!</span>
|
||||
<span style="width:360px;"> </span>
|
||||
<span class="w50">耗时:</span>
|
||||
<span class="w80"><pre><%=x["time_used"]==0?1:x["time_used"]%>毫秒</pre></span>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% if x["status"].to_i != 0 %>
|
||||
<div class="none test_result_block">
|
||||
<div style="max-height: 350px; overflow: auto;">
|
||||
<span style="width: 120px;"> </span>
|
||||
<span class="w60">您的输出:</span>
|
||||
<span class="width120"><pre style="white-space: pre-wrap; margin-right: 15px;"><%=x["result"].force_encoding("UTF-8")%> </pre></span>
|
||||
<span class="w60">正确输出:</span>
|
||||
<span class="width120"><pre style="white-space: pre-wrap; margin-right: 15px;"><%=x["output"].force_encoding("UTF-8")%></pre></span>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<p class="text_c c_blue">
|
||||
<a href="javascript:void(0);" class="test_result_link_hidden linkBlue">收起</a>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<% if @is_teacher || (@homework.homework_detail_manual.comment_status == 2 && work.user != User.current )%>
|
||||
<!-- 老师 || 开启匿评状态 && 不是当前用户自己的作品 -->
|
||||
<ul id="add_student_score_<%= work.id %>" class="mt10 evaluation">
|
||||
<%= render :partial => 'add_score',:locals => {:work => work, :score => score, :is_member_work => false}%>
|
||||
</ul>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div id="revise_attachment">
|
||||
<%= render :partial => 'student_work/revise_attachment', :locals => {:work => work} %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div class="ping_box fl" id="score_list_<%= work.id %>" style="<%= student_work_scores.empty? ? 'padding:0px;' : ''%>">
|
||||
<%= render :partial => 'student_work_score_records', :locals => {:student_work_scores => student_work_scores, :is_member_work => false} %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<!---ping_box end--->
|
||||
<a href="javascript:void(0);" class="linkBlue mt5 mb5" style="margin-left:auto; margin-right: auto; display:block; width: 24px;" onclick="$('#about_hwork_<%= work.id%>').html('');">收起</a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
<% if defined?(is_focus) && is_focus.to_i == 1 %>
|
||||
$("#upload_revise_attachment").click();
|
||||
<% end %>
|
||||
$(".test_result_link_expand").on('click', function(){
|
||||
$(this).parent().parent().next().toggle();
|
||||
});
|
||||
$(".test_result_link_hidden").on('click', function(){
|
||||
$(this).parent().parent().toggle();
|
||||
});
|
||||
});
|
||||
function show_upload(){
|
||||
var htmlvalue = "<%= escape_javascript( render :partial => 'student_work/upload_attachment' ,:locals => {:work=>work})%>";
|
||||
pop_box_new(htmlvalue, 500, 230);
|
||||
}
|
||||
function regex_des() {
|
||||
if ($.trim($("#attachment_des").val()) == "") {
|
||||
$("#hint_message").text("附件描述不能为空");
|
||||
$("#hint_message").css('color','#ff0000');
|
||||
return false;
|
||||
} else {
|
||||
$("#hint_message").text("");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
function submit_revise_files(){
|
||||
if (regex_des()) {
|
||||
$("#upload_form").submit();
|
||||
}
|
||||
}
|
||||
function closeModal(){
|
||||
hideModal($(".uploadBoxContainer"));
|
||||
}
|
||||
function disable_choose(){
|
||||
if ($("#attachments_fields .attachment").size() >= 1) {
|
||||
$("#choose_revise_attach").attr("onclick","return false;").addClass(disable_link);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div class="show_hwork_arrow"></div>
|
||||
<div class="showHwork">
|
||||
<ul>
|
||||
<li class="fl" >
|
||||
<span class="tit_fb">上交时间:</span>
|
||||
<%=format_time work.commit_time %>
|
||||
<a href="javascript:void(0);" class="linkBlue mt5 mb5" style="margin-left:165px; width: 24px;" onclick="$('#about_hwork_<%= work.id%>').html('');">收起</a>
|
||||
</li>
|
||||
|
||||
<% if work.user == User.current && @homework.end_time >= Time.now %>
|
||||
<!-- 我的作业 && 匿评作业 && 未开启匿评,显示编辑和删除按钮 -->
|
||||
<li class="fr" >
|
||||
<%= link_to("", student_work_path(work),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "pic_del") %>
|
||||
</li>
|
||||
<li class="fr" >
|
||||
<%= link_to "",new_student_work_path(:homework => @homework.id),:class => "pic_edit"%>
|
||||
</li>
|
||||
<% end%>
|
||||
<% if @homework.homework_detail_manual.comment_status == 3 && work.user != User.current%>
|
||||
<!-- 匿评结束阶段,显示点赞按钮 -->
|
||||
<li class="fr" id="student_work_praise_<%= work.id %>">
|
||||
<%= render :partial => 'student_work_praise',:locals => {:work => work} %>
|
||||
</li>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
|
||||
<li>
|
||||
<span class="tit_fb">编程代码:</span>
|
||||
<div class="showHworkP break_word">
|
||||
<pre id="work-src_<%= work.id%>" style="display: none;"><%= work.description if work.description%></pre>
|
||||
<div class="fontGrey2 font_cus" id="work-code_<%= work.id%>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
|
||||
<div class="cl"></div>
|
||||
<li class="mt10">
|
||||
<span class="tit_fb ">
|
||||
测试结果:
|
||||
</span>
|
||||
<div class="show_hwork_p break_word">
|
||||
<% work.student_work_tests.each_with_index do |test, index| %>
|
||||
<div class="ProResultTop">
|
||||
<p class="c_blue fl">
|
||||
第<%= work.student_work_tests.count - index%>次测试
|
||||
</p>
|
||||
<span class="fr c_grey">
|
||||
<%= format_time(test.created_at).to_s %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% if test.status.to_i == -2 %>
|
||||
<div class="ProResultCon ">
|
||||
<%= test.results.first %>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="ProResultTable">
|
||||
<div class="ProResultUl">
|
||||
<% test.results.reverse.each_with_index do |x, i| %>
|
||||
<% unless x.nil? %>
|
||||
<%= %>
|
||||
<div>
|
||||
<span class="w60 T_C">测试<%=test.results.size-i%></span>
|
||||
<% if x["status"].to_i != 0 %>
|
||||
<% if x["status"].to_i == 2 %>
|
||||
<span class="w60 c_red">超时!</span>
|
||||
<% else %>
|
||||
<span class="w60 c_red">测试错误!</span>
|
||||
<% end %>
|
||||
<span style="width: 340px; padding-left: 20px;">
|
||||
<a href="javascript:void(0)" class="linkBlue test_result_link_expand">查看</a>
|
||||
</span>
|
||||
|
||||
<span class="w50">耗时:</span>
|
||||
<span class="w80"><pre><%=x["time_used"]==0?1:x["time_used"]%>毫秒</pre></span>
|
||||
<div class="cl"></div>
|
||||
<% else %>
|
||||
<span class="w60 c_green">测试正确!</span>
|
||||
<span style="width:360px;"> </span>
|
||||
<span class="w50">耗时:</span>
|
||||
<span class="w80"><pre><%=x["time_used"]==0?1:x["time_used"]%>毫秒</pre></span>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% if x["status"].to_i != 0 %>
|
||||
<div class="none test_result_block">
|
||||
<div style="max-height: 350px; overflow: auto;">
|
||||
<span style="width: 120px;"> </span>
|
||||
<span class="w60">您的输出:</span>
|
||||
<span class="width120"><pre style="white-space: pre-wrap; margin-right: 15px;"><%=x["result"].force_encoding("UTF-8")%> </pre></span>
|
||||
<span class="w60">正确输出:</span>
|
||||
<span class="width120"><pre style="white-space: pre-wrap; margin-right: 15px;"><%=x["output"].force_encoding("UTF-8")%></pre></span>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<p class="text_c c_blue">
|
||||
<a href="javascript:void(0);" class="test_result_link_hidden linkBlue">收起</a>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<% if @is_teacher || (@homework.homework_detail_manual.comment_status == 2 && work.user != User.current )%>
|
||||
<!-- 老师 || 开启匿评状态 && 不是当前用户自己的作品 -->
|
||||
<ul id="add_student_score_<%= work.id %>" class="mt10 evaluation">
|
||||
<%= render :partial => 'add_score',:locals => {:work => work, :score => score, :is_member_work => false}%>
|
||||
</ul>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div id="revise_attachment">
|
||||
<%= render :partial => 'student_work/revise_attachment', :locals => {:work => work} %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div class="ping_box fl" id="score_list_<%= work.id %>" style="<%= student_work_scores.empty? ? 'padding:0px;' : ''%>">
|
||||
<%= render :partial => 'student_work_score_records', :locals => {:student_work_scores => student_work_scores, :is_member_work => false} %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<!---ping_box end--->
|
||||
<a href="javascript:void(0);" class="linkBlue mt5 mb5" style="margin-left:auto; margin-right: auto; display:block; width: 24px;" onclick="$('#about_hwork_<%= work.id%>').html('');">收起</a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
<% if defined?(is_focus) && is_focus.to_i == 1 %>
|
||||
$("#upload_revise_attachment").click();
|
||||
<% end %>
|
||||
$(".test_result_link_expand").on('click', function(){
|
||||
$(this).parent().parent().next().toggle();
|
||||
});
|
||||
$(".test_result_link_hidden").on('click', function(){
|
||||
$(this).parent().parent().toggle();
|
||||
});
|
||||
});
|
||||
function show_upload(){
|
||||
var htmlvalue = "<%= escape_javascript( render :partial => 'student_work/upload_attachment' ,:locals => {:work=>work})%>";
|
||||
pop_box_new(htmlvalue, 500, 230);
|
||||
}
|
||||
function regex_des() {
|
||||
if ($.trim($("#attachment_des").val()) == "") {
|
||||
$("#hint_message").text("附件描述不能为空");
|
||||
$("#hint_message").css('color','#ff0000');
|
||||
return false;
|
||||
} else {
|
||||
$("#hint_message").text("");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
function submit_revise_files(){
|
||||
if (regex_des()) {
|
||||
$("#upload_form").submit();
|
||||
}
|
||||
}
|
||||
function closeModal(){
|
||||
hideModal($(".uploadBoxContainer"));
|
||||
}
|
||||
function disable_choose(){
|
||||
if ($("#attachments_fields .attachment").size() >= 1) {
|
||||
$("#choose_revise_attach").attr("onclick","return false;").addClass(disable_link);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,10 @@
|
|||
<span class="fl mr5 ml3">/</span>
|
||||
<%= link_to @shixun.name, shixun_path(@shixun), :class => "edu-info-dark fl", :target => "_blank" %>
|
||||
</p>
|
||||
<span class="edu-filter-cir-grey mr5 active fr" style="padding:2px 10px;" data-tip-down = "<%= @myshixun.total_score %>">经验值:<%= @myshixun.total_score %> </span>
|
||||
<div class="fr" data-tip-down="实战中获得的总经验值">
|
||||
<span class="edu-filter-cir-grey mr5 active " style="padding:2px 10px;">经验值:<%= @myshixun.total_score %> </span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="clearfix mb20 color-grey">
|
||||
<%= link_to image_tag(url_to_avatar(@work.user), :width =>"50", :height => "50", :alt=>"头像", :style => "width:50px; height:50px;"), user_path(@work.user), :class => "fl edu-work-user-img", :target => "_blank" %>
|
||||
|
|
|
|||
|
|
@ -111,97 +111,107 @@
|
|||
</ul>
|
||||
<div class="cl"></div>
|
||||
<div id="edu-tab-con-2" class="user_bg_shadow bor-grey-e undis">
|
||||
<div class="" style="padding:<%= @is_teacher ? '5px' : '15px' %> 15px;">
|
||||
<div class="" style="padding:<%= @is_teacher ? '5px' : '15px' %> 15px;">
|
||||
<div class="cl"></div>
|
||||
<div class="upload_img list_style">
|
||||
<%= @homework.description.html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cl"></div>
|
||||
<div class="upload_img list_style">
|
||||
<%= @homework.description.html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="panel-mes-head">
|
||||
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @homework} %>
|
||||
</ul>
|
||||
<% if @homework.homework_type == 3 %>
|
||||
<div class="edu-con-bg01">
|
||||
<div class="edu-con-top clearfix mb15">
|
||||
<p class="ml15 fl font-14 font-bd">分组要求</p>
|
||||
</div>
|
||||
<div class="edu-line font-14 pl15 pr15 pd15">
|
||||
<p>分组人数: <%= @homework.homework_detail_group.min_num %> - <%= @homework.homework_detail_group.max_num %> 人</p>
|
||||
<span class="color-orange">注:任一成员都可以提交作品,提交作品时需要关联同组成员,组内成员作品共享。</span>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if @homework.homework_type == 2 %>
|
||||
<% samples = @homework.homework_samples %>
|
||||
<% unless samples.empty? %>
|
||||
<div class="edu-con-bg01">
|
||||
<div class="edu-con-top clearfix mb15">
|
||||
<p class="ml15 fl font-14 font-bd">输入输出样例:<%= samples.count %> 组</p>
|
||||
</div>
|
||||
<div class="edu-line font-14">
|
||||
<% samples.each_with_index do |sample, index| %>
|
||||
<div class="clearfix mr15">
|
||||
<ul>
|
||||
<li class="clearfix">
|
||||
<label class="panel-form-label fl"> </label>
|
||||
<span class="color-green font-bd fl">样例<%= index + 1 %></span>
|
||||
</li>
|
||||
<li class="clearfix mb15">
|
||||
<label class="panel-form-label fl color-grey">样例输入 </label>
|
||||
<div class="fl edu-bg-grey">
|
||||
<pre class="mt10 ml10 mr10 mb10" style="font-family: '微软雅黑','宋体'; word-wrap:break-word; white-space:pre-wrap;"><%=sample.input.blank? ? " " : sample.input %></pre>
|
||||
</div>
|
||||
</li>
|
||||
<li class="clearfix mb15">
|
||||
<label class="panel-form-label fl color-grey">样例输出 </label>
|
||||
<div class="fl edu-bg-grey">
|
||||
<pre class="mt10 ml10 mr10 mb10" style="font-family: '微软雅黑','宋体'; word-wrap:break-word; white-space:pre-wrap;"><%=sample.output.blank? ? " " : sample.output %></pre>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% if false%>
|
||||
<div class="homework_explain"style="padding:<%= @is_teacher ? '5px' : '15px' %> 15px;">
|
||||
<p class="clearfix">
|
||||
<span class="fl font-14 font-bd mt5">作业说明:</span>
|
||||
<a href="javascript:void(0)" class="fr white-btn orange-btn edit-btn"><i class="fa fa-pencil mr5"></i>编辑</a>
|
||||
<a href="javascript:void(0)" class="fr white-btn orange-btn save-btn undis"><i class="fa fa-floppy-o mr5"></i>保存</a>
|
||||
</p>
|
||||
<p class="break-word" style="text-indent: 25px;">兴趣的信息,利用所学到的有关“协议与编码器”/解码器/转换器/处理器”的思维,为该类信息设计协议</p>
|
||||
<p></p><!--放置ke编辑器点击,点击编辑显示-->
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if @is_teacher %>
|
||||
<div class="edu-con-bg01">
|
||||
<div class="edu-con-top clearfix mb15">
|
||||
<p class="ml15 fl font-14 font-bd">测试集:<%=@homework.homework_tests.count %> 组</p>
|
||||
</div>
|
||||
<div class="edu-line font-14">
|
||||
<table class="edu-pop-table table-pa5 table-line mb15 ml15" style="width:97.5%;" cellspacing="0" cellpadding="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="edu-txt-center" width="10%">序号</th>
|
||||
<th class="edu-txt-left">测试集输入</th>
|
||||
<th class="edu-txt-left">测试集输出</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @homework.homework_tests.each_with_index do |test, i| %>
|
||||
<ul class="panel-mes-head" style="padding:<%= @is_teacher ? '5px' : '15px' %> 15px;">
|
||||
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @homework} %>
|
||||
</ul>
|
||||
<% if @homework.homework_type == 3 %>
|
||||
<div class="edu-con-bg01">
|
||||
<div class="edu-con-top clearfix mb15">
|
||||
<p class="ml15 fl font-14 font-bd">分组要求</p>
|
||||
</div>
|
||||
<div class="edu-line font-14 pl15 pr15 pd15">
|
||||
<p>分组人数: <%= @homework.homework_detail_group.min_num %> - <%= @homework.homework_detail_group.max_num %> 人</p>
|
||||
<span class="color-orange">注:任一成员都可以提交作品,提交作品时需要关联同组成员,组内成员作品共享。</span>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @homework.homework_type == 2 %>
|
||||
<% samples = @homework.homework_samples %>
|
||||
<% unless samples.empty? %>
|
||||
<div class="edu-con-bg01">
|
||||
<div class="edu-con-top clearfix mb15">
|
||||
<p class="ml15 fl font-14 font-bd">输入输出样例:<%= samples.count %> 组</p>
|
||||
</div>
|
||||
<div class="edu-line font-14">
|
||||
<% samples.each_with_index do |sample, index| %>
|
||||
<div class="clearfix mr15">
|
||||
<ul>
|
||||
<li class="clearfix">
|
||||
<label class="panel-form-label fl"> </label>
|
||||
<span class="color-green font-bd fl">样例<%= index + 1 %></span>
|
||||
</li>
|
||||
<li class="clearfix mb15">
|
||||
<label class="panel-form-label fl color-grey">样例输入 </label>
|
||||
<div class="fl edu-bg-grey">
|
||||
<pre class="mt10 ml10 mr10 mb10" style="font-family: '微软雅黑','宋体'; word-wrap:break-word; white-space:pre-wrap;"><%=sample.input.blank? ? " " : sample.input %></pre>
|
||||
</div>
|
||||
</li>
|
||||
<li class="clearfix mb15">
|
||||
<label class="panel-form-label fl color-grey">样例输出 </label>
|
||||
<div class="fl edu-bg-grey">
|
||||
<pre class="mt10 ml10 mr10 mb10" style="font-family: '微软雅黑','宋体'; word-wrap:break-word; white-space:pre-wrap;"><%=sample.output.blank? ? " " : sample.output %></pre>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @is_teacher %>
|
||||
<div class="edu-con-bg01">
|
||||
<div class="edu-con-top clearfix mb15">
|
||||
<p class="ml15 fl font-14 font-bd">测试集:<%=@homework.homework_tests.count %> 组</p>
|
||||
</div>
|
||||
<div class="edu-line font-14">
|
||||
<table class="edu-pop-table table-pa5 table-line mb15 ml15" style="width:97.5%;" cellspacing="0" cellpadding="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="edu-txt-center"><%=i+1 %></td>
|
||||
<td style="height:100%; width:48%;">
|
||||
<div style="height:100%; width:100%;"><pre style="font-family: '微软雅黑','宋体'; word-wrap:break-word; white-space:pre-wrap;"><%=test.input.blank? ? " " : test.input %></pre></div>
|
||||
</td>
|
||||
<td style="height:100%; width:48%;">
|
||||
<div style=" height:100%; width:100%;"><pre style="font-family: '微软雅黑','宋体'; word-wrap:break-word; white-space:pre-wrap;"><%=test.output.blank? ? " " : test.output %></pre></div>
|
||||
</td>
|
||||
<th class="edu-txt-center" width="10%">序号</th>
|
||||
<th class="edu-txt-left">测试集输入</th>
|
||||
<th class="edu-txt-left">测试集输出</th>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @homework.homework_tests.each_with_index do |test, i| %>
|
||||
<tr>
|
||||
<td class="edu-txt-center"><%=i+1 %></td>
|
||||
<td style="height:100%; width:48%;">
|
||||
<div style="height:100%; width:100%;"><pre style="font-family: '微软雅黑','宋体'; word-wrap:break-word; white-space:pre-wrap;"><%=test.input.blank? ? " " : test.input %></pre></div>
|
||||
</td>
|
||||
<td style="height:100%; width:48%;">
|
||||
<div style=" height:100%; width:100%;"><pre style="font-family: '微软雅黑','宋体'; word-wrap:break-word; white-space:pre-wrap;"><%=test.output.blank? ? " " : test.output %></pre></div>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="panel-mesbox" id="student_work_replies_box">
|
||||
<%= render :partial => 'student_work_replies' %>
|
||||
</div>
|
||||
<div class="panel-mesbox" id="student_work_replies_box">
|
||||
<%= render :partial => 'student_work_replies' %>
|
||||
</div>
|
||||
</div>
|
||||
<div id="edu-tab-con-1" class="user_bg_shadow bor-grey-e">
|
||||
<div class="padding15">
|
||||
|
|
@ -376,5 +386,17 @@
|
|||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
//编辑、保存作业说明
|
||||
$(".edit-btn").live("click",function(){
|
||||
$(this).siblings(".save-btn").show();
|
||||
$(this).hide();
|
||||
})
|
||||
$(".save-btn").live("click",function(){
|
||||
$(this).siblings(".edit-btn").show();
|
||||
$(this).hide();
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
<div class="df">
|
||||
<div class="orig_user fl">
|
||||
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => "33", :height => "33",:class => "bor-radius-all"), user_path(comment.creator_user), :alt => "用户头像" %>
|
||||
</div>
|
||||
|
|
@ -7,9 +8,8 @@
|
|||
autoUrl('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<div class="<%= type == 'TrainingTask' ? 'new_orig_right fl' : 'orig_right fl' %>" onmouseout="$(this).find('.reply-right').hide();" onmouseover="$(this).find('.reply-right').show();">
|
||||
<%= link_to comment.creator_user.show_real_name, user_path(comment.creator_user), :class => "content-username" %>
|
||||
<span class="orig_area"><%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %></span>
|
||||
<div class="<%= type == 'TrainingTask' ? 'new_orig_right fl' : 'orig_right fl' %>" style="flex:1" onmouseout="$(this).find('.reply-right').hide();" onmouseover="$(this).find('.reply-right').show();">
|
||||
|
||||
<div class="orig_content" id="reply_content_<%= comment.id %>">
|
||||
<% if comment.class == Journal %>
|
||||
<% if comment.details.any? %>
|
||||
|
|
@ -22,14 +22,17 @@
|
|||
<%= comment.content_detail.html_safe %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="orig_reply mt-10 pr" style="height: 18px;">
|
||||
<div class="reply">
|
||||
<div class="clearfix">
|
||||
<%= link_to comment.creator_user.show_real_name, user_path(comment.creator_user), :class => "mr15 font-14 color-grey fl" %>
|
||||
<span class="orig_area fl"><%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %></span>
|
||||
<div class="orig_reply mt-10 pr fr mt3" style="width: 110px;">
|
||||
<div class="reply">
|
||||
<div class="reply-right none" style="position: absolute; right: 0px;">
|
||||
<span class="reply_praise_count_<%=comment.id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>user_activity_id,:type=>"reply"}%>
|
||||
</span>
|
||||
<% if type == 'Message' %>
|
||||
<% topic = comment.root %>
|
||||
<% topic = comment.root %>
|
||||
<% if !topic.locked? && authorize_for('messages', 'reply') %>
|
||||
<span class="fr mr20">
|
||||
<%= link_to(l(:button_reply),
|
||||
|
|
@ -39,10 +42,10 @@
|
|||
:type => type,
|
||||
:user_activity_id => user_activity_id,
|
||||
:parent_id => parent_id},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply)) %>
|
||||
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup03" style="display: none"> ︿</span>
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply)) %>
|
||||
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup03" style="display: none"> ︿</span>
|
||||
</span>
|
||||
<% end %>
|
||||
<% else %>
|
||||
|
|
@ -54,16 +57,20 @@
|
|||
:type => type,
|
||||
:user_activity_id => user_activity_id,
|
||||
:parent_id => parent_id},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply)) %>
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply)) %>
|
||||
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup03" style="display: none"> ︿</span>
|
||||
</span>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="reply_message_<%= comment.id%>" class="reply_to_message"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTitle break_word" >
|
||||
<%= link_to activity.filename, course_files_path(activity.course), :class => "color-dark" %>
|
||||
<%= link_to activity.filename, course_files_path(activity.course), :class => "color-grey3" %>
|
||||
</div>
|
||||
<div class="homepagePostTo break_word fl" style="margin:0px">
|
||||
<% if activity.try(:author).show_real_name == ' ' %>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
<div class="homepagePostReplyPublisher">
|
||||
<%= link_to comment.creator_user.show_real_name, user_path(comment.creator_user), :class => "newsBlue mr10 f14" %>
|
||||
<%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %>
|
||||
</div>
|
||||
|
||||
<% if !comment.parent.nil? && !comment.parent.parent.nil? %>
|
||||
<% parents_rely = [] %>
|
||||
<% parents_rely = get_reply_parents_no_root parents_rely, comment %>
|
||||
|
|
|
|||
|
|
@ -14,94 +14,103 @@
|
|||
<%= render :partial => 'users/message_contents', :locals => {:comment => comment, :type => type, :user_activity_id => user_activity_id}%>
|
||||
|
||||
<% if !comment.content_detail.blank? %>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" style="margin-left: 0px" id="reply_content_<%= comment.id %>">
|
||||
<%= comment.content_detail.html_safe %>
|
||||
</div>
|
||||
<div class="orig_reply mb10 mt-10">
|
||||
<div class="reply">
|
||||
<span class="reply-right">
|
||||
<span class="reply_praise_count_<%=comment.id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>user_activity_id,:type=>"reply"}%>
|
||||
</span>
|
||||
<% if type == 'Message' %>
|
||||
<% topic = comment.root %>
|
||||
<% if !topic.locked? && authorize_for('messages', 'reply') %>
|
||||
<span style="position: relative" class="fr mr20">
|
||||
<%= link_to(
|
||||
l(:button_reply),
|
||||
{:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :activity_id => activity_id},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply)) %>
|
||||
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||
</span>
|
||||
<% end %>
|
||||
<% if comment.course_destroyable_by?(User.current) || comment.destroyable_by?(User.current) || comment.contest_destroyable_by?(User.current) %>
|
||||
<a href="javascript:void(0);" id="delete_reply_<%=activity_id %>_<%=comment.id %>" class="fr mr20 undis" onclick="delete_confirm_box_2('<%= delete_board_message_path(comment,:board_id =>comment.board.id, :user_activity_id => user_activity_id, :activity_id => activity_id) %>', '确定要删除该条回复吗?')">删除</a>
|
||||
<% end %>
|
||||
<% elsif type == 'JournalsForMessage' %>
|
||||
<span style="position: relative" class="fr mr20">
|
||||
<%= link_to(
|
||||
l(:button_reply),
|
||||
{:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :activity_id => activity_id},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply)) %>
|
||||
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||
</span>
|
||||
<% if comment.creator_user == User.current || User.current.admin? %>
|
||||
<%= link_to('删除', {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user, :user_activity_id => user_activity_id, :activity_id => activity_id},
|
||||
:id => "delete_reply_#{activity_id}_#{comment.id}",:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "fr mr20 undis", :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
<% elsif type == 'OrgDocumentComment' %>
|
||||
<span style="position: relative" class="fr mr20">
|
||||
<%= link_to(
|
||||
l(:button_reply),
|
||||
{:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :activity_id => activity_id},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply)) %>
|
||||
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||
</span>
|
||||
<% if comment.creator_user == User.current %>
|
||||
<%= link_to(
|
||||
l(:button_delete),
|
||||
{:controller => 'org_document_comments',:action => 'destroy', :id => comment.id, :user_activity_id => user_activity_id},
|
||||
:method => :delete,
|
||||
:remote => true,
|
||||
:id => "delete_reply_#{activity_id}_#{comment.id}",
|
||||
:class => 'fr mr20 undis',
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
<% elsif type == 'BlogComment' %>
|
||||
<span style="position: relative" class="fr mr20">
|
||||
<%= link_to(
|
||||
l(:button_reply),
|
||||
{:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :activity_id => activity_id},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply)) if !comment.root.locked? %>
|
||||
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||
</span>
|
||||
<% if comment.author == User.current %>
|
||||
<%= link_to(
|
||||
l(:button_delete),
|
||||
{:controller => 'blog_comments',:action => 'destroy', :id => comment.id, :user_activity_id => user_activity_id},
|
||||
:method => :delete,
|
||||
:remote => true,
|
||||
:id => "delete_reply_#{activity_id}_#{comment.id}",
|
||||
:class => 'fr mr20 undis',
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="reply_message_<%= comment.id%>" class="reply_to_message"></div>
|
||||
<% end %>
|
||||
<div class="clearfix">
|
||||
<div class="homepagePostReplyPublisher fl" style="margin-bottom: 0px">
|
||||
<%= link_to comment.creator_user.show_real_name, user_path(comment.creator_user), :class => "color-grey mr10 f14" %>
|
||||
<%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %>
|
||||
</div>
|
||||
<% if !comment.content_detail.blank? %>
|
||||
<div class="orig_reply fr mt3">
|
||||
<div class="reply">
|
||||
<span class="reply-right">
|
||||
<span class="reply_praise_count_<%=comment.id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>user_activity_id,:type=>"reply"}%>
|
||||
</span>
|
||||
<% if type == 'Message' %>
|
||||
<% topic = comment.root %>
|
||||
<% if !topic.locked? && authorize_for('messages', 'reply') %>
|
||||
<span style="position: relative" class="fr mr20">
|
||||
<%= link_to(
|
||||
l(:button_reply),
|
||||
{:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :activity_id => activity_id},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply)) %>
|
||||
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||
</span>
|
||||
<% end %>
|
||||
<% if comment.course_destroyable_by?(User.current) || comment.destroyable_by?(User.current) || comment.contest_destroyable_by?(User.current) %>
|
||||
<a href="javascript:void(0);" id="delete_reply_<%=activity_id %>_<%=comment.id %>" class="fr mr20 undis" onclick="delete_confirm_box_2('<%= delete_board_message_path(comment,:board_id =>comment.board.id, :user_activity_id => user_activity_id, :activity_id => activity_id) %>', '确定要删除该条回复吗?')">删除</a>
|
||||
<% end %>
|
||||
<% elsif type == 'JournalsForMessage' %>
|
||||
<span style="position: relative" class="fr mr20">
|
||||
<%= link_to(
|
||||
l(:button_reply),
|
||||
{:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :activity_id => activity_id},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply)) %>
|
||||
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||
</span>
|
||||
<% if comment.creator_user == User.current || User.current.admin? %>
|
||||
<%= link_to('删除', {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user, :user_activity_id => user_activity_id, :activity_id => activity_id},
|
||||
:id => "delete_reply_#{activity_id}_#{comment.id}",:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "fr mr20 undis", :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
<% elsif type == 'OrgDocumentComment' %>
|
||||
<span style="position: relative" class="fr mr20">
|
||||
<%= link_to(
|
||||
l(:button_reply),
|
||||
{:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :activity_id => activity_id},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply)) %>
|
||||
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||
</span>
|
||||
<% if comment.creator_user == User.current %>
|
||||
<%= link_to(
|
||||
l(:button_delete),
|
||||
{:controller => 'org_document_comments',:action => 'destroy', :id => comment.id, :user_activity_id => user_activity_id},
|
||||
:method => :delete,
|
||||
:remote => true,
|
||||
:id => "delete_reply_#{activity_id}_#{comment.id}",
|
||||
:class => 'fr mr20 undis',
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
<% elsif type == 'BlogComment' %>
|
||||
<span style="position: relative" class="fr mr20">
|
||||
<%= link_to(
|
||||
l(:button_reply),
|
||||
{:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :activity_id => activity_id},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply)) if !comment.root.locked? %>
|
||||
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||
</span>
|
||||
<% if comment.author == User.current %>
|
||||
<%= link_to(
|
||||
l(:button_delete),
|
||||
{:controller => 'blog_comments',:action => 'destroy', :id => comment.id, :user_activity_id => user_activity_id},
|
||||
:method => :delete,
|
||||
:remote => true,
|
||||
:id => "delete_reply_#{activity_id}_#{comment.id}",
|
||||
:class => 'fr mr20 undis',
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div id="reply_message_<%= comment.id%>" class="reply_to_message"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<div class="eduResources box_bg_shandow bor-grey-e" style="margin-bottom:20px;" id="user_activity_<%= user_activity_id%>">
|
||||
<div class="eduHomepagePostBrief">
|
||||
<div class="homepagePostPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user), :alt => "用户头像" %>
|
||||
<%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50",:class => "bor-radius-all"), user_path(activity.user), :alt => "用户头像" %>
|
||||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
|
||||
</div>
|
||||
<div class="eduHomepagePostDes">
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@
|
|||
<!-------------------侧边提示区域-------------------------->
|
||||
<div class="-task-sidebar">
|
||||
<div class="feedback" tooltips="意见反馈">
|
||||
<a target="_blank" class="color_white" href="https://www.educoder.net/users/innov/user_newfeedback"><i class="fa fa-envelope-o" aria-hidden="true"></i></a>
|
||||
<a target="_blank" class="color_white" href="https://www.educoder.net/forums/1/memos/new?forum_index=true"><i class="fa fa-envelope-o" aria-hidden="true"></i></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ RedmineApp::Application.routes.draw do
|
|||
get 'statistics_students'
|
||||
get 'search_file_list'
|
||||
get 'achieve_ways'
|
||||
get 'fork_list'
|
||||
end
|
||||
collection do
|
||||
get 'shixun_courses'
|
||||
|
|
@ -255,8 +256,12 @@ RedmineApp::Application.routes.draw do
|
|||
post 'add_auto_users_trial'
|
||||
post 'create_auto_users_trial'
|
||||
match 'update_auto_users_trial', :via => [:get, :post]
|
||||
match 'account', :via => [:get, :post]
|
||||
match 'account',:via => [:get, :post]
|
||||
post 'shixun_can_copy'
|
||||
match 'upload_logo', :via => [:get, :post]
|
||||
post 'school_upload_logo'
|
||||
post 'school_message_update'
|
||||
match 'delete_school',:via => [:get, :post]
|
||||
end
|
||||
end
|
||||
# Enable Grack support
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
class MigrateExerciseQuestionNum < ActiveRecord::Migration
|
||||
def up
|
||||
count = Exercise.all.count / 30 + 2
|
||||
transaction do
|
||||
for i in 1 ... count do i
|
||||
Exercise.page(i).per(30).each do |exercise|
|
||||
exercise.exercise_questions.reorder("created_at asc").each_with_index do |question, j|
|
||||
question.update_column('question_number', j + 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
||||
|
|
@ -1556,7 +1556,6 @@ function elocalStorage(editor,mdu,id){
|
|||
add_data("content",mdu,editor.html());
|
||||
var id1 = "#e_tip_"+id;
|
||||
var id2 = "#e_tips_"+id;
|
||||
console.log(id1 + h + ':' + m + ':' + s +" 保存 ");
|
||||
$(id1).html(" 数据已于 " + h + ':' + m + ':' + s +" 保存 ");
|
||||
$(id2).html("");
|
||||
}
|
||||
|
|
@ -2505,3 +2504,49 @@ function is_IE(){
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
function init_exercise_quetison_editor(params){
|
||||
var editor = params.kindutil.create(params.textarea, {
|
||||
resizeType : 1,minWidth:"1px",width:"90%",minHeight:"74px",height:"74px",
|
||||
items : ['code','emoticons','fontname',
|
||||
'forecolor', 'hilitecolor', 'bold', '|', 'justifyleft', 'justifycenter', 'insertorderedlist','insertunorderedlist', '|',
|
||||
'formatblock', 'fontsize', '|','indent', 'outdent',
|
||||
'|','imagedirectupload','table', 'media', 'preview',"more"
|
||||
],
|
||||
afterChange:function(){//按键事件
|
||||
var edit = this.edit;
|
||||
var body = edit.doc.body;
|
||||
edit.iframe.height(48);
|
||||
//this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight+30 : (params.kindutil.GECKO ? body.offsetHeight+26:body.offsetHeight+30)), 48));
|
||||
this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight)+30, 48));
|
||||
},
|
||||
afterBlur:function(){
|
||||
params.textarea.blur();
|
||||
if(this.isEmpty() || /^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*[\,]*[\(]*[\u4e00-\u9fa5]*[\:]*[\u4e00-\u9fa5]*[\。]*[\)]*<\/\w*\>\s*$/.test(this.edit.html())) {
|
||||
this.edit.html("<span id='hint' style='color:#999999;font-size:12px;'>"+params.placeholder+"</span>");
|
||||
this.resize("90%", null);
|
||||
}
|
||||
},
|
||||
afterFocus: function(){
|
||||
var edit = this.edit;
|
||||
var body = edit.doc.body;
|
||||
if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*[\,]*[\(]*[\u4e00-\u9fa5]*[\:]*[\u4e00-\u9fa5]*[\。]*[\)]*<\/\w*\>\s*$/.test(edit.html())){
|
||||
edit.html("");
|
||||
}
|
||||
this.resize("90%", null);
|
||||
},
|
||||
afterCreate:function(){
|
||||
//init
|
||||
var edit = this.edit;
|
||||
var body = edit.doc.body;
|
||||
edit.iframe[0].scroll = 'no';
|
||||
body.style.overflowY = 'hidden';
|
||||
edit.html(params.textarea.innerHTML);
|
||||
if(this.isEmpty()) {
|
||||
edit.html("<span id='hint' style='color:#999999;font-size:12px;'>"+params.placeholder+"</span>");
|
||||
}
|
||||
}
|
||||
}).loadPlugin('paste');
|
||||
return editor;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ function pop_box_new(value, Width, Height){
|
|||
$(document.body).append(container);
|
||||
$("#popupWrap").html(value);
|
||||
$("#popupWrap").show();
|
||||
$('#popupWrap').css({"top": h+"px","left": w+"px","padding":"0","border":"none","position":"fixed","z-index":"99999","background-color":"#fff"});
|
||||
$('#popupWrap').css({"top": h+"px","left": w+"px","padding":"0","border":"none","position":"fixed","z-index":"999","background-color":"#fff"});
|
||||
$('#popupWrap').find("a[class*='pop_close']").click(function(){
|
||||
$("#popupWrap").hide();
|
||||
});
|
||||
|
|
@ -319,16 +319,18 @@ function delete_confirm_box_4(url, str){
|
|||
}
|
||||
|
||||
//提示框:只有一个按钮,点击关闭弹框
|
||||
//<a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>
|
||||
function notice_sure_box(str){
|
||||
var htmlvalue = '<div class="task-popup" style="width:480px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey3">提示</h3><a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a></div>'+
|
||||
var htmlvalue = '<div class="task-popup" style="width:480px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey3">提示</h3></div>'+
|
||||
'<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-OK clearfix">'+
|
||||
'<a href="javascript:void(0);" class="task-btn task-btn-blue" onclick="hideModal();">知道啦</a></div></div>';
|
||||
pop_box_new(htmlvalue, 480, 140);
|
||||
}
|
||||
|
||||
//提示框:只有一个确定按钮,点击关闭弹框
|
||||
//<a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>
|
||||
function notice_box(str){
|
||||
var htmlvalue = '<div class="task-popup" style="width:480px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey3">提示</h3><a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a></div>'+
|
||||
var htmlvalue = '<div class="task-popup" style="width:480px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey3">提示</h3></div>'+
|
||||
'<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-sure clearfix">'+
|
||||
'<a href="javascript:void(0);" class="task-btn task-btn-blue" onclick="hideModal();">确定</a></div></div>';
|
||||
pop_box_new(htmlvalue, 480, 140);
|
||||
|
|
@ -336,48 +338,54 @@ function notice_box(str){
|
|||
|
||||
|
||||
// 长提示框:只有一个确定按钮,点击关闭弹框
|
||||
//<a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>
|
||||
function long_notice_box(str){
|
||||
var htmlvalue = '<div class="task-popup" style="width:575px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey3">提示</h3><a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a></div>'+
|
||||
var htmlvalue = '<div class="task-popup" style="width:575px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey3">提示</h3></div>'+
|
||||
'<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-sure clearfix">'+
|
||||
'<a href="javascript:void(0);" class="task-btn task-btn-blue" onclick="hideModal();">确定</a></div></div>';
|
||||
pop_box_new(htmlvalue, 575, 140);
|
||||
}
|
||||
|
||||
// 长提示框:只有一个“知道啦”按钮,点击关闭弹框
|
||||
//<a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>
|
||||
function yes_notice_box(str){
|
||||
var htmlvalue = '<div class="task-popup" style="width:575px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey3">提示</h3><a href="javascript:void(0);" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a></div>'+
|
||||
var htmlvalue = '<div class="task-popup" style="width:575px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey3">提示</h3></div>'+
|
||||
'<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-OK clearfix">'+
|
||||
'<a href="javascript:void(0);" class="task-btn task-btn-blue" onclick="hideModal();">知道啦</a></div></div>';
|
||||
pop_box_new(htmlvalue, 575, 200);
|
||||
}
|
||||
|
||||
//提示框:只有一个知道啦按钮,点击打开新窗口
|
||||
//<a href="'+ url +'" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>
|
||||
function sure_box_redirect(url, str){
|
||||
var htmlvalue = '<div class="task-popup" style="width:480px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey3">提示</h3><a href="'+ url +'" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a></div>'+
|
||||
var htmlvalue = '<div class="task-popup" style="width:480px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey3">提示</h3></div>'+
|
||||
'<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-OK clearfix">'+
|
||||
'<a href="'+ url +'" class="task-btn task-btn-blue" onclick="hideModal();" target="_blank">知道啦</a></div></div>';
|
||||
pop_box_new(htmlvalue, 480, 140);
|
||||
}
|
||||
|
||||
//提示框:只有一个知道啦按钮,点击打开新窗口
|
||||
//<a href="'+ url +'" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>
|
||||
function sure_box_redirect_without_newtab(url, str){
|
||||
var htmlvalue = '<div class="task-popup" style="width:480px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey3">提示</h3><a href="'+ url +'" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a></div>'+
|
||||
var htmlvalue = '<div class="task-popup" style="width:480px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey3">提示</h3></div>'+
|
||||
'<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-OK clearfix">'+
|
||||
'<a href="'+ url +'" class="task-btn task-btn-blue" onclick="hideModal();" >知道啦</a></div></div>';
|
||||
pop_box_new(htmlvalue, 480, 140);
|
||||
}
|
||||
|
||||
//提示框:只有一个确定按钮,点击跳转
|
||||
//<a href="'+ url +'" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>
|
||||
function notice_box_redirect(url, str){
|
||||
var htmlvalue = '<div class="task-popup" style="width:480px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey3">提示</h3><a href="'+ url +'" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a></div>'+
|
||||
var htmlvalue = '<div class="task-popup" style="width:480px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey3">提示</h3></div>'+
|
||||
'<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-sure clearfix">'+
|
||||
'<a href="'+ url +'" class="task-btn task-btn-blue" onclick="hideModal();">确定</a></div></div>';
|
||||
pop_box_new(htmlvalue, 480, 140);
|
||||
}
|
||||
|
||||
//提示框:只有一个确定按钮,点击跳转(局部刷新)
|
||||
//<a href="'+ url +'" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>
|
||||
function notice_box_redirect_remote(url, str){
|
||||
var htmlvalue = '<div class="task-popup" style="width:480px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey3">提示</h3><a href="'+ url +'" class="pop_close"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a></div>'+
|
||||
var htmlvalue = '<div class="task-popup" style="width:480px;"><div class="task-popup-title clearfix"><h3 class="fl color-grey3">提示</h3></div>'+
|
||||
'<div class="task-popup-content"><p class="task-popup-text-center font-16">' + str + '</p></div><div class="task-popup-sure clearfix">'+
|
||||
'<a href="'+ url +'" class="task-btn task-btn-blue" data-remote="true">确定</a></div></div>';
|
||||
pop_box_new(htmlvalue, 480, 140);
|
||||
|
|
|
|||
|
|
@ -654,6 +654,7 @@ function ex_setting_form_submit(){
|
|||
//添加标题时确定按钮
|
||||
function add_ex_question(doc,quest_type)
|
||||
{
|
||||
new_quetion_title_editor.sync();
|
||||
var title = $.trim($("#poll_questions_title").val());
|
||||
var score = $.trim($("#question_score").val());
|
||||
var standard_ans = $.trim($("#exercise_choice_" + quest_type).val());
|
||||
|
|
@ -700,13 +701,33 @@ function exQuestionEdit(question_id){
|
|||
$("#show_poll_questions_"+question_id).hide();
|
||||
$("#edit_poll_questions_"+question_id).show();
|
||||
$("#poll_questions_title_"+question_id).focus();
|
||||
KindEditor.ready(function(K){
|
||||
$("div#edit_poll_questions_"+question_id).each(function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.div_form = $(this);
|
||||
params.form = $("form",params.div_form);
|
||||
if(params.form==undefined || params.form.length==0){
|
||||
return;
|
||||
}
|
||||
params.textarea = $("textarea[name='question_title']",params.div_form);
|
||||
if(params.textarea.data('init') == undefined) {
|
||||
params.editor = init_exercise_quetison_editor(params);
|
||||
edit_quetion_title_editor = params.editor;
|
||||
params.textarea.data('init', 1);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
} else{
|
||||
notice_box("请先保存正在编辑的题目再编辑。");
|
||||
}
|
||||
}
|
||||
|
||||
//修改标题时确定按钮
|
||||
function edit_poll_question(doc,id,quest_type)
|
||||
{
|
||||
edit_quetion_title_editor.sync();
|
||||
var title = $.trim($("#poll_questions_title_" + id).val());
|
||||
var score = $.trim($("#poll_question_score_"+ id).val());
|
||||
var standard_ans = $.trim($("#exercise_choice_" + id).val());
|
||||
|
|
@ -736,4 +757,4 @@ function edit_poll_question(doc,id,quest_type)
|
|||
}
|
||||
}else{
|
||||
doc.parent().parent().parent().submit();}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ a:hover.link-name-dark{ color:#5faee3;}
|
|||
.mb50{ margin-bottom: 50px;}
|
||||
.mr50{ margin-right: 50px;}
|
||||
.ml35{ margin-left:35px;}
|
||||
input,textarea,select{ border:1px solid #eee; background: #fff; color:#666;}
|
||||
.edu-name-dark{ max-width:100px; display: block; }
|
||||
.edu-info-dark{ max-width:345px; display: block; }
|
||||
.edu-color-grey{ color:#666;}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ a:hover.link-name-dark{ color:#5faee3;}
|
|||
.mb50{ margin-bottom: 50px;}
|
||||
.mr50{ margin-right: 50px;}
|
||||
.ml35{ margin-left:35px;}
|
||||
input,textarea,select{ border:1px solid #eee; background: #fff; color:#666;}
|
||||
.edu-name-dark{ max-width:150px; display: block; }/*添加学生时,列表里面显示姓名的部分宽度过小,由100px改为150px*/
|
||||
.edu-info-dark{ max-width:345px; display: block; }
|
||||
.edu-color-grey{ color:#666;}
|
||||
|
|
@ -327,7 +326,7 @@ img.ui-datepicker-trigger {display:block;background:url(../images/public_icon.pn
|
|||
.edu-class-innner-conbox{ background:#fff;}
|
||||
.edu-class-con-list{ padding:10px 0; border-bottom:1px solid #eee;}
|
||||
.edu-class-con-list .edu-bg-grey{ background:#f5f5f5;}
|
||||
a.edu-class-inner-list{display: block; color:#333; font-size: 16px; max-width:89%; overflow:hidden;white-space: nowrap; text-overflow:ellipsis;}
|
||||
a.edu-class-inner-list{display: block; color:#333; font-size: 16px; max-width:87%; overflow:hidden;white-space: nowrap; text-overflow:ellipsis;}
|
||||
a:hover.edu-class-inner-list{color:#FF7500!important;}
|
||||
.popup_tip_box {position: absolute; padding: 5px 15px; display: inline-block;white-space: nowrap; background-color: #FFFEF4;border: 1px solid #F3DDB3; color:#888; font-size:12px;}
|
||||
.popup_tip_box em { display: block; border-width: 9px; position: absolute; top: 5px; left: -18px;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ table,tr,td{border:0;}
|
|||
ol,ul,li{ list-style-type:none}
|
||||
a:link,a:visited{text-decoration:none;color:#898989; }
|
||||
a:hover {color:#FF7500;}
|
||||
input,textarea,select{ background: #fff; border:1px solid #eee; color:#666;}
|
||||
input,textarea,select{ background: #fff; border:1px solid #eee;}
|
||||
textarea{resize: none;}
|
||||
/*侧滚动条*/
|
||||
::-webkit-scrollbar { width:10px; height:10px; background-color: #F5F5F5; }
|
||||
|
|
@ -100,7 +100,7 @@ a:hover.link-color-grey03{color:#3498db!important;}
|
|||
.font-30{ font-size: 30px!important;}
|
||||
/*通用内外边距*/
|
||||
.mt-10{ margin-top:-10px;}.mt2{ margin-top:2px;}.mt3{ margin-top:3px;}.mt5{ margin-top:5px;}.mt6{ margin-top:6px;}.mt7{ margin-top:7px;}.mt8{ margin-top:8px;}.mt10{ margin-top:10px;}.mt12{ margin-top:12px;}.mt15{ margin-top:15px;}.mt20{ margin-top:20px;}.mt25{ margin-top:25px;}.mt30{ margin-top:30px;}.mt50{ margin-top:50px;}.mt95{ margin-top:95px;}.mt100{ margin-top:100px;}
|
||||
.mb5{ margin-bottom: 5px;}.mb10{ margin-bottom: 10px;}.mb15{ margin-bottom: 15px;}.mb20{ margin-bottom: 20px;}.mb25{ margin-bottom: 25px;}.mb30{ margin-bottom: 30px;}.mb40{ margin-bottom: 40px;}.mb50{ margin-bottom: 50px;}
|
||||
.mb5{ margin-bottom: 5px;}.mb10{ margin-bottom: 10px;}.mb15{ margin-bottom: 15px;}.mb20{ margin-bottom: 20px;}.mb25{ margin-bottom: 25px;}.mb30{ margin-bottom: 30px;}.mb40{ margin-bottom: 40px;}.mb50{ margin-bottom: 50px;}.mb60{ margin-bottom: 60px;}.mb110{ margin-bottom: 110px;}
|
||||
.ml-3{ margin-left: -3px;}.ml5{ margin-left: 5px;}.ml6{ margin-left: 6px;}.ml10{ margin-left: 10px;}.ml15{ margin-left: 15px;}.ml18{ margin-left: 18px;}.ml20{ margin-left: 20px;}.ml25{ margin-left: 25px;}.ml30{ margin-left: 30px;}.ml33{ margin-left: 33px;}.ml35{ margin-left:35px;}.ml40{margin-left:40px;}.ml42{margin-left:42px;}.ml50{ margin-left: 50px;}.ml75{ margin-left: 75px;}.ml80{ margin-left: 80px;}.ml95{ margin-left: 95px;}.ml115{margin-left: 115px}.ml230{ margin-left: 230px;}
|
||||
.mr3{margin-right: 3px}.mr5{ margin-right: 5px;}.mr10{ margin-right: 10px;}.mr15{ margin-right: 15px;}.mr18{ margin-right: 18px;}.mr20{ margin-right: 20px;}.mr25{ margin-right: 25px;}.mr30{ margin-right:30px;}.mr40{margin-right:40px;}.mr50{ margin-right: 50px;}.mr60{ margin-right:60px;}
|
||||
.pt5{ padding-top:5px;}.pt10{ padding-top:10px;}.pt15{ padding-top:15px;}.pt20{ padding-top:20px;}.pt30{ padding-top:30px;}.pt40{ padding-top:40px;}
|
||||
|
|
|
|||
|
|
@ -253,6 +253,7 @@ a.task-index-name{ display: inline-block; max-width:80px;}
|
|||
|
||||
/*作业描述、帖子内容*/
|
||||
.upload_img img{max-width: 100%;}
|
||||
.table_maxWidth table {max-width: 642px;}
|
||||
.list_style ol li{list-style-type: decimal;margin-left: 40px;}
|
||||
.list_style ul li{list-style-type: disc;margin-left: 40px;}
|
||||
|
||||
|
|
@ -301,9 +302,15 @@ input::-moz-placeholder,textarea::-moz-placeholder { color:#cccccc;}
|
|||
input::-moz-placeholder,textarea::-moz-placeholder { color:#cccccc;}
|
||||
input::-ms-input-placeholder,textarea::-ms-input-placeholder {color:#cccccc;}
|
||||
/*班级讨论区置顶的样式*/
|
||||
.btn-cir-red {background: red; color: #fff; font-weight: normal;}
|
||||
.btn-cir {display: inline-block;padding: 0px 5px;border-radius: 25px;line-height: 20px;font-size: 12px;}
|
||||
.btn-cir:hover{background:#fff;}
|
||||
.btn-cir-grey{background: #e1e1e1;color: #333;}
|
||||
.btn-cir-grey:hover{background: #c3c3c3;}
|
||||
.btn-cir-red{background:red;color: #fff; font-weight: normal;}
|
||||
.btn-cir-red:hover{background:red;}
|
||||
.btn-cir-orange {background: #ff7500; color: #fff; font-weight: normal;}
|
||||
.btn-top{display: inline-block;padding: 0px 5px;line-height: 20px;font-size: 12px;border-radius: 3px;}
|
||||
.btn-cir-big{ background: #999;color: #fff;display: inline-block; padding:0px 10px; border-radius:25px; line-height:25px; height: 25px; font-size:12px;}
|
||||
/*圆形绿色背景---------22*/
|
||||
.panel-inner-icon{width: 22px;height: 22px;line-height: 22px;border-radius: 50%;background: #29bd8b;display: block;text-align: center}
|
||||
/*圆形绿色背景------------------18*/
|
||||
|
|
@ -393,5 +400,4 @@ input::-ms-input-placeholder,textarea::-ms-input-placeholder {color:#cccccc;}
|
|||
/*评阅状态*/
|
||||
.checkstatus_box_small{width: 10px;height: 10px;display: block;float: left;margin-right: 3px;}
|
||||
.checkstatus_box_big{cursor: default;width: 30px;height: 30px;line-height: 30px;text-align: center;margin-right: 10px;border:1px solid #CCCCCC;display: block;float: left;}
|
||||
.checkstatus_box_big i{position: absolute;top:18px;left: 10px;}
|
||||
|
||||
.checkstatus_box_big i{position: absolute;top:18px;left: 10px;}
|
||||
|
|
@ -9,9 +9,9 @@
|
|||
.-task-con-per .photo .changephoto .subchange{width:100%;text-align:center;line-height:26px;color:#fff;background:black;opacity:0.4;filter: alpha(opacity=40);}
|
||||
.-task-con-data{width:89%;}
|
||||
.-task-con-data .top{width:100%;}
|
||||
.-task-con-data .top .top-left{width:60%;}
|
||||
.-task-con-data .top .top-left{width:55%;}
|
||||
.-task-con-data .top .top-left .p1{margin:5px 0;}
|
||||
.-task-con-data .top .top-right{width:35%;text-align: right;}
|
||||
.-task-con-data .top .top-right{width:40%;text-align: right;}
|
||||
.-task-con-data .top .top-right .mynew{display:block;width:100%;}
|
||||
.-task-con-data .top .top-right .mynew p a{color:#5789c8;}
|
||||
.-task-con-data .top .top-right .mynew .p2{color:#ccc;}
|
||||
|
|
|
|||
|
|
@ -413,9 +413,9 @@ a.pro_new_username { font-size: 20px; color: #3b94d6; line-height: 24px;}
|
|||
a.pro_new_username_fork { font-size: 12px; color: #3b94d6; line-height: 24px;}
|
||||
a.pro_new_proname{ overflow: hidden;white-space: nowrap;text-overflow:ellipsis;display: inline-block;}
|
||||
a.pro_new_project_name{ width: 250px; overflow: hidden;white-space: nowrap;text-overflow:ellipsis;display: inline-block;}
|
||||
a.pro_new_topbtn{ padding: 4px 7px; font-size: 12px; line-height: 20px; color: #333;vertical-align: middle;background-color: #fff; border: 1px solid #ddd; border-left: 0; border-top-right-radius: 3px; border-bottom-right-radius: 3px; color: #333;}
|
||||
a.pro_new_topbtn_left { padding: 4px 10px; font-size: 12px;line-height: 20px; background-image: linear-gradient(#fcfcfc, #eee); border: 1px solid #d5d5d5;border-radius: 3px;border-top-right-radius: 0;border-bottom-right-radius: 0; color: #333;}
|
||||
a:hover.pro_new_topbtn_left{background-image: linear-gradient(#ededed, #dddddd);}
|
||||
a.pro_new_topbtn{ padding: 4.5px 7px; font-size: 12px; line-height: 20px; color: #333;vertical-align: middle;background-color: #fff; border: 1px solid #ddd; border-left: 0; border-top-right-radius: 3px; border-bottom-right-radius: 3px; color: #333;}
|
||||
a.pro_new_topbtn_left { padding: 4.5px 10px; font-size: 12px;line-height: 20px; background-image: linear-gradient(#fcfcfc, #eee); border: 1px solid #d5d5d5;border-radius: 3px;border-top-right-radius: 0;border-bottom-right-radius: 0; color: #333;}
|
||||
a:hover.pro_new_topbtn_left,a:hover.pro_new_topbtn{background-image: linear-gradient(#ededed, #dddddd);}
|
||||
a.pro_new_grey_topbtn_left{padding: 3px 10px; font-size: 12px;line-height: 20px; background: #fff; border: 1px solid #d5d5d5;border-radius: 3px;border-top-right-radius: 0;border-bottom-right-radius: 0; color: #888888; cursor:default;}
|
||||
.pro_new_topnav ul{border-bottom: 3px solid #fff; height: 30px; line-height: 30px;}
|
||||
.pro_new_topnav ul li{ float: left;padding:0 15px; height: 30px; line-height: 30px;text-align: center; }
|
||||
|
|
|
|||
|
|
@ -848,7 +848,7 @@ a.winbox_btn_close{ color: #3b94d6; font-size: 18px; font-weight: bold;}
|
|||
.J_Comment_Face img{ width:40px; height:40px; }
|
||||
.t_content{ width:92%; margin-left:15px;}
|
||||
a.content-username { color:#3b94d6; font-size:14px; margin-right:15px;}
|
||||
a.content-username:hover{ color:#297fb8;}
|
||||
a.content-username:hover{ color:#ff7500;}
|
||||
.orig_user img{width:32px; height:32px;}
|
||||
.reply-right{ float:right; position:relative;}
|
||||
.reply_iconup02{ position:absolute; top:16px; left:4px; color:#d4d4d4; font-size:16px; background:#f1f1f1; line-height:13px;}
|
||||
|
|
|
|||
|
|
@ -19,14 +19,9 @@ a.leftnav-box-inner{ display: block; width:77px; border-left:3px solid #292b3a;
|
|||
a:hover.leftnav-box-inner,a.leftnav-active{border-left:3px solid #3498db;color: #fff!important;}
|
||||
a.leftnav-box-reset-inner{ display: block; width:77px; border-left:3px solid #292b3a; background:#292b3a; text-align: center; color:#575f6c;}
|
||||
a:hover.leftnav-box-reset-inner{border-left:3px solid #3498db;color: #fff!important;}
|
||||
.btn-cir{ background:#575f6c; color:#292b3a;display: inline-block; padding:0px 5px; border-radius:25px; border-radius:15px; line-height:20px; height: 20px; font-size:12px;}
|
||||
.btn-cir:hover{background:#fff;}
|
||||
.btn-cir-grey{background: #e1e1e1;color: #333;}
|
||||
.btn-cir-grey:hover{background: #c3c3c3;}
|
||||
.btn-cir-red{background:red;color: #fff; font-weight: normal;}
|
||||
.btn-cir-red:hover{background:red;}
|
||||
.btn-cir-orange{ background: #ee4a1f; color: #fff;}
|
||||
.btn-cir-orange:hover{ background: #ee4a1f; color: #fff;}
|
||||
|
||||
|
||||
|
||||
/*右侧头部*/
|
||||
.rightbar-header{width: 100%; background:#282c37; height:60px; min-width:1000px;}
|
||||
.rightbar-score{ margin-top: 17px; font-size: 14px; margin-right:20px;}
|
||||
|
|
@ -197,7 +192,6 @@ input.knowledge_frame{height:28px;line-height:28px;border:none;background:#f3f5f
|
|||
.-task-ces-top{ padding:5px 15px; background:#515151; color:#bfbfbf;}
|
||||
.-task-ces-info-left{ display: inline-block; width:100px; text-align: right; }
|
||||
.-position-a-r15{ position: absolute; top:5px; right:15px;}
|
||||
.btn-cir-big{ background: #999;color: #fff;display: inline-block; padding:0px 10px; border-radius:25px; line-height:25px; height: 25px; font-size:12px;}
|
||||
.-task-ml80{ margin-left: 80px;}
|
||||
.page--over { position: fixed;top: 0; left:80px; right: 0; z-index:8000; height:100%; color:#fff;}
|
||||
.-task-list-header{ border-bottom:1px solid #eee; padding:5px 15px; color:#898989; font-size: 14px; font-weight: normal;}
|
||||
|
|
@ -444,7 +438,8 @@ html>body #ajax-indicator-base { position: fixed; }
|
|||
.question_item_con{font-weight: normal!important;border:1px solid #EEEEEE!important;color: #333!important;background: #FFFFff!important;position: relative}
|
||||
.exam_operator{cursor: pointer;position: absolute;right: 15px;top: 11px;}
|
||||
.question_item_con .write_answer{border-top:1px solid #EEEEEE;background:#EFF9FD;padding: 10px 15px;text-align:justify;}
|
||||
.add_item_part{width: auto;padding: 2px 20px;border: 1px solid #CCCCCC;border-radius: 3px;margin-left: 15px;cursor: pointer;}
|
||||
.add_item_part{width: auto;padding: 2px 20px;border: 1px solid #ff7500;border-radius: 3px;margin-left: 15px;cursor: pointer;color: #ff7500!important;}
|
||||
.add_item_part:hover{color:#fff!important;background-color: #ff7500}
|
||||
|
||||
|
||||
/*更新提示*/
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@
|
|||
.vl_copy {background:url(../images/vlicon/clone_url.png) 0px 0px no-repeat; padding-left:22px;}
|
||||
.vl_copy2 {background:url(../images/vlicon/clone_url.png) 0px 0px no-repeat; padding-left:22px;}
|
||||
.vl_zip {background:url(../images/vlicon/graph.png) 0px 2px no-repeat; padding-left:22px;}
|
||||
.vl_fork {background:url(/images/vlicon/fork_icon.png) 0px -2px no-repeat; padding-left:22px;}
|
||||
.vl_fork {background:url(/images/vlicon/fork_icon.png) 0px 0px no-repeat; padding-left:22px;}
|
||||
.vl_commit {background:url(../images/vlicon/commit_icon.png) 0px -2px no-repeat; padding-left:22px;weight:20px;height: 24px;}
|
||||
.vl_branch {background:url(../images/vlicon/branch_icon.png) 0px -2px no-repeat; padding-left:22px}
|
||||
.mt1 {margin-top:1px;}
|
||||
|
|
|
|||
Loading…
Reference in New Issue