Merge branch 'szzh' into develop

course_group v20140929
sw 11 years ago
commit 5673c6b110

@ -1,5 +1,5 @@
# source 'http://ruby.taobao.org'
source 'http://ruby.sdutlinux.org/'
source 'http://ruby.taobao.org'
#source 'http://ruby.sdutlinux.org/'
unless RUBY_PLATFORM =~ /w32/
# unix-like only
@ -30,6 +30,7 @@ group :test do
gem 'factory_girl', '~> 4.4.0'
gem 'selenium-webdriver', '~> 2.42.0'
platforms :mri, :mingw do
group :rmagick do
# RMagick 2 supports ruby 1.9
@ -48,6 +49,7 @@ group :development, :test do
gem 'ruby-prof', '~> 0.15.1' unless RUBY_PLATFORM =~ /w32/
gem 'pry'
gem 'pry-nav'
end

@ -19,7 +19,7 @@ PATH
rails
GEM
remote: http://ruby.sdutlinux.org/
remote: http://ruby.taobao.org/
remote: https://rubygems.org/
specs:
actionmailer (3.2.13)

@ -258,11 +258,13 @@ class ApplicationController < ActionController::Base
if @attachment.container_type == "Memo"
allowed = User.current.allowed_to?(:memos_attachments_download,nil,:global => true)
elsif @attachment.container_type == "Project"
return true
elsif @attachment.container_type == "course"
return true
elsif @attachment.container_type == "contest"
return true
else
return true
end
if allowed

@ -193,12 +193,14 @@ class AttachmentsController < ApplicationController
else
format.html { redirect_to_referer_or course_path(@course) }
end
elsif !@attachment.container.nil? && @attachment.container.is_a?(Softapplication)
format.html { redirect_to_referer_or softapplications_path(@attachment.container) }
else
if @project.nil?
format.html { redirect_to_referer_or forum_memo_path(@attachment.container.forum, @attachment.container) }
else
if @project.nil?
format.html { redirect_to_referer_or forum_memo_path(@attachment.container.forum, @attachment.container) }
else
format.html { redirect_to_referer_or project_path(@project) }
end
end
end
format.js

@ -641,7 +641,7 @@ class CoursesController < ApplicationController
def isCourseTeacher(id,course)
result = false
user = User.find(id)
if user.nil? && user.allowed_to?(:as_teacher,course)#@teachers && @teachers.count != 0 && @teachers.find_by_user_id(id) != nil
if !user.nil? && user.allowed_to?(:as_teacher,course)
result = true
end
result

@ -13,11 +13,8 @@
<% end %>
<!--teacher's code disapeared moified by huang-->
<% unless member.user.user_extensions.identity ==0 %>
<!-- added by bai 加学号 -->
<%if @canShowCode%>
<%= content_tag "p", "#{l(:label_bidding_user_studentcode)}#{' : '}#{member.user.user_extensions.student_id}", :class => "nomargin avatar_name" %>
<% end %>
<%if @canShowCode%>
<%= content_tag "p", "#{l(:label_bidding_user_studentcode)}#{' : '}#{member.user.user_extensions.student_id}", :class => "nomargin avatar_name" %>
<% end %>
<div class ="clear avatar_name"> &nbsp;
<p>

