coalescing_panda 4.1.4 → 4.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b9eae33c2d12ac264562074a69a6b3414176c275
4
- data.tar.gz: 9fd1f9aa7a270ccfe68a619d2a4878dea2b80d19
3
+ metadata.gz: bf97da107a89508acdbe4df40bfd0ac9ff589b81
4
+ data.tar.gz: 846b77dd1fd1e5b3cf13f5be09e341c8bfbe9b18
5
5
  SHA512:
6
- metadata.gz: 21dd37a77ac2f53e262e344625be37ee82648d721b883f66f3e9d53ae88659158662082c51e090dd875cfbc621011b0376e0f6348b9dbda4a197e72bf012066f
7
- data.tar.gz: 62cc2e004392e24b9e4a86d23be6ab2fbc8d5798809299ceac0e47e46b607e22b2bcdaeea4607009d10937ab46f1388817dac4bed9a8c37ab19ddfc1b008c8bc
6
+ metadata.gz: 3e35dd5e7cffc6826fe80662b0a791dffebfd37e3cce6cbb69832f89a94ae686ba28bc564ed54cca8ebf857afabc5ac4c2f3aac0b93bf82f16186575735b2bdb
7
+ data.tar.gz: ff637c79831934cfc8518de83f303a0f5d4f7099d4a0f9fb49cc854b89bbc6e4655f1808f2d651483c8082ac44c7373a7e8c9bf1b1549ec8b4e750561ad0f0fc
@@ -17,10 +17,10 @@ window.CoalescingPanda.CanvasBatchProgress = class CanvasBatchProgress
17
17
  $('#batch-progress').html(data)
18
18
  setFlashMessages()
19
19
  batch = $('#batch-info').data('batch')
20
- if batch.status == "Completed"
20
+ if batch && batch.status == "Completed"
21
21
  clearIntervalAndBatch(data, batch)
22
22
  successCallback() if successCallback != undefined
23
- else if batch.status == 'Error'
23
+ else if batch && batch.status == 'Error'
24
24
  clearIntervalAndBatch(data, batch)
25
25
  errorCallback() if errorCallback != undefined
26
26
 
@@ -44,8 +44,4 @@ window.CoalescingPanda.CanvasBatchProgress = class CanvasBatchProgress
44
44
  setFlashMessages = ->
45
45
  if window.messages != undefined
46
46
  for key of window.messages
47
- $(".batch-message-#{key}").text("#{window.messages[key]}")
48
-
49
- $ ->
50
- $("#batch-container").unbind().bind "batchStarted", (event, data) ->
51
- new CanvasBatchProgress()
47
+ $(".batch-message-#{key}").text("#{window.messages[key]}")
@@ -0,0 +1,97 @@
1
+ .progress {
2
+ overflow: hidden;
3
+ height: 20px;
4
+ margin-bottom: 20px;
5
+ background-color: #f5f5f5;
6
+ border-radius: 4px;
7
+ -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
8
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
9
+ }
10
+ .progress-bar {
11
+ float: left;
12
+ width: 0%;
13
+ height: 100%;
14
+ font-size: 12px;
15
+ line-height: 20px;
16
+ color: #ffffff;
17
+ text-align: center;
18
+ background-color: #337ab7;
19
+ -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
20
+ box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
21
+ -webkit-transition: width 0.6s ease;
22
+ -o-transition: width 0.6s ease;
23
+ transition: width 0.6s ease;
24
+ }
25
+
26
+ .alert {
27
+ padding: 8px 35px 8px 14px;
28
+ margin-bottom: 20px;
29
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
30
+ background-color: #fcf8e3;
31
+ border: 1px solid #fbeed5;
32
+ -webkit-border-radius: 4px;
33
+ -moz-border-radius: 4px;
34
+ border-radius: 4px;
35
+ }
36
+
37
+ .alert,
38
+ .alert h4 {
39
+ color: #c09853;
40
+ }
41
+
42
+ .alert h4 {
43
+ margin: 0;
44
+ }
45
+
46
+ .alert .close {
47
+ position: relative;
48
+ top: -2px;
49
+ right: -21px;
50
+ line-height: 20px;
51
+ }
52
+
53
+ .alert-success {
54
+ color: #468847;
55
+ background-color: #dff0d8;
56
+ border-color: #d6e9c6;
57
+ }
58
+
59
+ .alert-success h4 {
60
+ color: #468847;
61
+ }
62
+
63
+ .alert-danger,
64
+ .alert-error {
65
+ color: #b94a48;
66
+ background-color: #f2dede;
67
+ border-color: #eed3d7;
68
+ }
69
+
70
+ .alert-danger h4,
71
+ .alert-error h4 {
72
+ color: #b94a48;
73
+ }
74
+
75
+ .alert-info {
76
+ color: #3a87ad;
77
+ background-color: #d9edf7;
78
+ border-color: #bce8f1;
79
+ }
80
+
81
+ .alert-info h4 {
82
+ color: #3a87ad;
83
+ }
84
+
85
+ .alert-block {
86
+ padding-top: 14px;
87
+ padding-bottom: 14px;
88
+ }
89
+
90
+ .alert-block > p,
91
+ .alert-block > ul {
92
+ margin-bottom: 0;
93
+ }
94
+
95
+ .alert-block p + p {
96
+ margin-top: 5px;
97
+ }
@@ -35,11 +35,13 @@ class CoalescingPanda::Workers::CourseMiner
35
35
  return unless batch.status == 'Queued'
36
36
  begin
37
37
  batch.update_attributes(status: "Started", percent_complete: 0)
