From 44b148b32f55c7eabb07de2f11eeda5173b596c6 Mon Sep 17 00:00:00 2001
From: lizanle <491823689@qq.com>
Date: Mon, 12 Oct 2015 16:15:27 +0800
Subject: [PATCH 01/14] =?UTF-8?q?act=E6=9C=89=E5=8F=AF=E8=83=BD=E4=B8=BA?=
=?UTF-8?q?=E7=A9=BA=EF=BC=8C=E5=AF=BC=E8=87=B4500=E9=94=99=E8=AF=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/courses/_course_activity.html.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/views/courses/_course_activity.html.erb b/app/views/courses/_course_activity.html.erb
index e2e1dcfc2..44b72868d 100644
--- a/app/views/courses/_course_activity.html.erb
+++ b/app/views/courses/_course_activity.html.erb
@@ -94,7 +94,7 @@
$('#reply_content_<%= activity.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});
});
- <% if activity %>
+ <% if activity && activity.course_act%>
<% act = activity.course_act %>
<% case activity.course_act_type.to_s %>
<% when 'HomeworkCommon' %>
From d3590b6a6e5b0602666f6cd41926064125c91181 Mon Sep 17 00:00:00 2001
From: lizanle <491823689@qq.com>
Date: Mon, 12 Oct 2015 16:26:47 +0800
Subject: [PATCH 02/14] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BD=9C=E5=93=81=20?=
=?UTF-8?q?=E9=82=A3=E9=87=8C=20=E4=B9=9F=E6=9C=89=E5=BC=95=E5=85=A5?=
=?UTF-8?q?=E8=B5=84=E6=BA=90=E5=BA=93=E7=9A=84=E9=9C=80=E6=B1=82=EF=BC=8C?=
=?UTF-8?q?=E4=B9=9F=E9=9C=80=E8=A6=81=E5=88=86=E9=A1=B5=E5=A4=9A=E9=80=89?=
=?UTF-8?q?=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/student_work/new.html.erb | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/app/views/student_work/new.html.erb b/app/views/student_work/new.html.erb
index c7f1d45c4..6cf168f8e 100644
--- a/app/views/student_work/new.html.erb
+++ b/app/views/student_work/new.html.erb
@@ -21,6 +21,20 @@
"");
$('#ajax-modal').parent().css("top","30%").css("left","20%").css("position","fixed");
}
+
+ // 点击 checkbox选中引用的资源的时候,保存该资源的id到session里去
+ function store_seleted_resource(dom){
+ console.log(dom.attr('checked'))
+ if(dom.attr('checked') == 'checked' ){
+ $.get(
+ '<%= store_selected_resource_user_path(User.current) %>'+'?save=y&res_id='+dom.val()
+ )
+ }else {
+ $.get(
+ '<%= store_selected_resource_user_path(User.current) %>'+'?save=n&res_id='+dom.val()
+ )
+ }
+ }