@ -20,34 +20,25 @@
<% members.each do |member| %>
<% next if member.new_record? %>
<tr id="member-<%= member.id %>" class="<%= cycle 'odd', 'even' %> member">
<td class="<%= member.principal.class.name.downcase %>">
<%= link_to_user member.principal %>
</td>
<td class="<%= member.principal.class.name.downcase %>"><%= link_to_user member.principal %></td>
<td class="roles">
<span id="member-<%= member.id %>-roles">
<%= h member.roles.sort.collect(&:to_s).join(', ') %>
</span>
<%= form_for(member, {:as => :membership, :remote => true,
:url => course_memberships_path(member),:method => :put,
:html => {:id => "member-#{member.id}-roles-form",
:class => 'hol'}}
<%= form_for(member, {:as => :membership, :remote => true, :url => membership_path(member),
:method => :put,
:html => {:id => "member-#{member.id}-roles-form", :class => 'hol'}}
) do |f| %>
<p>
<% roles.each do |role| %>
<label>
<%= radio_button_tag 'membership[role_ids][]', role.id, member.roles.include?(role),:disabled => member.member_roles.detect { |mr| mr.role_id == role.id && !mr.inherited_from.nil? } %>
<%= h role %>
</label>
<br/>
<% end %>
</p>
<label><%= radio_button_tag 'membership[role_ids][]', role.id, member.roles.include?(role),
:disabled => member.member_roles.detect { |mr| mr.role_id == role.id && !mr.inherited_from.nil? } %> <%= h role %></label><br/>
<% end %></p>
<%= hidden_field_tag 'membership[role_ids][]', '' %>
<p>
<%= submit_tag l(:button_change), :class => "small" %>
<p><%= submit_tag l(:button_change), :class => "small" %>
<%= link_to_function l(:button_cancel),
"$('#member-#{member.id}-roles').show(); $('#member-#{member.id}-roles-form').hide(); return false;"
%>
</p>
%></p>
<% end %>
</td>
<!--modified by huang for: if the user'roles is Manager that he will can't modified himself-->
@ -79,10 +70,8 @@
<%= form_for(@member, {:as => :membership, :url => course_memberships_path(@course), :remote => true, :method => :post}) do |f| %>
<fieldset>
<legend><%= l(:label_member_new) %></legend>
<p>
<%= label_tag "principal_search", l(:label_principal_search) %>
<%= text_field_tag 'principal_search', nil %>
</p>
<p><%= label_tag "principal_search", l(:label_principal_search) %><%= text_field_tag 'principal_search', nil %></p>
<%= javascript_tag "observeSearchfield('principal_search', null, '#{ escape_javascript autocomplete_course_memberships_path(@course, :format => 'js') }')" %>
<div id="principals_for_new_member">
@ -92,12 +81,10 @@
<!--show the roles which will select-->
<p style="padding-top: 5px"><%= l(:label_role_plural) %>:
<% roles.each do |role| %>
<label>
<%= radio_button_tag 'membership[role_ids][]', role.id %>
<%= h role %>
</label>
<% end %>
</p>
<label><%= radio_button_tag 'membership[role_ids][]', role.id %> <%= h role %></label>
<% end %></p>
<p><%= submit_tag l(:button_add), :id => 'member-add-submit' %></p>
</fieldset>
<% end %>

@ -14,14 +14,14 @@
</colgroup>
<thead>
<tr>
<%= sort_header_tag('filename', :caption => l(:field_filename), :scope => "col", :id => "vzebra-adventure") %>
<%= sort_header_tag('filename', :caption => l(:field_filename), :scope => "col", :id => "vzebra-adventure",:class => "tableth") %>
<%#= sort_header_tag('created_on', :caption => l(:label_date), :default_order => 'desc', :scope => "col", :id => "vzebra-comedy") %>
<%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc', :scope => "col", :id => "vzebra-children") %>
<%= sort_header_tag('attach_type', :caption => l(:attachment_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-attachmenttype") %>
<%= sort_header_tag('content_type', :caption => l(:attachment_sufix_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-contenttype") %>
<%= sort_header_tag('field_file_dense', :caption => l(:field_file_dense), :default_order => 'desc', :scope => "col", :id => "vzebra-field_file_dense") %>
<%= sort_header_tag('downloads', :caption => l(:field_downloads), :default_order => 'desc', :scope => "col", :id => "vzebra-action") %>
<%= sort_header_tag('operation', :caption => "", :scope => "col", :id => "vzebra-children") %>
<%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc', :scope => "col", :id => "vzebra-children",:class => "tableth") %>
<%= sort_header_tag('attach_type', :caption => l(:attachment_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-attachmenttype",:class => "tableth") %>
<%= sort_header_tag('content_type', :caption => l(:attachment_sufix_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-contenttype",:class => "tableth") %>
<%= sort_header_tag('field_file_dense', :caption => l(:field_file_dense), :default_order => 'desc', :scope => "col", :id => "vzebra-field_file_dense",:class => "tableth") %>
<%= sort_header_tag('downloads', :caption => l(:field_downloads), :default_order => 'desc', :scope => "col", :id => "vzebra-action",:class => "tableth") %>
<%= sort_header_tag('operation', :caption => "", :scope => "col", :id => "vzebra-children",:class => "tableth") %>
<!-- <%#= sort_header_tag('description', :caption => l(:field_description)) %> -->
</tr>
</thead>

@ -1,31 +1,55 @@
<% is_teacher = is_course_teacher User.current,homework.bid.courses.first %>
<% if comprehensive_evaluation != nil && comprehensive_evaluation.count > 0 %>
<div style="height: 100px; padding-bottom: 10px">
<div style="height: <%= is_teacher ? 250 : 100%>px; padding-bottom: 10px">
<div style="font-size: 15px">
<strong>作业综评:</strong>
<%= render :partial => 'show_score', locals: {:stars => teaher_score} %>
<% if teaher_score != "0.00" %>
<%= render :partial => 'show_score', locals: {:stars => teaher_score} %>
<% end %>
</div>
<div style="font-size: 14px;">
<div style="margin-left: 20px;margin-bottom: 10px;margin-top: 10px;"> <%= comprehensive_evaluation.first.notes%> </div>
</div>
<% if is_teacher %>
<%= render :partial => 'evaluation', :locals => {:homework => homework} %>
<div>
<%= render :partial => 'evaluation_add_jour',
:locals => {:homework_attach => homework,
:sta => 0,
:is_comprehensive_evaluation => 1,
:comprehensive_evaluation => comprehensive_evaluation.first.notes} %>
</div>
<% end %>
</div>
<% else %>
<% if is_teacher %>
<div style="height: 200px; padding-bottom: 10px">
<div style="font-size: 15px">
<strong>作业综评:</strong>
<% if teaher_score != "0.00" %>
<%= render :partial => 'show_score', locals: {:stars => teaher_score} %>
<% end %>
</div>
<%= render :partial => 'evaluation', :locals => {:homework => homework} %>
<div>
<%= render :partial => 'evaluation_add_jour', :locals => {:homework_attach => homework, :sta => 0,:is_comprehensive_evaluation => 1} %>
<%= render :partial => 'evaluation_add_jour',
:locals => {:homework_attach => homework,
:sta => 0,
:is_comprehensive_evaluation => 1,
:comprehensive_evaluation => nil} %>
</div>
</div>
<% else %>
<div style="height: 80px; padding-bottom: 10px">
<div style="font-size: 15px">
<strong>作业综评:</strong>
<% if teaher_score != "0.00" %>
<%= render :partial => 'show_score', locals: {:stars => teaher_score} %>
<% end %>
</div>
<div style="text-align: center;font-size: 15px;color: #15BCCC;vertical-align:middle;padding-top: 15px; "><strong>老师还未进行评价!</strong></div>
<% if teaher_score == "0.00" %>
<div style="text-align: center;font-size: 15px;color: #15BCCC;vertical-align:middle;padding-top: 15px; "><strong>老师还未进行评价!</strong></div>
<% end %>
</div>
<% end %>
<% end %>

@ -1,4 +1,4 @@
<div style="text-align: center;">评分:
<%= rating_for homework, dimension: :quality, class: 'rateable div_inline' %>
<span style="font-size: 11px">(每个用户对每份作业只能进行一次评价!)</span>
<span style="font-size: 11px">(您可以对作业进行多次评价,以最后一次评价为最终结果)</span>
</div>

@ -65,10 +65,13 @@
<% if User.current.logged? %>
<table border="0" width="525px" align="center" >
<tr>
<td><%= f.text_area 'user_message', :rows => 3, :cols => 65, :value => "#{l(:label_leave_a_message)}",
<td>
<%= f.text_area 'user_message', :rows => 3, :cols => 65,
:value => "#{comprehensive_evaluation.nil? ? l(:label_leave_a_message) : comprehensive_evaluation}",
:onfocus => "clearInfo('new_form_user_message','#{l(:label_leave_a_message)}')",
:onblur => "showInfo('new_form_user_message','#{l(:label_leave_a_message)}')",
:style => "resize: none;", :class => 'noline'%></td>
:style => "resize: none;", :class => 'noline'%>
</td>
</tr>
</table>
<%= f.text_field :reference_user_id, :style=>"display:none"%>
@ -81,7 +84,8 @@
<%= submit_tag l(:button_clear_meassge), :name => nil, :class => "enterprise",
:onclick => "clearMessage('new_form_user_message');",
:onmouseout => "this.style.backgroundPosition = 'left top'",
:onmouseover => "this.style.backgroundPosition = 'left -31px'" %> </td>
:onmouseover => "this.style.backgroundPosition = 'left -31px'" %>
</td>
</tr>
</table>
<% else %>

@ -9,7 +9,6 @@
<% is_student = is_cur_course_student @homework.bid.courses.first %>
<% is_teacher = is_course_teacher User.current,@homework.bid.courses.first %>
<p id="notice"><%= notice %></p>
<!-- <%= image_tag(url_to_avatar(@user), :class => "avatar2") %> -->
<div style="height: auto; padding-bottom: 10px">
<tr>
<td colspan="2" valign="top" width="320" >

@ -1,7 +1,7 @@
<h3><%=h @issue.tracker %> #<%= @issue.id %></h3>
<p><%= authoring @journal.created_on, @journal.user, :label => :label_updated_time_by %></p>
<div class="text-diff" style="word-break: break-all;width: 100%;word-wrap: break-word;">
<div class="text-diff">
<%= simple_format_without_paragraph @diff.to_html %>
</div>

@ -94,11 +94,11 @@
</p>
</div>
<div class="memo-section">
<div class="memo-title <%= @topic.sticky? ? 'sticky' : '' %> <%= @topic.locked? ? 'locked' : '' %>">
<div class="memo-title <%= @topic.sticky? ? 'sticky' : '' %> <%= @topic.locked? ? 'locked' : '' %>" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
<% if @project %>
<%= label_tag l(:field_subject) %>: <%= link_to @topic.subject.truncate(24, omission: '...'), project_boards_path(@topic.project),title: @topic.subject.to_s %>
<%= label_tag l(:field_subject) %>: <%= link_to @topic.subject, project_boards_path(@topic.project),title: @topic.subject.to_s %>
<% elsif @course %>
<%= label_tag l(:field_subject) %>: <%= link_to @topic.subject.truncate(24,omission:'...'), course_boards_path(@topic.course),title: @topic.subject.to_s %>
<%= label_tag l(:field_subject) %>: <%= link_to @topic.subject, course_boards_path(@topic.course),title: @topic.subject.to_s %>
<% end %>
</div>
<div class="memo-content">

@ -98,9 +98,9 @@
<div class="memo-section" style="width: 100%;word-break: break-all;word-wrap: break-word;">
<div class="memo-title <%= @topic.sticky? ? 'sticky' : '' %> <%= @topic.locked? ? 'locked' : '' %>" style="width: 83%;word-break: break-all;">
<% if @project %>
<%= label_tag l(:field_subject) %>: <%= link_to @topic.subject.truncate(24, omission: '...'), project_boards_path(@topic.project),title: @topic.subject.to_s %>
<%= label_tag l(:field_subject) %>: <%= link_to @topic.subject.truncate(29, omission: '...'), project_boards_path(@topic.project),title: @topic.subject.to_s %>
<% elsif @course %>
<%= label_tag l(:field_subject) %>: <%= link_to @topic.subject.truncate(24,omission:'...'), course_boards_path(@topic.course),title: @topic.subject.to_s %>
<%= label_tag l(:field_subject) %>: <%= link_to @topic.subject.truncate(29,omission:'...'), course_boards_path(@topic.course),title: @topic.subject.to_s %>
<% end %>
</div>
<div class="memo-content">

@ -5,21 +5,31 @@
<div class="tools ">
<ul><h3>项目交流</h3>
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:label_project_tool_response) ,project_feedback_path(@project)%></li>
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:project_module_files) ,project_files_path(@project) %></li>
<% if @project.enabled_modules.where("name = 'files'").count > 0 %>
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:project_module_files) ,project_files_path(@project) %></li>
<% end %>
<% if @project.enabled_modules.where("name = 'wiki'").count > 0 %>
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:project_module_wiki), project_wiki_path(@project) %></li>
<% end %>
</ul>
<ul><h3>进度跟踪</h3>
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:project_module_calendar),project_calendar_path(@project) %></li>
<% if @project.enabled_modules.where("name = 'calendar'").count > 0 %>
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:project_module_calendar),project_calendar_path(@project) %></li>
<% end %>
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:label_roadmap) ,project_roadmap_path(@project) %></li>
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:project_module_gantt) ,project_gantt_path(@project) %></li>
<% if @project.enabled_modules.where("name = 'gantt'").count > 0 %>
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:project_module_gantt) ,project_gantt_path(@project) %></li>
<% end %>
</ul>
<ul><h3>其他工具</h3>
<% if @project.enabled_modules.where(" name = 'dts'").count > 0 %>
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:label_module_share) ,share_show_path(@project) %></li>
<% end %>
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:project_module_documents), project_documents_path(@project) %></li>
<% if @project.enabled_modules.where(" name = 'documents'").count > 0 %>
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:project_module_documents), project_documents_path(@project) %></li>
<% end %>
<li></li>
</ul>

