Merge remote-tracking branch 'origin/szzh' into szzh
This commit is contained in:
commit
c141501085
|
@ -31,6 +31,31 @@ module CoursesHelper
|
|||
# searchStudent(project).count
|
||||
end
|
||||
|
||||
# garble count 混淆数量
|
||||
# alias projectCountOrigin projectCount
|
||||
# def projectCount project
|
||||
# count = projectCountOrigin project
|
||||
# garble count
|
||||
# end
|
||||
|
||||
alias teacherCountOrigin teacherCount
|
||||
def teacherCount project
|
||||
count = teacherCountOrigin project
|
||||
garble count
|
||||
end
|
||||
|
||||
alias studentCountOrigin studentCount
|
||||
def studentCount project
|
||||
count = studentCountOrigin project
|
||||
garble count
|
||||
end
|
||||
|
||||
def garble count
|
||||
count = count.round( 1-count.to_s.size ).to_i
|
||||
return count.to_s if count.to_s.size.eql?(1)
|
||||
count.to_s << '+'
|
||||
end
|
||||
|
||||
# =====================================================================================
|
||||
# return people list
|
||||
def searchTeacherAndAssistant project
|
||||
|
|
|
@ -44,7 +44,9 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 8px"><%= link_to request.host()+"/course", :controller => 'projects', :action => 'course' %></td>
|
||||
<td><p class="top-content-list"><%=link_to "主页", home_path %> > <%=link_to l(:label_course_practice), :controller => 'projects', :action => 'course' %> > <%=link_to @project.name, nil %></p></td>
|
||||
<td><p class="top-content-list"><%= link_to "主页", home_path %>
|
||||
> <%= link_to l(:label_course_practice), :controller => 'projects', :action => 'course' %>
|
||||
> <%= link_to @project.name, nil %></p></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -57,7 +59,8 @@
|
|||
<% @project = Project.find_by_id(@project.id) %>
|
||||
<% @course = Course.find_by_extra(@project.identifier) %>
|
||||
<table>
|
||||
<tr><td valign="top">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<% if (@project.project_type==1) %>
|
||||
<% if get_avatar?(@project) %>
|
||||
<%= image_tag(url_to_avatar(@project), :class => "avatar2") %>
|
||||
|
@ -68,10 +71,12 @@
|
|||
<%= image_tag(url_to_avatar(@project), :class => "avatar2") %>
|
||||
<% end %> </td>
|
||||
<td>
|
||||
<table><tr>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="info-course"><%= @project.name %></td>
|
||||
</tr>
|
||||
<tr><td align="center">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<div id="join_in_course">
|
||||
<% if User.current.logged? %>
|
||||
<% if @course.teacher.id == User.current.id %>
|
||||
|
@ -89,7 +94,9 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -106,7 +113,6 @@
|
|||
<% end %>
|
||||
|
||||
<td class="font_index">
|
||||
<!-- %= link_to "#{@project.members.count}", project_member_path(@project) ,:course =>'1'% -->
|
||||
<!-- 1 教师; 2 学生;0 全部-->
|
||||
<%= link_to "#{teacherCount(@project)}", project_member_path(@project, :role => 1), :course => '1' %>
|
||||
</td>
|
||||
|
@ -138,33 +144,40 @@
|
|||
|
||||
<!-- addedby bai 教师姓名加超链接、加入开课时间、结课时间与课时 -->
|
||||
<tr>
|
||||
<td valign="top" style="padding-left: 8px; width:60px"><%= l(:label_main_teacher) %> :</td><td class="font_lighter_sidebar"><%= link_to(@course.teacher.lastname+@course.teacher.firstname, user_path(@course.teacher)) %></td>
|
||||
<td valign="top" style="padding-left: 8px; width:60px"><%= l(:label_main_teacher) %> :</td>
|
||||
<td class="font_lighter_sidebar"><%= link_to(@course.teacher.lastname+@course.teacher.firstname, user_path(@course.teacher)) %></td>
|
||||
</tr>
|
||||
|
||||
<tr class="hidden">
|
||||
<td valign="top" style="padding-left: 8px;"><%= l(:label_setup_time) %> :</td><td class="font_lighter_sidebar"><%= @course.setup_time %></td>
|
||||
<td valign="top" style="padding-left: 8px;"><%= l(:label_setup_time) %> :</td>
|
||||
<td class="font_lighter_sidebar"><%= @course.setup_time %></td>
|
||||
</tr>
|
||||
|
||||
<tr class="hidden">
|
||||
<td valign="top" style="padding-left: 8px;"><%= l(:label_endup_time) %> :</td><td class="font_lighter_sidebar"><%= @course.endup_time %></td>
|
||||
<td valign="top" style="padding-left: 8px;"><%= l(:label_endup_time) %> :</td>
|
||||
<td class="font_lighter_sidebar"><%= @course.endup_time %></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" style="padding-left: 8px;"><%= l(:label_class_period) %> :</td><td class="font_lighter_sidebar"><%= @course.class_period %> <%= l(:label_class_hour)%></td>
|
||||
<td valign="top" style="padding-left: 8px;"><%= l(:label_class_period) %> :</td>
|
||||
<td class="font_lighter_sidebar"><%= @course.class_period %> <%= l(:label_class_hour) %></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" style="padding-left: 8px;"><%= l(:label_main_term) %> :</td><td class="font_lighter_sidebar"><%= @course.time %> <%= @course.term %></td>
|
||||
<td valign="top" style="padding-left: 8px;"><%= l(:label_main_term) %> :</td>
|
||||
<td class="font_lighter_sidebar"><%= @course.time %> <%= @course.term %></td>
|
||||
</tr>
|
||||
<!-- end -->
|
||||
|
||||
<% unless @course.teacher.user_extensions.nil? %>
|
||||
<tr>
|
||||
<td valign="top" style="padding-left: 8px;"><%= l(:label_teacher_work_unit) %> :</td><td class="font_lighter_sidebar"><%= @course.teacher.user_extensions.school %></td>
|
||||
<td valign="top" style="padding-left: 8px;"><%= l(:label_teacher_work_unit) %> :</td>
|
||||
<td class="font_lighter_sidebar"><%= @course.teacher.user_extensions.school %></td>
|
||||
</tr>
|
||||
<% else %>
|
||||
<tr>
|
||||
<td valign="top" style="padding-left: 8px;"><%= l(:label_teacher_work_unit) %> :</td><td class="font_lighter_sidebar"><%= l(:field_course_un) %></td>
|
||||
<td valign="top" style="padding-left: 8px;"><%= l(:label_teacher_work_unit) %> :</td>
|
||||
<td class="font_lighter_sidebar"><%= l(:field_course_un) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@
|
|||
<div class='desc_item text_nowrap' style="width: 310px;">
|
||||
[<%= get_course_term project %>]
|
||||
<%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}" )%>
|
||||
(<%= "#{studentCount(project)}人" %><%#= link_to "#{studentCount(project)}人", project_member_path(project, :role => 2) ,:course =>'1' %>)
|
||||
(<%= "#{studentCount(project)}人" %>)
|
||||
<% files_count = (project.attachments.count.to_i+Version.joins(:project).where("projects.id=#{project.id}").count.to_i).to_s %>
|
||||
(<%=link_to "#{files_count}份", project_files_path(project) %>资料)
|
||||
</div>
|
||||
|
@ -161,13 +161,11 @@
|
|||
<div class='desc_item text_nowrap' style="width: 310px;">
|
||||
[<%= get_course_term project %>]
|
||||
<%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}" )%>
|
||||
(<%= link_to "#{studentCount(project)}人", project_member_path(project, :role => 2) ,:course =>'1' %>)
|
||||
(<%= "#{studentCount(project)}人" %>)
|
||||
<% files_count = (project.attachments.count.to_i+Version.joins(:project).where("projects.id=#{project.id}").count.to_i).to_s %>
|
||||
(<%=link_to "#{files_count}份", project_files_path(project) %>资料)
|
||||
</div>
|
||||
<!-- <div class='desc_item' style="">
|
||||
<span class='font_lighter' title=<%#=project.description.to_s%>><%#=project.description.truncate(25, omission: '...')%></span>
|
||||
</div> -->
|
||||
|
||||
<div class='join_course_link'>
|
||||
<% if !course_endTime_timeout?(project)%>
|
||||
<div >
|
||||
|
@ -207,7 +205,7 @@
|
|||
<div class='desc_item text_nowrap' style="width: 310px;">
|
||||
[<%= get_course_term project %>]
|
||||
<%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}" )%>
|
||||
(<%= link_to "#{studentCount(project)}人", project_member_path(project, :role => 2) ,:course =>'1' %>)
|
||||
<%= "#{studentCount(project)}人" %> )
|
||||
<% files_count = (project.attachments.count.to_i+Version.joins(:project).where("projects.id=#{project.id}").count.to_i).to_s %>
|
||||
(<%=link_to "#{files_count}份", project_files_path(project) %>资料)
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue