@ -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
#下载某一学生的作业的所有文件
@ -23,7 +23,7 @@
(<span id="jours_count" class="c_red f_12"><%= @jours_count %></span>)
</li>
<li >
<! -- <%#= link_to "作品打包下载", zipdown_assort_path(obj_class: @bid.class, obj_id: @bid), class: "tb_all" unless @bid.homeworks.empty? %> -->
<%= link_to "作品打包下载", zipdown_assort_path(obj_class: @bid.class, obj_id: @bid), class: "tb_all" unless @bid.homeworks.empty? %>
</ul>
<% else %>
@ -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