@ -6,7 +6,7 @@
<strong><%= l(:label_tags_forum) %>:<%= link_to "#{forum.name}",
:controller => "forums",:action => "show",:id => forum.id %></strong>
<br />
<strong><%= l(:label_tags_forum_description) %>:</strong><%= forum.description %>
<strong><%= l(:label_tags_forum_description) %>:</strong><%= textAreailizable forum.description %>
<%= forum.updated_at %>
</p>
<div class="line_under"></div>

@ -2,45 +2,45 @@
<% unless show_flag.nil? %>
<% case %>
<% when show_flag == '1' %>
<strong><%=l(:label_user)%>(<%= @results_count %>)</strong>
<%= render :partial => "show_users",:locals => {:users_results => users_results}%>
<strong><%=l(:label_user)%>(<%= @results_count %>)</strong>
<%= render :partial => "show_users",:locals => {:users_results => users_results}%>
<% when show_flag == '2'%>
<strong><%=l(:label_project)%>(<%= @results_count %>)</strong>
<%= render :partial => "show_projects",:locals => {:projects_results => projects_results }%>
<strong><%=l(:label_project)%>(<%= @results_count %>)</strong>
<%= render :partial => "show_projects",:locals => {:projects_results => projects_results }%>
<% when show_flag == '3'%>
<strong><%=l(:label_issue)%>(<%= @results_count %>)</strong>
<%= render :partial => "show_issues",:locals => {:issues_results => issues_results }%>
<strong><%=l(:label_issue)%>(<%= @results_count %>)</strong>
<%= render :partial => "show_issues",:locals => {:issues_results => issues_results }%>
<% when show_flag == '4'%>
<strong><%= l(:label_requirement)%>(<%= @results_count %>)</strong>
<%= render :partial => "show_bids",:locals => {:bids_results => bids_results}%>
<strong><%= l(:label_requirement)%>(<%= @results_count %>)</strong>
<%= render :partial => "show_bids",:locals => {:bids_results => bids_results}%>
<% when show_flag == '5'%>
<strong><%= l(:label_forum)%>(<%= @results_count %>)</strong>
<%= render :partial => "show_forums",:locals => {:forums_results => forums_results}%>
<strong><%= l(:label_forum)%>(<%= @results_count %>)</strong>
<%= render :partial => "show_forums",:locals => {:forums_results => forums_results}%>
<% when show_flag == '6'%>
<strong><%= l(:label_attachment)%>(<%= @results_count %>)</strong>
<%= render :partial => "show_attachments",:locals => {:attachments_results => attachments_results}%>
<strong><%= l(:label_attachment)%>(<%= @results_count %>)</strong>
<%= render :partial => "show_attachments",:locals => {:attachments_results => attachments_results}%>
<% when show_flag == '7'%>
<strong><%= l(:label_contest_innovate)%>(<%= @results_count %>)</strong>
<%= render :partial => "show_contests",:locals => {:contests_results => contests_results}%>
<strong><%= l(:label_contest_innovate)%>(<%= @results_count %>)</strong>
<%= render :partial => "show_contests",:locals => {:contests_results => contests_results}%>
<% when show_flag == '8'%>
<strong><%#= l(:label_attachment)%>
开源项目:(<%= @results_count %>)</strong>
<%= render :partial => "show_open_source_projects",:locals => {:projects_results => open_source_projects_results}%>
<% when show_flag == '9'%>
<strong><%= l(:label_course)%>(<%= @results_count %>)</strong>
<%= render :partial => "show_courses",:locals => {:courses_results => courses_results}%>
<strong><%#= l(:label_attachment)%>
开源项目:(<%= @results_count %>)</strong>
<%= render :partial => "show_open_source_projects",:locals => {:projects_results => open_source_projects_results}%>
<% when show_flag == '9'%>
<strong><%= l(:label_course)%>(<%= @results_count %>)</strong>
<%= render :partial => "show_courses",:locals => {:courses_results => courses_results}%>
<% else %>
<strong><%= l(:label_tags_all_objects)%></strong>
<!-- 这里为显示搜有过滤结果预留了默认设置 -->
<%= render :partial => "show_issues",:locals => {:issues_results => issues_results }%>
<%= render :partial => "show_users",:locals => {:users_results => users_results }%>
<%= render :partial => "show_projects",:locals => {:projects_results => projects_results }%>
<%= render :partial => "show_bids",:locals => {:bids_results => bids_results}%>
<%= render :partial => "show_contests",:locals => {:contests_results => contests_results}%>
<strong><%= l(:label_tags_all_objects)%></strong>
<!-- 这里为显示搜有过滤结果预留了默认设置 -->
<%= render :partial => "show_issues",:locals => {:issues_results => issues_results }%>
<%= render :partial => "show_users",:locals => {:users_results => users_results }%>
<%= render :partial => "show_projects",:locals => {:projects_results => projects_results }%>
<%= render :partial => "show_bids",:locals => {:bids_results => bids_results}%>
<%= render :partial => "show_contests",:locals => {:contests_results => contests_results}%>
<% end %>
<% else %>
<span>no data...</span>
<span>no data...</span>
<% end %>
</ul>
<%= render :partial => "pagination",:locals => {:obj_pages => @obj_pages} %>

