sakai-info 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +1 -1
- data/lib/sakai-info/content.rb +4 -4
- data/lib/sakai-info/quiz.rb +2 -2
- data/lib/sakai-info/site.rb +5 -5
- data/lib/sakai-info/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 776948130dbcdcf1e00195b4cbcd4a105f3e15c1
|
4
|
+
data.tar.gz: 04cea33e5e428557b899e086f136b5fb78478a6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f73aba7f9dd1769548f0a5b17eb7adb195900a1a0a54940115e9e4805a6327fbf6a63fe5a6080427a8b0251b4da891ae2f9c0808de1550a3cf461389916a29d
|
7
|
+
data.tar.gz: 1e5f042dd669ea73d1cb7f3800fe9577fdf1bb99ec45eac834ba7735567b0fa853929e4d96d9001b6363b13c203deffb1bd1e6955b26e66f5800392c8b867614
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
data/lib/sakai-info/content.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# SakaiInfo::Content library
|
3
3
|
#
|
4
4
|
# Created 2012-02-17 daveadams@gmail.com
|
5
|
-
# Last updated
|
5
|
+
# Last updated 2013-06-28 daveadams@gmail.com
|
6
6
|
#
|
7
7
|
# https://github.com/daveadams/sakai-info
|
8
8
|
#
|
@@ -363,7 +363,7 @@ module SakaiInfo
|
|
363
363
|
def self.find_portfolio_interaction_collections
|
364
364
|
collections = []
|
365
365
|
DB.connect[:content_collection].
|
366
|
-
where(
|
366
|
+
where(Sequel.like(:collection_id, '%/portfolio-interaction/')) do |row|
|
367
367
|
@@cache[row[:collection_id]] = ContentCollection.new(row)
|
368
368
|
collections << @@cache[row[:collection_id]]
|
369
369
|
end
|
@@ -372,8 +372,8 @@ module SakaiInfo
|
|
372
372
|
|
373
373
|
def size_on_disk
|
374
374
|
@size_on_disk ||=
|
375
|
-
DB.connect[:content_resource].select(
|
376
|
-
where(
|
375
|
+
DB.connect[:content_resource].select(Sequel.function(:sum, :file_size).as(:total_size)).
|
376
|
+
where(Sequel.like(:resource_id, "#{@id}%")).first[:total_size].to_i
|
377
377
|
end
|
378
378
|
|
379
379
|
def children
|
data/lib/sakai-info/quiz.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# SakaiInfo::Quiz library
|
3
3
|
#
|
4
4
|
# Created 2012-02-17 daveadams@gmail.com
|
5
|
-
# Last updated
|
5
|
+
# Last updated 2013-06-28 daveadams@gmail.com
|
6
6
|
#
|
7
7
|
# https://github.com/daveadams/sakai-info
|
8
8
|
#
|
@@ -46,7 +46,7 @@ module SakaiInfo
|
|
46
46
|
if @site.nil?
|
47
47
|
# published quizzes map to site_id via the OWN_PUBLISHED_ASSESSMENT function
|
48
48
|
# pending quizzes map to site_id via the EDIT_ASSESSMENT function
|
49
|
-
DB.connect[:sam_authzdata_t].select(
|
49
|
+
DB.connect[:sam_authzdata_t].select(Sequel.function(:distinct, :agentid)).
|
50
50
|
where(:qualifierid => @id).
|
51
51
|
where(:functionid => ["OWN_PUBLISHED_ASSESSMENT","EDIT_ASSESSMENT"]).
|
52
52
|
all.each do |row|
|
data/lib/sakai-info/site.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# SakaiInfo::Site library
|
3
3
|
#
|
4
4
|
# Created 2012-02-17 daveadams@gmail.com
|
5
|
-
# Last updated
|
5
|
+
# Last updated 2013-06-28 daveadams@gmail.com
|
6
6
|
#
|
7
7
|
# https://github.com/daveadams/sakai-info
|
8
8
|
#
|
@@ -218,7 +218,7 @@ module SakaiInfo
|
|
218
218
|
|
219
219
|
def self.count_by_property(name, value)
|
220
220
|
DB.connect[:sakai_site_property].
|
221
|
-
where(:name => name,
|
221
|
+
where(:name => name, Sequel.function(:to_char, :value) => value).count
|
222
222
|
end
|
223
223
|
|
224
224
|
def self.find_ids_by_property(property_name, property_value)
|
@@ -235,12 +235,12 @@ module SakaiInfo
|
|
235
235
|
|
236
236
|
def self.find_all_workspace_ids
|
237
237
|
DB.connect[:sakai_site].select(:site_id).
|
238
|
-
where(
|
238
|
+
where(Sequel.like(:site_id, "~%")).all.collect{|r| r[:site_id]}
|
239
239
|
end
|
240
240
|
|
241
241
|
def self.find_all_non_workspace_ids
|
242
242
|
DB.connect[:sakai_site].select(:site_id).
|
243
|
-
where(
|
243
|
+
where(~Sequel.like(:site_id, "~%")).all.collect{|r| r[:site_id]}
|
244
244
|
end
|
245
245
|
|
246
246
|
def self.find_ids_by_type(type)
|
@@ -500,7 +500,7 @@ module SakaiInfo
|
|
500
500
|
|
501
501
|
def self.find_site_ids_by_property(name, value)
|
502
502
|
DB.connect[:sakai_site_property].
|
503
|
-
where(:name => name,
|
503
|
+
where(:name => name, Sequel.function(:to_char, :value) => value).
|
504
504
|
all.collect{|r| r[:site_id]}
|
505
505
|
end
|
506
506
|
end
|
data/lib/sakai-info/version.rb
CHANGED