Merge branch 'szzh' into develop
This commit is contained in:
commit
114f0d4df5
|
@ -110,7 +110,7 @@ class ZipdownController < ApplicationController
|
||||||
#length = attach.storage_path.length
|
#length = attach.storage_path.length
|
||||||
homeworks_attach_path << attach.diskfile#.to_s.slice((length+1)..-1)
|
homeworks_attach_path << attach.diskfile#.to_s.slice((length+1)..-1)
|
||||||
end
|
end
|
||||||
zipping("#{user.user_extensions.student_id}_#{homeattach.user.name.to_s}.zip", homeworks_attach_path, OUTPUT_FOLDER, true)
|
zipping("#{homework.user.user_extensions.student_id}_#{homeattach.user.name.to_s}.zip", homeworks_attach_path, OUTPUT_FOLDER, true)
|
||||||
#user_attaches_paths
|
#user_attaches_paths
|
||||||
#end
|
#end
|
||||||
end
|
end
|
||||||
|
|
|
@ -36,7 +36,7 @@ class Bid < ActiveRecord::Base
|
||||||
acts_as_attachable
|
acts_as_attachable
|
||||||
|
|
||||||
NAME_LENGTH_LIMIT = 60
|
NAME_LENGTH_LIMIT = 60
|
||||||
DESCRIPTION_LENGTH_LIMIT = 250
|
DESCRIPTION_LENGTH_LIMIT = 3000
|
||||||
validates :name, length: {maximum: NAME_LENGTH_LIMIT}, presence: true
|
validates :name, length: {maximum: NAME_LENGTH_LIMIT}, presence: true
|
||||||
validates :description, length: {maximum: DESCRIPTION_LENGTH_LIMIT}
|
validates :description, length: {maximum: DESCRIPTION_LENGTH_LIMIT}
|
||||||
validates :author_id, presence: true
|
validates :author_id, presence: true
|
||||||
|
|
|
@ -36,7 +36,8 @@
|
||||||
:maxlength => Bid::DESCRIPTION_LENGTH_LIMIT %>
|
:maxlength => Bid::DESCRIPTION_LENGTH_LIMIT %>
|
||||||
</p>
|
</p>
|
||||||
<% time = (Time.now + 3600 * 24).strftime('%Y-%m-%d') %>
|
<% time = (Time.now + 3600 * 24).strftime('%Y-%m-%d') %>
|
||||||
<p><%= f.text_field(:deadline, :required => true, :size => 60, :style => "width:150px;",:value => "#{time}", :onchange => "regexDeadLine();", :readonly => true) %>
|
<p>
|
||||||
|
<%= f.text_field(:deadline, :required => true, :size => 60, :style => "width:150px;",:value => "#{time}", :onchange => "regexDeadLine();", :readonly => true) %>
|
||||||
<%= calendar_for('bid_deadline')%>
|
<%= calendar_for('bid_deadline')%>
|
||||||
<span id="bid_deadline_span">
|
<span id="bid_deadline_span">
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -2,19 +2,40 @@
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="info_font" style="width: 240px; color: #15bccf">高校课程实践社区</td>
|
<td class="info_font" style="width: 240px; color: #15bccf">高校课程实践社区</td>
|
||||||
<td style="width: auto; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td>
|
<td style="width: auto; color: #15bccf">
|
||||||
|
<strong>
|
||||||
|
<%= l(:label_user_location) %> :
|
||||||
|
</strong>
|
||||||
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding-left: 8px"><a><%= link_to request.host()+"/courses", :controller => 'courses', :action => 'index'%></a></td>
|
<td style="padding-left: 8px">
|
||||||
<td><p class="top-content-list-homework"><%=link_to "主页", home_path %> > <%=link_to l(:label_course_practice), :controller => 'courses', :action => 'index' %> >
|
<a>
|
||||||
<span><%= link_to(@bid.courses.first.name.to_s, homework_course_path(@bid.courses.first)) if @bid.courses.first%></span> >
|
<%= link_to request.host()+"/courses", :controller => 'courses', :action => 'index'%>
|
||||||
<%=link_to(@bid.name, respond_path(@bid)) %> > <span><%= link_to "创建作业", new_homework_attach_path(@bid)%></span></p></td>
|
</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<p class="top-content-list-homework">
|
||||||
|
<%=link_to "主页", home_path %> >
|
||||||
|
<%=link_to l(:label_course_practice), :controller => 'courses', :action => 'index' %> >
|
||||||
|
<span>
|
||||||
|
<%= link_to(@bid.courses.first.name.to_s, homework_course_path(@bid.courses.first)) if @bid.courses.first%>
|
||||||
|
</span> >
|
||||||
|
<%=link_to(@bid.name, respond_path(@bid)) %> >
|
||||||
|
<span>
|
||||||
|
<%= link_to "创建作业", new_homework_attach_path(@bid)%>
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p style="font-weight: bold; color: rgb(237,137,36)" xmlns="http://www.w3.org/1999/html"> <%=h l(:label_new_homework)%> </p>
|
<p style="font-weight: bold; color: rgb(237,137,36)" xmlns="http://www.w3.org/1999/html">
|
||||||
|
<%=h l(:label_new_homework)%>
|
||||||
|
</p>
|
||||||
|
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<%= form_for('new_form', :method => :post,
|
<%= form_for('new_form', :method => :post,
|
||||||
:url => {:controller => 'homework_attach',
|
:url => {:controller => 'homework_attach',
|
||||||
|
@ -27,18 +48,20 @@
|
||||||
<%= f.text_field "name", :required => true, :size => 60, :style => "width:490px;", :maxlength => 254 %>
|
<%= f.text_field "name", :required => true, :size => 60, :style => "width:490px;", :maxlength => 254 %>
|
||||||
</p>
|
</p>
|
||||||
<p style=" padding: 3px 0 3px 0;padding-left: 50px; clear:left;">
|
<p style=" padding: 3px 0 3px 0;padding-left: 50px; clear:left;">
|
||||||
<strong>提交项目 :</strong>
|
<strong>
|
||||||
|
提交项目 :
|
||||||
|
</strong>
|
||||||
<%= f.select :project_id,options_for_select(user_projects_option), {},{:style => "width:490px;"} %>
|
<%= f.select :project_id,options_for_select(user_projects_option), {},{:style => "width:490px;"} %>
|
||||||
<%= link_to '创建项目', new_project_path(course: 0, project_type: 0), :target => '_blank' %>
|
<%= link_to '创建项目', new_project_path(course: 0, project_type: 0), :target => '_blank' %>
|
||||||
<p class="font_lighter" style="padding-left:120px;clear:left;">提交项目可以为空</p>
|
<p class="font_lighter" style="padding-left:120px;clear:left;">
|
||||||
|
提交项目可以为空
|
||||||
|
</p>
|
||||||
</p>
|
</p>
|
||||||
<p style=" padding: 3px 0 3px 0;padding-left: 50px; clear:left;">
|
<p style=" padding: 3px 0 3px 0;padding-left: 50px; clear:left;">
|
||||||
<strong style="vertical-align: top">描 述 :</strong>
|
<strong style="vertical-align: top">
|
||||||
|
描 述 :
|
||||||
|
</strong>
|
||||||
<span style="margin-left:-10px;padding-right: 20px;">
|
<span style="margin-left:-10px;padding-right: 20px;">
|
||||||
<!--<script src="/javascripts/ckeditor/ckeditor.js?1404953555" type="text/javascript"></script>
|
|
||||||
<%#= f.text_area :description, :rows => 15, :class => 'wiki-edit', :id => 'editor01' %></p>
|
|
||||||
<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor01');</script>-->
|
|
||||||
|
|
||||||
<%= f.text_area "description", :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;", :maxlength => 65534 %>
|
<%= f.text_area "description", :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;", :maxlength => 65534 %>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
class ChangeBidsDescriptionType < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
change_column :bids, :description, :text, default: nil
|
||||||
|
end
|
||||||
|
end
|
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# It's strongly recommended to check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 20141013023400) do
|
ActiveRecord::Schema.define(:version => 20141029065917) do
|
||||||
|
|
||||||
create_table "activities", :force => true do |t|
|
create_table "activities", :force => true do |t|
|
||||||
t.integer "act_id", :null => false
|
t.integer "act_id", :null => false
|
||||||
|
@ -98,7 +98,7 @@ ActiveRecord::Schema.define(:version => 20141013023400) do
|
||||||
t.string "budget", :null => false
|
t.string "budget", :null => false
|
||||||
t.integer "author_id"
|
t.integer "author_id"
|
||||||
t.date "deadline"
|
t.date "deadline"
|
||||||
t.string "description"
|
t.text "description"
|
||||||
t.datetime "created_on", :null => false
|
t.datetime "created_on", :null => false
|
||||||
t.datetime "updated_on", :null => false
|
t.datetime "updated_on", :null => false
|
||||||
t.integer "commit"
|
t.integer "commit"
|
||||||
|
|
Loading…
Reference in New Issue