Merge branch 'Homework' into szzh
This commit is contained in:
commit
9d971069b5
|
@ -32,7 +32,7 @@ class ZipdownController < ApplicationController
|
|||
send_file zipfile, :filename => obj.name+".zip", :type => detect_content_type(zipfile) if zipfile
|
||||
|
||||
rescue Exception => e
|
||||
render file: 'public/no_file_found.html' , :layout => 'course_base'
|
||||
render file: 'public/no_file_found.html'
|
||||
end
|
||||
|
||||
#下载某一学生的作业的所有文件
|
||||
|
|
|
@ -578,12 +578,13 @@ module ApplicationHelper
|
|||
return ss
|
||||
end
|
||||
|
||||
def time_tag(time)
|
||||
def time_tag(time, *args)
|
||||
options = args.extract_options!
|
||||
text = distance_of_time_in_words(Time.now, time)
|
||||
if @project
|
||||
link_to(text, {:controller => 'activities', :action => 'index', :id => @project, :from => User.current.time_to_date(time)}, :title => format_time(time))
|
||||
link_to(text, {:controller => 'activities', :action => 'index', :id => @project, :from => User.current.time_to_date(time)},options.reverse_merge(:title => format_time(time)))
|
||||
else
|
||||
content_tag('acronym', text, :title => format_time(time))
|
||||
content_tag('acronym', text, options.reverse_merge(:title => format_time(time)))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<li class="wscore">
|
||||
<%= is_student_batch_homework ? l(:label_my_score) : l(:label_student_score)%>:
|
||||
<span class="c_red">
|
||||
<%= is_student_batch_homework ? (homework.m_score.nil? ? l(:label_without_score) : homework.m_score) : (homework.s_score.nil? ? l(:label_without_score) : homework.s_score)%>
|
||||
<%= is_student_batch_homework ? (homework.m_score.nil? ? l(:label_without_score) : format("%.2f",homework.m_score)) : (homework.s_score.nil? ? l(:label_without_score) : format("%.2f",homework.s_score))%>
|
||||
</span>
|
||||
</li>
|
||||
<% if is_teacher %>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
</span>
|
||||
<span class="font_lighter" style="float: right">
|
||||
<%= l(:label_bids_published) %>
|
||||
<%= time_tag(journal.created_on).html_safe %>
|
||||
<%= time_tag(journal.created_on,:style => "float:initial").html_safe %>
|
||||
<%= l(:label_bids_published_ago) %>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<%
|
||||
is_target = false
|
||||
|
||||
if project and controller and project.module_enabled?(:code_review)
|
||||
if project and project.is_a?(Project) and controller and project.module_enabled?(:code_review)
|
||||
is_target = true
|
||||
is_target = false unless User.current.allowed_to?({:controller => 'code_review', :action => 'update_diff_view'}, project)
|
||||
setting = CodeReviewProjectSetting.find(:first, :conditions => ['project_id = ?', project.id])
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
-%>
|
||||
<% if @project and @project.module_enabled?('code_review') %>
|
||||
<% if @project and @project.is_a?(Project) and @project.module_enabled?('code_review') %>
|
||||
<%
|
||||
baseurl = Redmine::Utils.relative_url_root
|
||||
|
||||
|
|
Loading…
Reference in New Issue