Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
9ae5f59a29
|
@ -58,90 +58,93 @@
|
|||
</td>
|
||||
<td colspan="2">
|
||||
<table width="580px" border="0" style="table-layout: fixed">
|
||||
<tr>
|
||||
<td style="width: 300px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<strong>作品名称:</strong>
|
||||
<% if homework.name == nil || homework.name == "" %>
|
||||
<% homework_filename = homework.user.name + "提交的作业" %>
|
||||
<% else %>
|
||||
<% homework_filename = homework.name %>
|
||||
<% end %>
|
||||
<strong title="<%=homework_filename%>">
|
||||
<%= link_to homework_filename , homework_attach_path(homework)%>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="vertical-align: top;width: 200px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<strong>合作成员: </strong>
|
||||
<% homework_users = homework_user_of_homework(homework,is_teacher) %>
|
||||
<% if homework.users.count == 0 %>
|
||||
无
|
||||
<% else %>
|
||||
<span title="<%= homework_users%>"><%= homework_users %></span>
|
||||
<% end %>
|
||||
</td>
|
||||
<td rowspan="4" style="text-align: center;vertical-align: middle;width: 30px">
|
||||
<% if Time.parse(@bid.deadline.to_s) < Time.parse(homework.created_at.to_s) %>
|
||||
<span class="required">迟交</span>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 300px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<strong>作品名称:</strong>
|
||||
<% if homework.name == nil || homework.name == "" %>
|
||||
<% homework_filename = homework.user.name + "提交的作业" %>
|
||||
<% else %>
|
||||
<% homework_filename = homework.name %>
|
||||
<% end %>
|
||||
<strong title="<%=homework_filename%>">
|
||||
<%= link_to homework_filename , homework_attach_path(homework)%>
|
||||
</strong>
|
||||
</td>
|
||||
<td style="vertical-align: top;width: 200px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<strong>合作成员: </strong>
|
||||
<% homework_users = homework_user_of_homework(homework,is_teacher) %>
|
||||
<% if homework.users.count == 0 %>
|
||||
无
|
||||
<% else %>
|
||||
<span title="<%= homework_users%>"><%= homework_users %></span>
|
||||
<% end %>
|
||||
</td>
|
||||
<td rowspan="4" style="text-align: center;vertical-align: middle;width: 30px">
|
||||
<% if Time.parse(@bid.deadline.to_s) < Time.parse(homework.created_at.to_s) %>
|
||||
<span class="required">迟交</span>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<strong>开发项目</strong>:
|
||||
<% if homework.project != nil %>
|
||||
<%= link_to homework.project.name,project_path(homework.project.id)%>
|
||||
<% else %>
|
||||
暂无
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<strong>项目得分:
|
||||
<span style="color: #EC6300;">
|
||||
<% if homework.project != nil %>
|
||||
<%= project_score homework.project %>
|
||||
<% else %>
|
||||
0.00
|
||||
<% end %>
|
||||
</span>
|
||||
</strong>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<strong>提交文件:
|
||||
<% if is_evaluation || is_teacher%>
|
||||
<%= link_to "打包下载", :controller => "zipdown", :action => "download_user_homework",:homework => homework%>
|
||||
<% else %>
|
||||
<span class="required">未开启互评功能作业不允许下载</span>
|
||||
<% end %>
|
||||
</strong>
|
||||
</td>
|
||||
<td>
|
||||
<strong>互评得分:
|
||||
<span style="color: #EC6300;"><%= student_score_for_homework(homework) %></span>
|
||||
<% if is_evaluation && is_student && (!users_for_homework(homework).include? User.current)%>
|
||||
<%= link_to "学生互评>>",homework_attach_path(homework) %>
|
||||
<% end %>
|
||||
</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<strong>开发项目</strong>:
|
||||
<% if homework.project != nil %>
|
||||
<%= link_to homework.project.name,project_path(homework.project.id)%>
|
||||
<% else %>
|
||||
暂无
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<strong>项目得分:
|
||||
<span style="color: <%= homework.project.nil? ? "#727272" : "#EC6300"%>;">
|
||||
<%= homework.project.nil? ? "N/A" : project_score(homework.project) %>
|
||||
</span>
|
||||
</strong>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<strong>提交文件:
|
||||
<% if is_evaluation || is_teacher%>
|
||||
<%= link_to "打包下载", :controller => "zipdown", :action => "download_user_homework",:homework => homework%>
|
||||
<% else %>
|
||||
<span class="required">未开启互评功能作业不允许下载</span>
|
||||
<% end %>
|
||||
</strong>
|
||||
</td>
|
||||
<td>
|
||||
<strong>互评得分:
|
||||
<% student_homework_score = student_score_for_homework(homework) %>
|
||||
<span style="color:<%= student_homework_score == "0.00"? "#727272" : "#EC6300"%>;">
|
||||
<% score = student_homework_score == "0.00"? "N/A" : student_homework_score %>
|
||||
<%= score %>
|
||||
</span>
|
||||
<% if is_evaluation && is_student && (!users_for_homework(homework).include? User.current)%>
|
||||
<%= link_to "学生互评>>",homework_attach_path(homework) %>
|
||||
<% end %>
|
||||
</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;width: 200px;">
|
||||
<% if is_evaluation || is_teacher%>
|
||||
<%= render :partial => 'app_link', :locals => {:attachments => homework.attachments} %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<strong>终评得分:
|
||||
<span style="color: #EC6300;"><%= score_for_homework homework %></span>
|
||||
<% if is_teacher %>
|
||||
<%= link_to "教师评分>>",homework_attach_path(homework) %>
|
||||
<% end %>
|
||||
</strong>
|
||||
</td>
|
||||
<% if is_evaluation || is_teacher%>
|
||||
<%= render :partial => 'app_link', :locals => {:attachments => homework.attachments} %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<strong>终评得分:
|
||||
<% totle_homework_score = score_for_homework(homework) %>
|
||||
<span style="color:<%= totle_homework_score == "0.00"? "#727272" : "#EC6300"%> ;">
|
||||
<% score = totle_homework_score == "0.00"? "N/A" : totle_homework_score %>
|
||||
<%= score %>
|
||||
</span>
|
||||
<% if is_teacher %>
|
||||
<%= link_to "教师评分>>",homework_attach_path(homework) %>
|
||||
<% end %>
|
||||
</strong>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<a><%= link_to request.host()+"/courses", :controller => 'courses', :action => 'index' %></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>
|
||||
<span><%= link_to(course.name.to_s, homework_course_path(course)) if course %></span>
|
||||
>
|
||||
<%= link_to(@bid.name, respond_path(@bid)) %></p></td>
|
||||
</tr>
|
||||
|
@ -65,7 +65,7 @@
|
|||
<td style="vertical-align: top;font-size: 16px;text-align: center;">
|
||||
<span style=" word-wrap: break-word; word-break: break-all">
|
||||
<strong>
|
||||
<%= link_to @bid.courses.first.name.to_s, homework_course_path(@bid.courses.first) if @bid.courses.first %>
|
||||
<%= link_to course.name.to_s, homework_course_path(course) if course %>
|
||||
</strong>
|
||||
</span>
|
||||
</td>
|
||||
|
@ -211,9 +211,9 @@
|
|||
<li>
|
||||
<%= link_to l(:label_question_student), {:controller => 'bids', :action => 'show'}, :class => link_class(:respond) %>
|
||||
</li>
|
||||
<% if User.current.member_of? @bid.courses.first %>
|
||||
<% if User.current.member_of_course? course %>
|
||||
<li>
|
||||
<% if User.current.logged? && @bid.courses.first && (!Member.where('user_id = ? and course_id = ?', User.current.id, @bid.courses.first.id).first.nil? && (Member.where('user_id = ? and course_id = ?', User.current.id, @bid.courses.first.id).first.roles&Role.where('id = ? or id = ? or id =?', 5, 10, 7)).size >0) %>
|
||||
<% if User.current.logged? && course && (!Member.where('user_id = ? and course_id = ?', User.current.id, course.id).first.nil? && (Member.where('user_id = ? and course_id = ?', User.current.id, course.id).first.roles&Role.where('id = ? or id = ? or id =?', 5, 10, 7)).size >0) %>
|
||||
<%= link_to l(:label_homework_commit), {:controller => 'bids', :action => 'show_course'}, :class => link_class(:course) %>
|
||||
<% else %>
|
||||
<%= link_to l(:label_homework_info), {:controller => 'bids', :action => 'show_course'}, :class => link_class(:course) %>
|
||||
|
@ -221,9 +221,9 @@
|
|||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
<!-- <li><%= link_to l(:label_homework_statistics), {:controller => 'bids', :action => 'homework_statistics'}, :class => link_class(:homework_statistics) %></li> -->
|
||||
<!-- <li><%= link_to l(:label_homework_respond), {:controller => 'bids', :action => 'homework_respond'}, :class => link_class(:homework_respond) %></li>
|
||||
--></ul>
|
||||
<!-- <li><%#= link_to l(:label_homework_statistics), {:controller => 'bids', :action => 'homework_statistics'}, :class => link_class(:homework_statistics) %></li> -->
|
||||
<!-- <li><%#= link_to l(:label_homework_respond), {:controller => 'bids', :action => 'homework_respond'}, :class => link_class(:homework_respond) %></li>-->
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<%= yield %>
|
||||
|
|
74
db/schema.rb
74
db/schema.rb
|
@ -175,58 +175,6 @@ ActiveRecord::Schema.define(:version => 20140626012511) do
|
|||
|
||||
add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true
|
||||
|
||||
create_table "code_review_assignments", :force => true do |t|
|
||||
t.integer "issue_id"
|
||||
t.integer "change_id"
|
||||
t.integer "attachment_id"
|
||||
t.string "file_path"
|
||||
t.string "rev"
|
||||
t.string "rev_to"
|
||||
t.string "action_type"
|
||||
t.integer "changeset_id"
|
||||
end
|
||||
|
||||
create_table "code_review_project_settings", :force => true do |t|
|
||||
t.integer "project_id"
|
||||
t.integer "tracker_id"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "updated_by"
|
||||
t.boolean "hide_code_review_tab", :default => false
|
||||
t.integer "auto_relation", :default => 1
|
||||
t.integer "assignment_tracker_id"
|
||||
t.text "auto_assign"
|
||||
t.integer "lock_version", :default => 0, :null => false
|
||||
t.boolean "tracker_in_review_dialog", :default => false
|
||||
end
|
||||
|
||||
create_table "code_review_user_settings", :force => true do |t|
|
||||
t.integer "user_id", :default => 0, :null => false
|
||||
t.integer "mail_notification", :default => 0, :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "code_reviews", :force => true do |t|
|
||||
t.integer "project_id"
|
||||
t.integer "change_id"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "line"
|
||||
t.integer "updated_by_id"
|
||||
t.integer "lock_version", :default => 0, :null => false
|
||||
t.integer "status_changed_from"
|
||||
t.integer "status_changed_to"
|
||||
t.integer "issue_id"
|
||||
t.string "action_type"
|
||||
t.string "file_path"
|
||||
t.string "rev"
|
||||
t.string "rev_to"
|
||||
t.integer "attachment_id"
|
||||
t.integer "file_count", :default => 0, :null => false
|
||||
t.boolean "diff_all"
|
||||
end
|
||||
|
||||
create_table "comments", :force => true do |t|
|
||||
t.string "commented_type", :limit => 30, :default => "", :null => false
|
||||
t.integer "commented_id", :default => 0, :null => false
|
||||
|
@ -793,20 +741,20 @@ ActiveRecord::Schema.define(:version => 20140626012511) do
|
|||
end
|
||||
|
||||
create_table "relative_memos", :force => true do |t|
|
||||
t.integer "osp_id"
|
||||
t.integer "osp_id", :null => false
|
||||
t.integer "parent_id"
|
||||
t.string "subject", :null => false
|
||||
t.text "content", :limit => 16777215, :null => false
|
||||
t.string "subject", :null => false
|
||||
t.text "content", :null => false
|
||||
t.integer "author_id"
|
||||
t.integer "replies_count", :default => 0
|
||||
t.integer "replies_count", :default => 0
|
||||
t.integer "last_reply_id"
|
||||
t.boolean "lock", :default => false
|
||||
t.boolean "sticky", :default => false
|
||||
t.boolean "is_quote", :default => false
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.integer "viewed_count_crawl", :default => 0
|
||||
t.integer "viewed_count_local", :default => 0
|
||||
t.boolean "lock", :default => false
|
||||
t.boolean "sticky", :default => false
|
||||
t.boolean "is_quote", :default => false
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.integer "viewed_count_crawl", :default => 0
|
||||
t.integer "viewed_count_local", :default => 0
|
||||
t.string "url"
|
||||
t.string "username"
|
||||
t.string "userhomeurl"
|
||||
|
|
Loading…
Reference in New Issue