From 883e249ec7a00dbbc2e5d5cba1a1bfa56b2339a8 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Mon, 28 Aug 2017 10:47:03 +0800
Subject: [PATCH 01/20] =?UTF-8?q?=E6=88=91=E7=9A=84=E4=B8=BB=E9=A1=B5?=
=?UTF-8?q?=E4=B8=AD=E5=AE=9E=E8=AE=AD=E5=AE=8C=E6=88=90=E6=83=85=E5=86=B5?=
=?UTF-8?q?=E5=92=8C=E5=B7=A6=E4=BE=A7=E8=8F=9C=E5=8D=95=E6=A0=8F=E4=B8=AD?=
=?UTF-8?q?=E7=9A=84=E2=80=9C=E6=88=91=E7=9A=84=E5=AE=9E=E8=AE=AD=E2=80=9D?=
=?UTF-8?q?=E5=AE=8C=E6=88=90=E6=83=85=E5=86=B5=E9=83=BD=E4=B8=8E=E5=AE=9E?=
=?UTF-8?q?=E8=AE=ADtpm=E9=A1=B5=E9=9D=A2=E7=9A=84=E5=AE=8C=E6=88=90?=
=?UTF-8?q?=E6=83=85=E5=86=B5=E4=B8=8D=E4=B8=80=E8=87=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/helpers/application_helper.rb | 4 ++--
app/views/users/show.html.erb | 36 -------------------------------
2 files changed, 2 insertions(+), 38 deletions(-)
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index f07415888..c895e0e38 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -246,10 +246,10 @@ module ApplicationHelper
myshixun = Myshixun.where(:shixun_id => shixun.id, :user_id => user.id).first
if myshixun.nil?
0
- elsif !myshixun.nil? && myshixun.games.select{|game| game.status == 2}.count == 0
+ elsif myshixun.games.select{|game| game.status == 2}.count == 0
-1
elsif myshixun.games.select{|game| game.status == 0}.count > 0
- [myshixun.games.select{|game| game.status == 0}.count + 1]
+ [myshixun.games.select{|game| game.status == 2}.count + 1]
else
myshixun.games.select{|game| game.status == 2}.count
end
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index f8051c8e9..f6f768940 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -187,42 +187,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
<%= shixun.myshixuns.count %>
- <%= shixun.shixun_score %>
+ <%= shixun.myshixuns.count %>
+ <%= shixun.shixun_score %>
<% end %>
@@ -97,9 +97,9 @@
- <%= welcome_course_file_count course %>
- <%= welcome_course_message_count course.id %>
- <%= course.members.count %>
+ <%= welcome_course_file_count course %>
+ <%= welcome_course_message_count course.id %>
+ <%= course.members.count %>
<% end %>
diff --git a/public/javascripts/edu/application.js b/public/javascripts/edu/application.js
index 135db911a..1663c0533 100644
--- a/public/javascripts/edu/application.js
+++ b/public/javascripts/edu/application.js
@@ -1182,4 +1182,11 @@ function md_clear_data(k,mdu,id){
function editor_focus(id){
window.scrollTo(0,document.body.scrollHeight);
$("textarea[nhname='new_message_textarea_"+id+"']").focus();
-}
\ No newline at end of file
+}
+
+
+
+//for(i=0;i<$("li").length;i++){
+// var $TipContent = $("li").eq(i).attr("title");
+// $("li").eq(i).attr("title","").attr("data-tip-down",$TipContent);
+//}
From e1f3ad34893cc9a2c16e1ee119bf6ec0bf6f16ff Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Mon, 28 Aug 2017 11:11:49 +0800
Subject: [PATCH 04/20] =?UTF-8?q?=E6=8A=80=E8=83=BD=E6=A0=87=E7=AD=BE?=
=?UTF-8?q?=E5=A4=B1=E5=8E=BB=E7=84=A6=E7=82=B9=E4=BF=9D=E5=AD=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/challenges/_skill_form.html.erb | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/app/views/challenges/_skill_form.html.erb b/app/views/challenges/_skill_form.html.erb
index 682901801..21c558c78 100644
--- a/app/views/challenges/_skill_form.html.erb
+++ b/app/views/challenges/_skill_form.html.erb
@@ -19,7 +19,7 @@
技能标签不能为空
-
+
<% if @st == 0 %>
学员未参考答案通过了本阶段的评测时将获得技能,否则不能获得技能
@@ -41,6 +41,7 @@
function add_tag(){
var num = $(".task-bd-grey").children('div').length;
var val = $(".task-tag-input").val().trim();
+ var nSkill = $(".knowledge_frame");
if (val != ""){
testLength = $(".task-tag-input").val().trim().length;
$("#add_shixun_skill").before("" +
@@ -51,6 +52,11 @@
}
$("#shixun_skill_input").val("");
$("#add_shixun_skill").hide();
+ if (nSkill.length > 0){
+ $("#challenge_skill_update").submit(); //当增加或者保存技能标签以后执行保存操作
+ }else{
+ $("#stage_name_notice").show();
+ }
}
function close_tag(thisObj){
@@ -58,7 +64,7 @@
var obj = $(thisObj).parent();
$(obj).remove();
}
- $(document).click(function(e){
+ /* $(document).click(function(e){
if(e.target.id==$("#edit_skill").attr("id")||e.target.id==$("#add_knowledge").attr("id")||e.target.className==$(".knowledge_frame").attr("class")||e.target.className==$(".close").attr("class")||e.target.id==$("#shixun_skill_input").attr("id")){
return;
}else{
@@ -68,12 +74,11 @@
if(nSkill.length!==SnSkill) {
$("#challenge_skill_update").submit(); //当增加或者保存技能标签以后执行保存操作
}
-
}else{
$("#stage_name_notice").show();
}
}
- });
+ });*/
// function challenge_skill_update(){
// var nSkill = $(".knowledge_frame");
// add_tag();
From 1769dc856c07f8b8a85752109d182165e9dc7615 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Mon, 28 Aug 2017 11:15:33 +0800
Subject: [PATCH 05/20] =?UTF-8?q?"=E5=B7=B2=E4=BF=9D=E5=AD=98"tip?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/challenges/edit.html.erb | 3 +++
public/stylesheets/css/taskstyle.css | 3 ++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/views/challenges/edit.html.erb b/app/views/challenges/edit.html.erb
index 31f5d1027..b8b155b07 100644
--- a/app/views/challenges/edit.html.erb
+++ b/app/views/challenges/edit.html.erb
@@ -84,3 +84,6 @@
<% end %>
+
\ No newline at end of file
diff --git a/public/stylesheets/css/taskstyle.css b/public/stylesheets/css/taskstyle.css
index e7a08162a..ef38b6178 100644
--- a/public/stylesheets/css/taskstyle.css
+++ b/public/stylesheets/css/taskstyle.css
@@ -404,5 +404,6 @@ html>body #ajax-indicator-base { position: fixed; }
z-index:999;
}
-
+.save-tip{display:none;position: fixed;top:0px;left: 0px;width: 100%;height: 100%;}
+.save-tip-content{position: absolute;top:50%;left: 50%;margin-left: -36px;margin-top:-19px;background: rgba(0,0,0,0.7);color:#fff;padding:5px 15px;border-radius: 4px}
From 50b7656f41912c70132fbddbea0229275783d940 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Mon, 28 Aug 2017 11:27:35 +0800
Subject: [PATCH 06/20] =?UTF-8?q?=E6=88=91=E7=9A=84=E5=AE=9E=E8=AE=AD?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=B7=B2=E5=8F=82=E4=B8=8E=E7=9A=84=E6=97=B6?=
=?UTF-8?q?=E9=97=B4=E6=8E=92=E5=BA=8F=E4=B8=8D=E6=AD=A3=E7=A1=AE=EF=BC=8C?=
=?UTF-8?q?=E4=B8=8E=E4=B8=BB=E9=A1=B5=E4=B8=AD=E6=88=91=E7=9A=84=E5=AE=9E?=
=?UTF-8?q?=E8=AE=AD=E6=8E=92=E5=BA=8F=E4=B8=8D=E4=B8=80=E8=87=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/users_controller.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index d2df3f69f..c0182bf42 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -2055,9 +2055,9 @@ class UsersController < ApplicationController
id = ids + ids2
id = id.uniq
if @user == User.current
- @shixuns = Shixun.where(:id => id).order("created_at desc")
+ @shixuns = Shixun.where(:id => id).order("updated_at desc")
else
- @shixuns = Shixun.where(:status => [2, 3], :id => id).order("created_at desc")
+ @shixuns = Shixun.where(:status => [2, 3], :id => id).order("updated_at desc")
end
@limit = 5
@is_remote = true
From baa512e4d73244d81a50c8dfbd0396d05adf3eaa Mon Sep 17 00:00:00 2001
From: cxt
Date: Mon, 28 Aug 2017 15:02:54 +0800
Subject: [PATCH 07/20] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E8=AE=BE=E7=BD=AE?=
=?UTF-8?q?=E7=9A=84=E7=9B=B8=E5=85=B3=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/homework_common_controller.rb | 4 +--
app/views/homework_common/setting.html.erb | 2 +-
public/javascripts/edu/base_edu.js | 28 +++++++++----------
3 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb
index 70aec8ffc..315a69d9d 100644
--- a/app/controllers/homework_common_controller.rb
+++ b/app/controllers/homework_common_controller.rb
@@ -190,7 +190,7 @@ class HomeworkCommonController < ApplicationController
# homework_bank.save
# homework.update_attributes(:homework_bank_id => homework_bank.id)
# end
- redirect_to student_work_index_path(:homework => homework.id, :host=> Setting.host_course)
+ redirect_to setting_homework_common_path(homework, :is_new => 1)
end
end
end
@@ -340,7 +340,7 @@ class HomeworkCommonController < ApplicationController
end
@homework.save
@homework_detail_manual.save
- redirect_to setting_homework_common_path(@homework)
+ redirect_to student_work_index_path(:homework => @homework.id, :host=> Setting.host_course)
end
def edit
diff --git a/app/views/homework_common/setting.html.erb b/app/views/homework_common/setting.html.erb
index 72eba3370..f3cd6f89e 100644
--- a/app/views/homework_common/setting.html.erb
+++ b/app/views/homework_common/setting.html.erb
@@ -94,7 +94,7 @@
<% end %>
diff --git a/public/javascripts/edu/base_edu.js b/public/javascripts/edu/base_edu.js
index ebb65a064..266da3302 100644
--- a/public/javascripts/edu/base_edu.js
+++ b/public/javascripts/edu/base_edu.js
@@ -180,26 +180,26 @@ $(function(){
allowBlank:true,
lang:'ch',
format:'Y-m-d H:i',
- validateOnBlur:false,
- onSelectDate:function() {
- if($.trim($("input[name='homework_archive_time']").val()) == ""){
- var date = new Date(Date.parse($("input[name='homework_publish_time']").val().replace(/-/g, "/")));
- $("input[name='homework_archive_time']").val(formate_time(new Date(date.setMonth(date.getMonth()+1))));
- }
- },
- onSelectTime:function() {
- if($.trim($("input[name='homework_archive_time']").val()) == ""){
- var date = new Date(Date.parse($("input[name='homework_publish_time']").val().replace(/-/g, "/")));
- $("input[name='homework_archive_time']").val(formate_time(new Date(date.setMonth(date.getMonth()+1))));
- }
- }
+ validateOnBlur:false
});
$("input[name='homework_end_time']").datetimepicker({
allowBlank:true,
lang:'ch',
format:'Y-m-d H:i',
- validateOnBlur:false
+ validateOnBlur:false,
+ onSelectDate:function() {
+ if($.trim($("input[name='homework_archive_time']").val()) == ""){
+ var date = new Date(Date.parse($("input[name='homework_end_time']").val().replace(/-/g, "/")));
+ $("input[name='homework_archive_time']").val(formate_time(new Date(date.setMonth(date.getMonth()+1))));
+ }
+ },
+ onSelectTime:function() {
+ if($.trim($("input[name='homework_archive_time']").val()) == ""){
+ var date = new Date(Date.parse($("input[name='homework_end_time']").val().replace(/-/g, "/")));
+ $("input[name='homework_archive_time']").val(formate_time(new Date(date.setMonth(date.getMonth()+1))));
+ }
+ }
});
$("input[name='homework_archive_time']").datetimepicker({
From 41290a726c37c52f8a44ba578c5f77dca16e4f78 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Mon, 28 Aug 2017 16:26:26 +0800
Subject: [PATCH 08/20] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E7=95=99=E8=A8=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/managements/shixuns.html.erb | 71 ++++++++++++++++++++++++++
1 file changed, 71 insertions(+)
diff --git a/app/views/managements/shixuns.html.erb b/app/views/managements/shixuns.html.erb
index dc88af7c3..77ab76cf7 100644
--- a/app/views/managements/shixuns.html.erb
+++ b/app/views/managements/shixuns.html.erb
@@ -24,6 +24,77 @@
<%= render :partial => "managements/shixun_list" %>
+
+
+ <%= form_tag(url_for(shixuns_managements_path), :id => "managements_shixuns_search", :method => "post", :remote => true ) do %>
+
+
+
+ 搜索
+ 清除
+
+ <% end %>
+
+
+
+
+ 序号
+ 实训名称
+ 评论内容
+ 评论者
+ 评论时间
+
+
+
+
+
+ 1
+ 非常棒非常棒非常棒
+ 非常棒非常棒非常棒非常棒非常棒非常棒非常棒非常棒非常棒非常棒非常棒非常棒v非常棒非常棒
+ 胡莎莎
+ 2017-08-28 10:14
+
+ 回复
+ 删除
+
+
+
+ 1
+ 非常棒非常棒非常棒
+ 非常棒非常棒非常棒非常棒非常棒非常棒非常棒非常棒非常棒非常棒非常棒非常棒v非常棒非常棒
+ 胡莎莎
+ 2017-08-28 10:14
+
+ 回复
+ 删除
+
+
+
+ 1
+ 非常棒非常棒非常棒
+ 非常棒非常棒非常棒非常棒非常棒非常棒非常棒非常棒非常棒非常棒非常棒非常棒v非常棒非常棒
+ 胡莎莎
+ 2017-08-28 10:14
+
+ 回复
+ 删除
+
+
+
+ 1
+ 非常棒非常棒非常棒
+ 非常棒非常棒非常棒非常棒非常棒非常棒非常棒非常棒非常棒非常棒非常棒非常棒v非常棒非常棒
+ 胡莎莎
+ 2017-08-28 10:14
+
+ 回复
+ 删除
+
+
+
+
+
+