@ -117,33 +117,33 @@ Redmine::AccessControl.map do |map|
map.permission :projects_attachments_download,{:attachments => :download},:belong_to_project => true
map.permission :course_attachments_download,{:attachments => :download},:belong_to_course => true
map.permission :contest_attachments_download,{:attachments => :download},:belong_to_contest => true
#与项目一致,注释掉
#map.course_module :files do |map|
map.course_module :files do |map|
# map.permission :manage_files, {:files => [:new, :create]}, :require => :loggedin
# map.permission :view_course_files, {:files => :index, :versions => :download}, :read => true
#end
#新闻权限与项目一致注释掉此处
# map.course_module :news do |map|
map.permission :view_course_files, {:files => :index, :versions => :download}, :read => true,:belong_to_course => true
end
map.course_module :news do |map|
# map.permission :manage_news, {:news => [:new, :create, :edit, :update, :destroy], :comments => [:destroy]}, :require => :member
# map.permission :view_course_news, {:news => [:index, :show]}, :public => true, :read => true
map.permission :view_course_news, {:news => [:index, :show]}, :public => true, :read => true
# map.permission :comment_news, {:comments => :create}
# end
end
map.course_module :bids do |map|
map.permission :view_homework_attaches, {:bids => [:show, :show_project, :revision]}, :read => true,:belong_to_course => true
map.permission :paret_in_homework,{},:require => :member ,:belong_to_course => true
end
#讨论区权限与项目统一,注释掉此课程讨论区权限
#map.course_module :boards do |map|
map.course_module :boards do |map|
# map.permission :manage_boards, {:boards => [:new, :create, :edit, :update, :destroy]}, :require => :member
# map.permission :view_course_messages, {:boards => [:index, :show], :messages => [:show]}, :public => true, :read => true
map.permission :view_course_messages, {:boards => [:index, :show], :messages => [:show]}, :public => true, :read => true
# map.permission :add_messages, {:messages => [:new, :reply, :quote]}
# map.permission :edit_messages, {:messages => :edit}, :require => :member
# map.permission :edit_own_messages, {:messages => :edit}, :require => :loggedin
# map.permission :delete_messages, {:messages => :destroy}, :require => :member
# map.permission :delete_own_messages, {:messages => :destroy}, :require => :loggedin
#end
end
#end

@ -2352,6 +2352,8 @@ button.tabs_new_enterprise-right {
background-color:#f6f6f6;
color:#505050;
border: 1px solid #e4e4e4;
word-break: break-all;
word-wrap: break-word;
}
/***** Wiki *****/
@ -2810,3 +2812,5 @@ div.repos_explain{
text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2), 0px 1px 0px rgb(255, 255, 255);
cursor: pointer;
}
.tableth{background-color:#EEEEEE; padding: 4px; white-space:pre;}

Loading…
Cancel
Save