think_feel_do_engine 3.14.0 → 3.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/think_feel_do_engine/bit_maker/content_modules_controller.rb +7 -0
- data/app/controllers/think_feel_do_engine/participants/task_status_controller.rb +7 -3
- data/app/models/media_access_event.rb +2 -2
- data/app/presenters/think_feel_do_engine/media_access_event_presenter.rb +6 -6
- data/app/views/devise/sessions/new.html.erb +1 -1
- data/app/views/think_feel_do_engine/lessons/_form.html.erb +1 -4
- data/app/views/think_feel_do_engine/lessons/index.html.erb +1 -2
- data/app/views/think_feel_do_engine/media_access_events/_access_data.html.erb +2 -2
- data/config/routes.rb +1 -1
- data/lib/think_feel_do_engine/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e391e94351aed9559325f99b1e2c873a7a90051
|
4
|
+
data.tar.gz: 60fd151c40b2bea03832755032f577b081541488
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1687e2ae569ac8b8780293c7d9b2a939df6870c20f8284bcdffbc5223df29c36260f408129b6d2e10d9c306a21b4de510a6b33d6561d0aa55be634929b314f0d
|
7
|
+
data.tar.gz: d4e7897f71c5e1e180df68844b7283e4c64bf581199494044ad28b8122d625127c779fa450881a464e605b16a8e0436e6b5c20f1e7eb950a0fa4621de6f77376
|
@@ -9,6 +9,8 @@ module ThinkFeelDoEngine
|
|
9
9
|
before_action :set_content_module, only: [:show, :edit, :update, :destroy]
|
10
10
|
load_and_authorize_resource only: [:show, :edit, :update, :destroy]
|
11
11
|
|
12
|
+
rescue_from ActiveRecord::RecordNotFound, with: :record_not_found
|
13
|
+
|
12
14
|
# GET /content_modules
|
13
15
|
def index
|
14
16
|
authorize! :index, BitCore::ContentModule
|
@@ -112,6 +114,11 @@ module ThinkFeelDoEngine
|
|
112
114
|
def tasks_destroyed
|
113
115
|
Task.where(bit_core_content_module_id: @content_module.id).destroy_all
|
114
116
|
end
|
117
|
+
|
118
|
+
def record_not_found
|
119
|
+
redirect_to arm_bit_maker_content_modules_path(@arm),
|
120
|
+
alert: "Unable to find content module."
|
121
|
+
end
|
115
122
|
end
|
116
123
|
end
|
117
124
|
end
|
@@ -14,9 +14,13 @@ module ThinkFeelDoEngine
|
|
14
14
|
.task_statuses
|
15
15
|
.find(params[:id])
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
begin
|
18
|
+
if @task_status.engagements.build && @task_status.mark_complete
|
19
|
+
render nothing: true, status: 200
|
20
|
+
else
|
21
|
+
render nothing: true, status: 400
|
22
|
+
end
|
23
|
+
rescue ActiveRecord::InvalidForeignKey
|
20
24
|
render nothing: true, status: 400
|
21
25
|
end
|
22
26
|
end
|
@@ -13,12 +13,12 @@ class MediaAccessEvent < ActiveRecord::Base
|
|
13
13
|
|
14
14
|
delegate :title, to: :slide, prefix: true
|
15
15
|
|
16
|
-
def task_release_day
|
16
|
+
def task_release_day(group)
|
17
17
|
module_id = slide.slideshow.content_provider.bit_core_content_module_id
|
18
18
|
|
19
19
|
Task.where(
|
20
20
|
bit_core_content_module_id: module_id,
|
21
|
-
group_id:
|
21
|
+
group_id: group.id
|
22
22
|
).first.release_day
|
23
23
|
end
|
24
24
|
end
|
@@ -12,8 +12,8 @@ module ThinkFeelDoEngine
|
|
12
12
|
end_time
|
13
13
|
end
|
14
14
|
|
15
|
-
def available_on
|
16
|
-
relased_on
|
15
|
+
def available_on(group)
|
16
|
+
relased_on(group)
|
17
17
|
.to_s(:user_date)
|
18
18
|
end
|
19
19
|
|
@@ -29,8 +29,8 @@ module ThinkFeelDoEngine
|
|
29
29
|
created_at.to_s(:standard)
|
30
30
|
end
|
31
31
|
|
32
|
-
def sortable
|
33
|
-
relased_on.to_time.to_i
|
32
|
+
def sortable(group)
|
33
|
+
relased_on(group).to_time.to_i
|
34
34
|
end
|
35
35
|
|
36
36
|
def title
|
@@ -43,8 +43,8 @@ module ThinkFeelDoEngine
|
|
43
43
|
event.created_at
|
44
44
|
end
|
45
45
|
|
46
|
-
def relased_on
|
47
|
-
start_date + (event.task_release_day - 1)
|
46
|
+
def relased_on(group)
|
47
|
+
start_date + (event.task_release_day(group) - 1)
|
48
48
|
end
|
49
49
|
|
50
50
|
def end_time
|
@@ -39,7 +39,7 @@
|
|
39
39
|
<br/>
|
40
40
|
<%= render "devise/shared/links" %>
|
41
41
|
|
42
|
-
<% if (slideshow = SlideshowAnchor.fetch(:home_intro)) %>
|
42
|
+
<% if (slideshow = SlideshowAnchor.fetch(:home_intro)) && slideshow.slides.first %>
|
43
43
|
<br/>
|
44
44
|
<%= link_to "Introduction to #{t 'application_name', default: 'ThinkFeelDo'}", ThinkFeelDoEngine::Engine.routes.url_helpers
|
45
45
|
.participants_public_slideshow_slide_path(
|
@@ -19,8 +19,7 @@
|
|
19
19
|
<% @lessons.each do |lesson| %>
|
20
20
|
<tr id="lesson-<%= lesson.id %>">
|
21
21
|
<td>
|
22
|
-
<span class="handle"><%= fa_icon("
|
23
|
-
<%= lesson.position %>
|
22
|
+
<span class="handle"><%= fa_icon("reorder", class: "fa-lg") %></span>
|
24
23
|
</td>
|
25
24
|
<td>
|
26
25
|
<%= link_to lesson.pretty_title, arm_lesson_path(@arm, lesson) %>
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<% present({ event: event, start_date: view_membership(@participant, @group).start_date }, ThinkFeelDoEngine::MediaAccessEventPresenter) do |presenter| %>
|
2
2
|
<tr>
|
3
3
|
<td class="not-displayed">
|
4
|
-
<%= presenter.sortable %>
|
4
|
+
<%= presenter.sortable(@group) %>
|
5
5
|
</td>
|
6
6
|
<td><%= presenter.title %></td>
|
7
|
-
<td><%= presenter.available_on %></td>
|
7
|
+
<td><%= presenter.available_on(@group) %></td>
|
8
8
|
<td><%= presenter.formatted_start_time %></td>
|
9
9
|
<td>
|
10
10
|
<% if presenter.completed %>
|
data/config/routes.rb
CHANGED
@@ -51,7 +51,7 @@ ThinkFeelDoEngine::Engine.routes.draw do
|
|
51
51
|
|
52
52
|
resources :lessons do
|
53
53
|
collection { post :sort }
|
54
|
-
resources :lesson_slides do
|
54
|
+
resources :lesson_slides, only: [:new, :create, :show, :edit, :update, :destroy, :sort] do
|
55
55
|
collection { post :sort }
|
56
56
|
end
|
57
57
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: think_feel_do_engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.14.
|
4
|
+
version: 3.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Carty-Fickes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|