+
+ <% score = exercise.exercise_questions.where("question_type=3").last.nil? ? "": exercise.exercise_questions.where("question_type=3").last.question_score %>
+
+
分
+
+
@@ -10,12 +16,6 @@
- -
- <% score = exercise.exercise_questions.where("question_type=3").last.nil? ? "": exercise.exercise_questions.where("question_type=3").last.question_score %>
-
- 分
-
-
-
@@ -42,8 +42,8 @@
diff --git a/app/views/exercise/_show_head.html.erb b/app/views/exercise/_show_head.html.erb
index 4cc5a6cf8..b59eb11c7 100644
--- a/app/views/exercise/_show_head.html.erb
+++ b/app/views/exercise/_show_head.html.erb
@@ -1,5 +1,5 @@
-
-
+
+
<%= exercise.exercise_name%>
@@ -12,5 +12,10 @@
<% end %>
<%= exercise.exercise_description.nil? ? "" :exercise.exercise_description.html_safe%>
+
\ No newline at end of file
diff --git a/db/migrate/20161129084352_add_column_to_exercises.rb b/db/migrate/20161129084352_add_column_to_exercises.rb
new file mode 100644
index 000000000..ea3d01667
--- /dev/null
+++ b/db/migrate/20161129084352_add_column_to_exercises.rb
@@ -0,0 +1,6 @@
+class AddColumnToExercises < ActiveRecord::Migration
+ def change
+ add_column :exercises, :question_random, :integer, :default => 0
+ add_column :exercises, :choice_random, :integer, :default => 0
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index bd3645e2c..9109f785d 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20161128072528) do
+ActiveRecord::Schema.define(:version => 20161129084352) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@@ -820,11 +820,13 @@ ActiveRecord::Schema.define(:version => 20161128072528) do
t.integer "exercise_status"
t.integer "user_id"
t.integer "time"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.datetime "publish_time"
t.datetime "end_time"
t.integer "show_result"
+ t.integer "question_random", :default => 0
+ t.integer "choice_random", :default => 0
end
create_table "first_pages", :force => true do |t|
diff --git a/public/stylesheets/css/courses.css b/public/stylesheets/css/courses.css
index 91a22a177..7ea9346cc 100644
--- a/public/stylesheets/css/courses.css
+++ b/public/stylesheets/css/courses.css
@@ -604,3 +604,10 @@ a:hover.ex_icon_edit{ background:url(/images/course/icons.png) -21px -276px no-
.archive_course_notice {width:220px; position:absolute; padding:5px 10px; white-space:nowrap; background-color:#fff; right:-265px; top:-15px; box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5);}
.archive_course_notice em {display:block; border-width:10px; position:absolute;top:26px; left:-20px; border-style:dashed solid dashed dashed; border-color:transparent #eaeaea transparent transparent; font-size:0; line-height:0;}
.archive_course_notice span {display:block; border-width:10px; position:absolute;top:26px; left:-18px; border-style:dashed solid dashed dashed; border-color:transparent #fff transparent transparent; font-size:0; line-height:0;}
+
+/* 新版测验 */
+.blue_select{ background: #3b94d6; font-size: 12px; color: #fff; padding: 5px 10px;}
+.grey_select{ background: #c3c3c3; font-size: 12px; color: #fff; padding: 5px 10px;}
+a.question_choice_white{ background: #fff; color: #000000; width: 34px; height: 30px; border: 1px solid #ddd; text-align: center; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
+a.question_choice_blue{ background: #3b94d6; color: #fff; width: 34px; height: 30px; border: 1px solid #ddd; text-align: center; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
+.question_choice_dash{ background: #fff; color: #000000; width: 34px; height: 30px; border: 1px dashed #ddd; text-align: center; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
\ No newline at end of file
From c745f69e95d83f457bd3c1b57d8deff51124c638 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Thu, 1 Dec 2016 15:44:15 +0800
Subject: [PATCH 07/28] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=88=90=E5=91=98?=
=?UTF-8?q?=E5=88=97=E8=A1=A8=EF=BC=8Cfork=E5=88=97=E8=A1=A8=EF=BC=8C?=
=?UTF-8?q?=E5=85=B3=E6=B3=A8=E5=88=97=E8=A1=A8=E6=A0=B7=E5=BC=8F=E8=B0=83?=
=?UTF-8?q?=E6=95=B4=E3=80=82=E5=B9=B6=E4=BF=AE=E6=94=B9=E5=B0=8F=E9=93=83?=
=?UTF-8?q?=E9=93=9B=E6=B6=88=E6=81=AF=E7=9A=84=E7=8F=AD=E7=BA=A7=E5=8A=A0?=
=?UTF-8?q?=E5=85=A5=E7=9A=84=E7=94=B3=E8=AF=B7=E6=96=87=E5=AD=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/projects_controller.rb | 8 ++++----
app/views/issues/_statistics.html.erb | 2 +-
app/views/projects/member_forked.html.erb | 5 ++++-
app/views/projects/project_watcherlist.html.erb | 4 ++++
app/views/users/_join_course_course_message.html.erb | 6 +++---
5 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index b9d61e61e..dcd337df2 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -543,12 +543,12 @@ class ProjectsController < ApplicationController
@users -= watched.watcher_users if @watched
end
@watchers = @project.watcher_users
- @limit = 20
+ @limit = 32
@is_remote = true
@watchers_count = @watchers.count
@watcher_pages = Paginator.new @watchers_count, @limit, params['page'] || 1
@offset ||= @watcher_pages.offset
- @watchers = paginateHelper @watchers, 20
+ @watchers = paginateHelper @watchers, @limit
end
end
@@ -611,14 +611,14 @@ class ProjectsController < ApplicationController
@applied_members = appied_project_members(@project, @members)
end
end
- @members = paginateHelper @members
+ @members = paginateHelper @members, 32
end
def member_forked
@forked_projects = Project.where(:forked_from_project_id => @project.id)
- @limit = 20
+ @limit = 32
@is_remote = true
@forked_count = @forked_projects.count
@forked_pages = Paginator.new @forked_count, @limit, params['page'] || 1
diff --git a/app/views/issues/_statistics.html.erb b/app/views/issues/_statistics.html.erb
index 8b1fc6f22..d284aabb4 100644
--- a/app/views/issues/_statistics.html.erb
+++ b/app/views/issues/_statistics.html.erb
@@ -4,7 +4,7 @@
-
+
-
<%= link_to "所有#{@issues_filter.count}".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_1" %>
diff --git a/app/views/projects/member_forked.html.erb b/app/views/projects/member_forked.html.erb
index 668feef98..b3cfad1d4 100644
--- a/app/views/projects/member_forked.html.erb
+++ b/app/views/projects/member_forked.html.erb
@@ -1,3 +1,4 @@
+<% if @forked_count > 0 %>
成员本页面展示Fork了 <%= link_to @project.owner.try(:show_name), user_path(@project.owner) %>/<%= link_to @project.name, project_path(@project) %> 的用户
-
+<% else %>
+ <%= render :partial => "projects/no_data" %>
+<% end %>
diff --git a/app/views/projects/project_watcherlist.html.erb b/app/views/projects/project_watcherlist.html.erb
index 440975e68..c421f4f81 100644
--- a/app/views/projects/project_watcherlist.html.erb
+++ b/app/views/projects/project_watcherlist.html.erb
@@ -1,3 +1,4 @@
+<% if @watchers.count > 0 %>
成员 本页面展示关注了 <%= link_to @project.owner.try(:show_name), user_path(@project.owner) %>/<%= link_to @project.name, project_path(@project) %> 的用户
+<% else %>
+ <%= render :partial => "projects/no_data" %>
+<% end %>
diff --git a/app/views/users/_join_course_course_message.html.erb b/app/views/users/_join_course_course_message.html.erb
index c69d66ad0..eacbfac8c 100644
--- a/app/views/users/_join_course_course_message.html.erb
+++ b/app/views/users/_join_course_course_message.html.erb
@@ -1,11 +1,11 @@
<%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %>
系统提示
- ">您有了新的课程成员申请:
+ ">您有了新的班级成员申请:
- <% content = User.find(ma.course_message_id).name+"申请成为课程\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content && ma.content.include?('9') ? "教师" : "教辅"}" %>
+ <% content = User.find(ma.course_message_id).name+"申请成为课程\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content && ma.content.include?('9') ? "教师" : "助教"}" %>
<%= link_to content, user_path(User.find(ma.course_message_id), :course_id => ma.course_id),
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank', :title => "#{content}" %>
@@ -14,7 +14,7 @@
- <%= User.current.lastname + User.current.firstname %>老师您好!您有了新的课程成员申请,信息如下:
+ <%= User.current.lastname + User.current.firstname %>老师您好!您有了新的班级成员申请,信息如下:
真实姓名:<%= User.find(ma.course_message_id).realname %>
申请课程:<%= Course.find(ma.course_id).name%>
From 9ee36f05bc3b1c77291b801f9107c1eaa92f0546 Mon Sep 17 00:00:00 2001
From: huang
Date: Thu, 1 Dec 2016 15:57:42 +0800
Subject: [PATCH 08/28] =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=BA=93=E4=B8=93?=
=?UTF-8?q?=E4=B8=9A=E5=88=86=E7=B1=BBmodel=E5=88=9B=E5=BB=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/models/professional_level.rb | 3 +++
db/migrate/20161201073217_create_professional_levels.rb | 9 +++++++++
spec/factories/professional_levels.rb | 6 ++++++
spec/models/professional_level_spec.rb | 5 +++++
4 files changed, 23 insertions(+)
create mode 100644 app/models/professional_level.rb
create mode 100644 db/migrate/20161201073217_create_professional_levels.rb
create mode 100644 spec/factories/professional_levels.rb
create mode 100644 spec/models/professional_level_spec.rb
diff --git a/app/models/professional_level.rb b/app/models/professional_level.rb
new file mode 100644
index 000000000..b04741f91
--- /dev/null
+++ b/app/models/professional_level.rb
@@ -0,0 +1,3 @@
+class ProfessionalLevel < ActiveRecord::Base
+ attr_accessible :level
+end
diff --git a/db/migrate/20161201073217_create_professional_levels.rb b/db/migrate/20161201073217_create_professional_levels.rb
new file mode 100644
index 000000000..0a0588fcc
--- /dev/null
+++ b/db/migrate/20161201073217_create_professional_levels.rb
@@ -0,0 +1,9 @@
+class CreateProfessionalLevels < ActiveRecord::Migration
+ def change
+ create_table :professional_levels do |t|
+ t.string :level
+
+ t.timestamps
+ end
+ end
+end
diff --git a/spec/factories/professional_levels.rb b/spec/factories/professional_levels.rb
new file mode 100644
index 000000000..214be4b63
--- /dev/null
+++ b/spec/factories/professional_levels.rb
@@ -0,0 +1,6 @@
+FactoryGirl.define do
+ factory :professional_level do
+ level "MyString"
+ end
+
+end
diff --git a/spec/models/professional_level_spec.rb b/spec/models/professional_level_spec.rb
new file mode 100644
index 000000000..32509f986
--- /dev/null
+++ b/spec/models/professional_level_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe ProfessionalLevel, :type => :model do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
From 7a8c9371734f65043601b80638f89f6462f36b6c Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Thu, 1 Dec 2016 17:29:14 +0800
Subject: [PATCH 09/28] =?UTF-8?q?=E9=A1=B9=E7=9B=AEissue=E5=88=97=E8=A1=A8?=
=?UTF-8?q?=EF=BC=8C=E8=AE=A8=E8=AE=BA=E5=8C=BA=EF=BC=8C=E7=89=88=E6=9C=AC?=
=?UTF-8?q?=E5=BA=93=EF=BC=8Cpullrequests=EF=BC=8C=E9=87=8C=E7=A8=8B?=
=?UTF-8?q?=E7=A2=91=E5=8F=8A=E5=85=B6=E9=87=8C=E7=A8=8B=E7=A2=91=E8=AF=A6?=
=?UTF-8?q?=E6=83=85=E9=A1=B5=E9=9D=A2=EF=BC=8C=E6=95=B0=E6=8D=AE=E4=B8=BA?=
=?UTF-8?q?=E7=A9=BA=E6=97=B6=EF=BC=8C=E9=A1=B5=E9=9D=A2=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/files/_project_file.html.erb | 4 ++++
app/views/issues/index.html.erb | 8 ++++----
app/views/projects/_no_data.html.erb | 2 +-
app/views/projects/member_forked.html.erb | 2 ++
app/views/projects/project_watcherlist.html.erb | 2 ++
app/views/pull_requests/index.html.erb | 2 ++
app/views/users/_project_boardlist.html.erb | 8 ++++----
app/views/versions/index.html.erb | 10 +++++++---
app/views/versions/show.html.erb | 9 ++++++++-
public/stylesheets/css/project.css | 2 +-
10 files changed, 35 insertions(+), 14 deletions(-)
diff --git a/app/views/files/_project_file.html.erb b/app/views/files/_project_file.html.erb
index 27e9673a7..bd2c427f7 100644
--- a/app/views/files/_project_file.html.erb
+++ b/app/views/files/_project_file.html.erb
@@ -94,6 +94,7 @@
<%= render :partial => "files/tag_yun_project", :locals => {:tag_list => @tag_list,:project => @project, :tag_name => @tag_name}%>
+ <% if @tip_all_attachments > 0 %>
<%= render :partial => "files/tip_attachment_count" %>
@@ -124,5 +125,8 @@
<%= render :partial => 'project_list',:locals => {project: @project, all_attachments: @all_attachments, sort:@sort, order:@order, project_attachments:@obj_attachments} %>
+ <% else %>
+ <%= render :partial => "projects/no_data" %>
+ <% end %>
<%# html_title(l(:label_attachment_plural)) -%>
\ No newline at end of file
diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb
index a9f70f999..aa51842aa 100644
--- a/app/views/issues/index.html.erb
+++ b/app/views/issues/index.html.erb
@@ -214,6 +214,9 @@
<%= render :partial => 'issues/all_list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project,:subject=>@subject} %>
diff --git a/app/views/projects/_no_data.html.erb b/app/views/projects/_no_data.html.erb
index 249a67af0..bc8b97547 100644
--- a/app/views/projects/_no_data.html.erb
+++ b/app/views/projects/_no_data.html.erb
@@ -1,4 +1,4 @@
-