Merge branch 'develop' of https://bdgit.trustie.net/hushasha/bigdata into develop
This commit is contained in:
commit
c7dc2a7878
|
|
@ -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] # 排序
|
||||
|
|
@ -1532,7 +1578,7 @@ end
|
|||
@sub_type = 5
|
||||
@type = trial_authorization_status params[:type]
|
||||
# sql = select * from apply_actions where dealer_id is null
|
||||
@authorizations = ApplyAction.where(:container_type => "ApplyShixun", :status => @type).order("created_at desc")
|
||||
@authorizations = ApplyAction.where(:container_type => "ApplyShixun", :status => @type, :dealer_id =>'').order("created_at desc")
|
||||
search = params[:search]
|
||||
unless search.blank?
|
||||
@authorizations = @authorizations.where(:container_id => Shixun.where(:id => @authorizations.map(&:container_id)).where("name like '%#{search}%'").map(&:id)).order("created_at desc")
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@
|
|||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
<div class="ml10 edu-dropdown mr10">
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -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') %>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>-->
|
||||
|
|
|
|||
|
|
@ -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>-->
|
||||
|
|
|
|||
|
|
@ -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,5 +1,10 @@
|
|||
<div class="task-index mt30 mb30 box_bg_shandow task-index-head">
|
||||
<div class="task-index-head mt30 mb30 box_bg_shandow">
|
||||
<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 ">
|
||||
|
|
@ -31,9 +36,9 @@
|
|||
<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 btn" data-tip-down="实训任务"></i><span><%= shixun.challenges.count %></span></li>
|
||||
<li><i class="fa fa-users color-light-green mr5 btn" data-tip-down="学习人数"></i><span><%= shixun.myshixuns.count %></span></li>
|
||||
<li><i class="fa fa-viacoin color-light-green mr5 btn" data-tip-down="实训经验值"></i><span><%= shixun.shixun_score %></span></li>
|
||||
<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 %>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -10,16 +10,16 @@
|
|||
});
|
||||
</script>
|
||||
<div class="fl" style="flex:1" 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="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',
|
||||
|
|
|
|||
|
|
@ -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" %>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -256,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
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -326,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;
|
||||
|
|
|
|||
|
|
@ -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;}
|
||||
|
|
|
|||
|
|
@ -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;}
|
||||
|
|
|
|||
Loading…
Reference in New Issue