38
- SUPPORTED_MODELS.each_with_index do |model_key, index|
39
- index += 1
40
- process_api_data(model_key.to_sym) if options.include?(model_key)
38
+ index = 1
39
+ SUPPORTED_MODELS.each do |model_key|
40
+ next unless options.include?(model_key)
41
+ process_api_data(model_key.to_sym)
41
42
  percent_complete = (index/(options.count.nonzero? || 1).to_f * 100).round(1)
42
43
  batch.update_attributes(percent_complete: percent_complete)
44
+ index += 1
43
45
  end
44
46
  batch.update_attributes(status: "Completed", percent_complete: 100)
45
47
  rescue => e
@@ -10,8 +10,8 @@
10
10
 
11
11
  -if @batch.status == "Started"
12
12
  %h6.batch-message-started Downloading data from Canvas
13
- .progress.progress-striped.active
14
- .bar{:style => "width: #{@batch.percent_complete}%;"}
13
+ .progress
14
+ .progress-bar{"aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => "#{@batch.percent_complete}", :role => "progressbar", :style => "width: #{@batch.percent_complete}%;"}
15
15
 
16
16
  -if @batch.status == "Error"
17
17
  .alert.alert-block.alert-error
@@ -1,3 +1,3 @@
1
1
  module CoalescingPanda
2
- VERSION = '4.1.4'
2
+ VERSION = '4.1.5'
3
3
  end
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20150526144713) do
14
+ ActiveRecord::Schema.define(version: 20150506192717) do
15
15
 
16
16
  create_table "coalescing_panda_assignment_groups", force: :cascade do |t|
17
17
  t.integer "coalescing_panda_course_id", null: false
@@ -59,14 +59,13 @@ ActiveRecord::Schema.define(version: 20150526144713) do
59
59
  end
60
60
 
61
61
  create_table "coalescing_panda_canvas_batches", force: :cascade do |t|
62
- t.float "percent_complete", default: 0.0
63
- t.string "status", limit: 255
62
+ t.float "percent_complete", default: 0.0
63
+ t.string "status", limit: 255
64
64
  t.text "message"
65
65
  t.datetime "created_at"
66
66
  t.datetime "updated_at"
67
67
  t.integer "context_id"
68
- t.string "context_type"
69
- t.integer "coalescing_panda_lti_account_id"
68
+ t.string "context_type", limit: 255
70
69
  end
71
70
 
72
71
  create_table "coalescing_panda_courses", force: :cascade do |t|
@@ -100,34 +99,30 @@ ActiveRecord::Schema.define(version: 20150526144713) do
100
99
  t.datetime "updated_at"
101
100
  end
102
101
 
103
- add_index "coalescing_panda_enrollments", ["coalescing_panda_user_id", "coalescing_panda_section_id", "enrollment_type"], name: "index_enrollments_user_and_assignment", unique: true
102
+ add_index "coalescing_panda_enrollments", ["coalescing_panda_user_id", "coalescing_panda_section_id", "enrollment_type"], name: "index_enrollments_user_and_section", unique: true
104
103
  add_index "coalescing_panda_enrollments", ["sis_id"], name: "index_coalescing_panda_enrollments_on_sis_id"
105
104
 
106
105
  create_table "coalescing_panda_group_memberships", force: :cascade do |t|
107
106
  t.integer "coalescing_panda_group_id"
108
107
  t.integer "coalescing_panda_user_id"
109
- t.string "canvas_group_membership_id"
110
- t.string "workflow_state"
108
+ t.string "canvas_group_membership_id", limit: 255
109
+ t.string "workflow_state", limit: 255
111
110
  t.datetime "created_at"
112
111
  t.datetime "updated_at"
113
112
  end
114
113
 
115
- add_index "coalescing_panda_group_memberships", ["coalescing_panda_group_id", "coalescing_panda_user_id"], name: "index_group_memberships_user_and_group", unique: true
116
-
117
114
  create_table "coalescing_panda_groups", force: :cascade do |t|
118
115
  t.integer "context_id"
119
- t.string "context_type"
120
- t.string "description"
121
- t.string "group_category_id"
122
- t.string "canvas_group_id"
123
- t.string "name"
116
+ t.string "context_type", limit: 255
117
+ t.string "description", limit: 255
118
+ t.string "group_category_id", limit: 255
119
+ t.string "canvas_group_id", limit: 255
120
+ t.string "name", limit: 255
124
121
  t.integer "members_count"
125
122
  t.datetime "created_at"
126
123
  t.datetime "updated_at"
127
124
  end
128
125
 
129
- add_index "coalescing_panda_groups", ["context_id", "canvas_group_id"], name: "index_groups_context_and_group_id", unique: true
130
-
131
126
  create_table "coalescing_panda_lti_accounts", force: :cascade do |t|
132
127
  t.string "name", limit: 255
133
128
  t.string "key", limit: 255
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coalescing_panda
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.4
4
+ version: 4.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Mills
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-05-26 00:00:00.000000000 Z
13
+ date: 2015-06-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -323,6 +323,7 @@ files:
323
323
  - app/assets/javascripts/coalescing_panda/oauth2.js.coffee
324
324
  - app/assets/stylesheets/coalescing_panda/application.css.scss
325
325
  - app/assets/stylesheets/coalescing_panda/launch.css.scss
326
+ - app/assets/stylesheets/coalescing_panda/progress.css.scss
326
327
  - app/controllers/coalescing_panda/application_controller.rb
327
328
  - app/controllers/coalescing_panda/canvas_batches_controller.rb
328
329
  - app/controllers/coalescing_panda/lti_controller.rb