pandarus 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/pandarus/client.rb +59 -1
- data/lib/pandarus/models.rb +7 -2
- data/lib/pandarus/models/assignment.rb +2 -1
- data/lib/pandarus/models/assignment_date.rb +3 -1
- data/lib/pandarus/models/calendar_event.rb +45 -0
- data/lib/pandarus/models/calendar_link.rb +17 -0
- data/lib/pandarus/models/content_details.rb +5 -2
- data/lib/pandarus/models/course.rb +2 -1
- data/lib/pandarus/models/course_progress.rb +20 -0
- data/lib/pandarus/models/enrollment.rb +4 -1
- data/lib/pandarus/models/enrollment_term.rb +22 -0
- data/lib/pandarus/models/grading_scheme_entry.rb +18 -0
- data/lib/pandarus/models/grading_standard.rb +21 -0
- data/lib/pandarus/models/group.rb +3 -1
- data/lib/pandarus/models/group_membership.rb +3 -2
- data/lib/pandarus/models/quiz.rb +5 -2
- data/lib/pandarus/models/quiz_permissions.rb +23 -0
- data/lib/pandarus/models/quiz_report.rb +6 -2
- data/lib/pandarus/models/report_parameters.rb +6 -4
- data/lib/pandarus/models/section.rb +2 -1
- data/lib/pandarus/models/user.rb +2 -1
- data/lib/pandarus/v1_api.rb +682 -909
- data/lib/pandarus/version.rb +1 -1
- data/pandarus.gemspec +1 -0
- data/spec/client_spec.rb +42 -0
- metadata +27 -4
- data/lib/pandarus/models/collection.rb +0 -22
- data/lib/pandarus/models/collection_item.rb +0 -33
data/lib/pandarus/client.rb
CHANGED
@@ -1,5 +1,63 @@
|
|
1
1
|
require 'pandarus/v1_api'
|
2
|
+
require 'active_support'
|
2
3
|
|
3
4
|
module Pandarus
|
4
|
-
Client
|
5
|
+
# Client is a class just like Pandarus::V1, but you only need to pass
|
6
|
+
# the account_id in once.
|
7
|
+
#
|
8
|
+
# Example:
|
9
|
+
# client = Pandarus::Client.new(
|
10
|
+
# :account_id => 1,
|
11
|
+
# :prefix => "http://canvas.instructure.com/api",
|
12
|
+
# :token => "1~z8d91308...etc")
|
13
|
+
#
|
14
|
+
# Now, instead of passing in account_id to each method, just skip it:
|
15
|
+
# client.list_available_reports
|
16
|
+
class Client
|
17
|
+
# Let's act like a Proxy: remove all of our own methods
|
18
|
+
instance_methods.each { |m| undef_method m unless m =~ /(^__|^send$|^object_id$)/ }
|
19
|
+
|
20
|
+
def initialize(opts={}, target=nil)
|
21
|
+
footrest_keys = [:token, :prefix, :logging, :logger]
|
22
|
+
@footrest_opts = opts.slice(*footrest_keys)
|
23
|
+
# Prepare defaults
|
24
|
+
@overridden_params = opts
|
25
|
+
@overridden_params.delete_if{ |k,v| footrest_keys.include?(k.to_sym) }
|
26
|
+
|
27
|
+
@target = target
|
28
|
+
end
|
29
|
+
|
30
|
+
protected
|
31
|
+
def method_missing(name, *args, &block)
|
32
|
+
params = target.method(name).parameters
|
33
|
+
if params.empty?
|
34
|
+
# no params, nothing to modify, just pass the block
|
35
|
+
target.send(name, *args, &block)
|
36
|
+
else
|
37
|
+
# Fill in any args that are overridden, and use the others as-is
|
38
|
+
overridden_args = required_params(params).map do |param_name|
|
39
|
+
if @overridden_params.keys.include?(param_name)
|
40
|
+
@overridden_params[param_name]
|
41
|
+
else
|
42
|
+
args.shift
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# Tack on optional args, if any
|
47
|
+
overridden_args += args if args.size > 0
|
48
|
+
|
49
|
+
# Send our method + args to the Pandarus::V1 target of this proxy object
|
50
|
+
target.send(name, *overridden_args, &block)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def required_params(params)
|
55
|
+
params.select{ |p| p.first == :req }.map{ |p| p.last }
|
56
|
+
end
|
57
|
+
|
58
|
+
def target
|
59
|
+
@target ||= Pandarus::V1.new(@footrest_opts)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
5
63
|
end
|
data/lib/pandarus/models.rb
CHANGED
@@ -18,17 +18,20 @@ require 'pandarus/models/content_migration'
|
|
18
18
|
require 'pandarus/models/notification_preference'
|
19
19
|
require 'pandarus/models/grade_change_event_links'
|
20
20
|
require 'pandarus/models/folder'
|
21
|
-
require 'pandarus/models/collection'
|
22
21
|
require 'pandarus/models/discovery_url'
|
23
22
|
require 'pandarus/models/sis_import_data'
|
24
23
|
require 'pandarus/models/collaborator'
|
25
24
|
require 'pandarus/models/rubric_rating'
|
25
|
+
require 'pandarus/models/grading_standard'
|
26
|
+
require 'pandarus/models/calendar_link'
|
26
27
|
require 'pandarus/models/module_item_sequence'
|
27
28
|
require 'pandarus/models/quiz'
|
28
29
|
require 'pandarus/models/comm_message'
|
29
|
-
require 'pandarus/models/collection_item'
|
30
30
|
require 'pandarus/models/assignment_override'
|
31
|
+
require 'pandarus/models/enrollment_term'
|
32
|
+
require 'pandarus/models/course_progress'
|
31
33
|
require 'pandarus/models/page_view'
|
34
|
+
require 'pandarus/models/calendar_event'
|
32
35
|
require 'pandarus/models/migrator'
|
33
36
|
require 'pandarus/models/outcome_group'
|
34
37
|
require 'pandarus/models/section'
|
@@ -39,6 +42,7 @@ require 'pandarus/models/day'
|
|
39
42
|
require 'pandarus/models/profile'
|
40
43
|
require 'pandarus/models/column_datum'
|
41
44
|
require 'pandarus/models/file'
|
45
|
+
require 'pandarus/models/grading_scheme_entry'
|
42
46
|
require 'pandarus/models/page'
|
43
47
|
require 'pandarus/models/turnitin_settings'
|
44
48
|
require 'pandarus/models/assignment_date'
|
@@ -68,6 +72,7 @@ require 'pandarus/models/communication_channel'
|
|
68
72
|
require 'pandarus/models/quiz_question'
|
69
73
|
require 'pandarus/models/progress'
|
70
74
|
require 'pandarus/models/avatar'
|
75
|
+
require 'pandarus/models/quiz_permissions'
|
71
76
|
require 'pandarus/models/lock_info'
|
72
77
|
require 'pandarus/models/module'
|
73
78
|
require 'pandarus/models/page_revision'
|
@@ -3,7 +3,7 @@ require "pandarus/model_base"
|
|
3
3
|
# This is an autogenerated file. See readme.md.
|
4
4
|
module Pandarus
|
5
5
|
class Assignment < ModelBase
|
6
|
-
attr_accessor :id, :name, :description, :due_at, :lock_at, :unlock_at, :all_dates, :course_id, :html_url, :assignment_group_id, :allowed_extensions, :turnitin_enabled, :turnitin_settings, :grade_group_students_individually, :external_tool_tag_attributes, :peer_reviews, :automatic_peer_reviews, :peer_review_count, :peer_reviews_assign_at, :group_category_id, :needs_grading_count, :position, :muted, :points_possible, :submission_types, :grading_type, :grading_standard_id, :published, :unpublishable, :locked_for_user, :lock_info, :lock_explanation, :quiz_id, :anonymous_submissions, :discussion_topic, :freeze_on_copy, :frozen, :frozen_attributes, :submission, :use_rubric_for_grading, :rubric_settings, :rubric
|
6
|
+
attr_accessor :id, :name, :description, :due_at, :lock_at, :unlock_at, :all_dates, :course_id, :html_url, :assignment_group_id, :allowed_extensions, :turnitin_enabled, :turnitin_settings, :grade_group_students_individually, :external_tool_tag_attributes, :peer_reviews, :automatic_peer_reviews, :peer_review_count, :peer_reviews_assign_at, :group_category_id, :needs_grading_count, :position, :muted, :points_possible, :submission_types, :grading_type, :grading_standard_id, :published, :unpublishable, :only_visible_to_overrides, :locked_for_user, :lock_info, :lock_explanation, :quiz_id, :anonymous_submissions, :discussion_topic, :freeze_on_copy, :frozen, :frozen_attributes, :submission, :use_rubric_for_grading, :rubric_settings, :rubric
|
7
7
|
|
8
8
|
|
9
9
|
def self.attribute_map
|
@@ -37,6 +37,7 @@ module Pandarus
|
|
37
37
|
:grading_standard_id => {:external => "grading_standard_id", :container => false, :type => "Integer"},
|
38
38
|
:published => {:external => "published", :container => false, :type => nil},
|
39
39
|
:unpublishable => {:external => "unpublishable", :container => false, :type => nil},
|
40
|
+
:only_visible_to_overrides => {:external => "only_visible_to_overrides", :container => false, :type => nil},
|
40
41
|
:locked_for_user => {:external => "locked_for_user", :container => false, :type => nil},
|
41
42
|
:lock_info => {:external => "lock_info", :container => false, :type => "LockInfo"},
|
42
43
|
:lock_explanation => {:external => "lock_explanation", :container => false, :type => "String"},
|
@@ -3,11 +3,13 @@ require "pandarus/model_base"
|
|
3
3
|
# This is an autogenerated file. See readme.md.
|
4
4
|
module Pandarus
|
5
5
|
class AssignmentDate < ModelBase
|
6
|
-
attr_accessor :title, :due_at, :unlock_at, :lock_at
|
6
|
+
attr_accessor :id, :base, :title, :due_at, :unlock_at, :lock_at
|
7
7
|
|
8
8
|
|
9
9
|
def self.attribute_map
|
10
10
|
{
|
11
|
+
:id => {:external => "id", :container => false, :type => "Integer"},
|
12
|
+
:base => {:external => "base", :container => false, :type => nil},
|
11
13
|
:title => {:external => "title", :container => false, :type => "String"},
|
12
14
|
:due_at => {:external => "due_at", :container => false, :type => "DateTime"},
|
13
15
|
:unlock_at => {:external => "unlock_at", :container => false, :type => "DateTime"},
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require "pandarus/model_base"
|
2
|
+
|
3
|
+
# This is an autogenerated file. See readme.md.
|
4
|
+
module Pandarus
|
5
|
+
class CalendarEvent < ModelBase
|
6
|
+
attr_accessor :id, :title, :start_at, :end_at, :description, :location_name, :location_address, :context_code, :effective_context_code, :workflow_state, :hidden, :parent_event_id, :child_events_count, :child_events, :url, :html_url, :all_day_date, :all_day, :created_at, :updated_at, :appointment_group_id, :appointment_group_url, :own_reservation, :reserve_url, :reserved, :participants_per_appointment, :available_slots, :user, :group
|
7
|
+
|
8
|
+
|
9
|
+
def self.attribute_map
|
10
|
+
{
|
11
|
+
:id => {:external => "id", :container => false, :type => "Integer"},
|
12
|
+
:title => {:external => "title", :container => false, :type => "String"},
|
13
|
+
:start_at => {:external => "start_at", :container => false, :type => "DateTime"},
|
14
|
+
:end_at => {:external => "end_at", :container => false, :type => "DateTime"},
|
15
|
+
:description => {:external => "description", :container => false, :type => "String"},
|
16
|
+
:location_name => {:external => "location_name", :container => false, :type => "String"},
|
17
|
+
:location_address => {:external => "location_address", :container => false, :type => "String"},
|
18
|
+
:context_code => {:external => "context_code", :container => false, :type => "String"},
|
19
|
+
:effective_context_code => {:external => "effective_context_code", :container => false, :type => "String"},
|
20
|
+
:workflow_state => {:external => "workflow_state", :container => false, :type => "String"},
|
21
|
+
:hidden => {:external => "hidden", :container => false, :type => nil},
|
22
|
+
:parent_event_id => {:external => "parent_event_id", :container => false, :type => "Integer"},
|
23
|
+
:child_events_count => {:external => "child_events_count", :container => false, :type => "Integer"},
|
24
|
+
:child_events => {:external => "child_events", :container => true, :type => "Integer"},
|
25
|
+
:url => {:external => "url", :container => false, :type => "String"},
|
26
|
+
:html_url => {:external => "html_url", :container => false, :type => "String"},
|
27
|
+
:all_day_date => {:external => "all_day_date", :container => false, :type => "DateTime"},
|
28
|
+
:all_day => {:external => "all_day", :container => false, :type => nil},
|
29
|
+
:created_at => {:external => "created_at", :container => false, :type => "DateTime"},
|
30
|
+
:updated_at => {:external => "updated_at", :container => false, :type => "DateTime"},
|
31
|
+
:appointment_group_id => {:external => "appointment_group_id", :container => false, :type => "Integer"},
|
32
|
+
:appointment_group_url => {:external => "appointment_group_url", :container => false, :type => "String"},
|
33
|
+
:own_reservation => {:external => "own_reservation", :container => false, :type => nil},
|
34
|
+
:reserve_url => {:external => "reserve_url", :container => false, :type => "String"},
|
35
|
+
:reserved => {:external => "reserved", :container => false, :type => nil},
|
36
|
+
:participants_per_appointment => {:external => "participants_per_appointment", :container => false, :type => "Integer"},
|
37
|
+
:available_slots => {:external => "available_slots", :container => false, :type => "Integer"},
|
38
|
+
:user => {:external => "user", :container => false, :type => "String"},
|
39
|
+
:group => {:external => "group", :container => false, :type => "String"}
|
40
|
+
|
41
|
+
}
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require "pandarus/model_base"
|
2
|
+
|
3
|
+
# This is an autogenerated file. See readme.md.
|
4
|
+
module Pandarus
|
5
|
+
class CalendarLink < ModelBase
|
6
|
+
attr_accessor :ics
|
7
|
+
|
8
|
+
|
9
|
+
def self.attribute_map
|
10
|
+
{
|
11
|
+
:ics => {:external => "ics", :container => false, :type => "String"}
|
12
|
+
|
13
|
+
}
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
@@ -3,7 +3,7 @@ require "pandarus/model_base"
|
|
3
3
|
# This is an autogenerated file. See readme.md.
|
4
4
|
module Pandarus
|
5
5
|
class ContentDetails < ModelBase
|
6
|
-
attr_accessor :points_possible, :due_at, :unlock_at, :lock_at
|
6
|
+
attr_accessor :points_possible, :due_at, :unlock_at, :lock_at, :locked_for_user, :lock_explanation, :lock_info
|
7
7
|
|
8
8
|
|
9
9
|
def self.attribute_map
|
@@ -11,7 +11,10 @@ module Pandarus
|
|
11
11
|
:points_possible => {:external => "points_possible", :container => false, :type => "Integer"},
|
12
12
|
:due_at => {:external => "due_at", :container => false, :type => "DateTime"},
|
13
13
|
:unlock_at => {:external => "unlock_at", :container => false, :type => "DateTime"},
|
14
|
-
:lock_at => {:external => "lock_at", :container => false, :type => "DateTime"}
|
14
|
+
:lock_at => {:external => "lock_at", :container => false, :type => "DateTime"},
|
15
|
+
:locked_for_user => {:external => "locked_for_user", :container => false, :type => nil},
|
16
|
+
:lock_explanation => {:external => "lock_explanation", :container => false, :type => "String"},
|
17
|
+
:lock_info => {:external => "lock_info", :container => false, :type => "LockInfo"}
|
15
18
|
|
16
19
|
}
|
17
20
|
end
|
@@ -3,7 +3,7 @@ require "pandarus/model_base"
|
|
3
3
|
# This is an autogenerated file. See readme.md.
|
4
4
|
module Pandarus
|
5
5
|
class Course < ModelBase
|
6
|
-
attr_accessor :id, :sis_course_id, :name, :course_code, :workflow_state, :account_id, :root_account_id, :start_at, :end_at, :enrollments, :calendar, :default_view, :syllabus_body, :needs_grading_count, :term, :apply_assignment_group_weights, :permissions, :is_public, :public_syllabus, :public_description, :storage_quota_mb, :hide_final_grades, :license, :allow_student_assignment_edits, :allow_wiki_comments, :allow_student_forum_attachments, :open_enrollment, :self_enrollment, :restrict_enrollments_to_course_dates
|
6
|
+
attr_accessor :id, :sis_course_id, :name, :course_code, :workflow_state, :account_id, :root_account_id, :start_at, :end_at, :enrollments, :calendar, :default_view, :syllabus_body, :needs_grading_count, :term, :course_progress, :apply_assignment_group_weights, :permissions, :is_public, :public_syllabus, :public_description, :storage_quota_mb, :hide_final_grades, :license, :allow_student_assignment_edits, :allow_wiki_comments, :allow_student_forum_attachments, :open_enrollment, :self_enrollment, :restrict_enrollments_to_course_dates
|
7
7
|
|
8
8
|
|
9
9
|
def self.attribute_map
|
@@ -23,6 +23,7 @@ module Pandarus
|
|
23
23
|
:syllabus_body => {:external => "syllabus_body", :container => false, :type => "String"},
|
24
24
|
:needs_grading_count => {:external => "needs_grading_count", :container => false, :type => "Integer"},
|
25
25
|
:term => {:external => "term", :container => false, :type => "Term"},
|
26
|
+
:course_progress => {:external => "course_progress", :container => false, :type => "CourseProgress"},
|
26
27
|
:apply_assignment_group_weights => {:external => "apply_assignment_group_weights", :container => false, :type => nil},
|
27
28
|
:permissions => {:external => "permissions", :container => false, :type => "Map"},
|
28
29
|
:is_public => {:external => "is_public", :container => false, :type => nil},
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require "pandarus/model_base"
|
2
|
+
|
3
|
+
# This is an autogenerated file. See readme.md.
|
4
|
+
module Pandarus
|
5
|
+
class CourseProgress < ModelBase
|
6
|
+
attr_accessor :requirement_count, :requirement_completed_count, :next_requirement_url, :completed_at
|
7
|
+
|
8
|
+
|
9
|
+
def self.attribute_map
|
10
|
+
{
|
11
|
+
:requirement_count => {:external => "requirement_count", :container => false, :type => "Integer"},
|
12
|
+
:requirement_completed_count => {:external => "requirement_completed_count", :container => false, :type => "Integer"},
|
13
|
+
:next_requirement_url => {:external => "next_requirement_url", :container => false, :type => "String"},
|
14
|
+
:completed_at => {:external => "completed_at", :container => false, :type => "DateTime"}
|
15
|
+
|
16
|
+
}
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
@@ -3,7 +3,7 @@ require "pandarus/model_base"
|
|
3
3
|
# This is an autogenerated file. See readme.md.
|
4
4
|
module Pandarus
|
5
5
|
class Enrollment < ModelBase
|
6
|
-
attr_accessor :id, :course_id, :course_section_id, :enrollment_state, :limit_privileges_to_course_section, :root_account_id, :type, :user_id, :associated_user_id, :role, :updated_at, :last_activity_at, :html_url, :grades, :user
|
6
|
+
attr_accessor :id, :course_id, :course_section_id, :enrollment_state, :limit_privileges_to_course_section, :sis_import_id, :root_account_id, :type, :user_id, :associated_user_id, :role, :updated_at, :start_at, :end_at, :last_activity_at, :html_url, :grades, :user
|
7
7
|
|
8
8
|
|
9
9
|
def self.attribute_map
|
@@ -13,12 +13,15 @@ module Pandarus
|
|
13
13
|
:course_section_id => {:external => "course_section_id", :container => false, :type => "Integer"},
|
14
14
|
:enrollment_state => {:external => "enrollment_state", :container => false, :type => "String"},
|
15
15
|
:limit_privileges_to_course_section => {:external => "limit_privileges_to_course_section", :container => false, :type => nil},
|
16
|
+
:sis_import_id => {:external => "sis_import_id", :container => false, :type => "Integer"},
|
16
17
|
:root_account_id => {:external => "root_account_id", :container => false, :type => "Integer"},
|
17
18
|
:type => {:external => "type", :container => false, :type => "String"},
|
18
19
|
:user_id => {:external => "user_id", :container => false, :type => "Integer"},
|
19
20
|
:associated_user_id => {:external => "associated_user_id", :container => false, :type => "Integer"},
|
20
21
|
:role => {:external => "role", :container => false, :type => "String"},
|
21
22
|
:updated_at => {:external => "updated_at", :container => false, :type => "DateTime"},
|
23
|
+
:start_at => {:external => "start_at", :container => false, :type => "DateTime"},
|
24
|
+
:end_at => {:external => "end_at", :container => false, :type => "DateTime"},
|
22
25
|
:last_activity_at => {:external => "last_activity_at", :container => false, :type => "DateTime"},
|
23
26
|
:html_url => {:external => "html_url", :container => false, :type => "String"},
|
24
27
|
:grades => {:external => "grades", :container => false, :type => "Grade"},
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require "pandarus/model_base"
|
2
|
+
|
3
|
+
# This is an autogenerated file. See readme.md.
|
4
|
+
module Pandarus
|
5
|
+
class EnrollmentTerm < ModelBase
|
6
|
+
attr_accessor :id, :sis_term_id, :name, :start_at, :end_at, :workflow_state
|
7
|
+
|
8
|
+
|
9
|
+
def self.attribute_map
|
10
|
+
{
|
11
|
+
:id => {:external => "id", :container => false, :type => "Integer"},
|
12
|
+
:sis_term_id => {:external => "sis_term_id", :container => false, :type => "String"},
|
13
|
+
:name => {:external => "name", :container => false, :type => "String"},
|
14
|
+
:start_at => {:external => "start_at", :container => false, :type => "DateTime"},
|
15
|
+
:end_at => {:external => "end_at", :container => false, :type => "DateTime"},
|
16
|
+
:workflow_state => {:external => "workflow_state", :container => false, :type => "String"}
|
17
|
+
|
18
|
+
}
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require "pandarus/model_base"
|
2
|
+
|
3
|
+
# This is an autogenerated file. See readme.md.
|
4
|
+
module Pandarus
|
5
|
+
class GradingSchemeEntry < ModelBase
|
6
|
+
attr_accessor :name, :value
|
7
|
+
|
8
|
+
|
9
|
+
def self.attribute_map
|
10
|
+
{
|
11
|
+
:name => {:external => "name", :container => false, :type => "String"},
|
12
|
+
:value => {:external => "value", :container => false, :type => "Integer"}
|
13
|
+
|
14
|
+
}
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require "pandarus/model_base"
|
2
|
+
|
3
|
+
# This is an autogenerated file. See readme.md.
|
4
|
+
module Pandarus
|
5
|
+
class GradingStandard < ModelBase
|
6
|
+
attr_accessor :title, :id, :context_type, :context_id, :grading_scheme
|
7
|
+
|
8
|
+
|
9
|
+
def self.attribute_map
|
10
|
+
{
|
11
|
+
:title => {:external => "title", :container => false, :type => "String"},
|
12
|
+
:id => {:external => "id", :container => false, :type => "Integer"},
|
13
|
+
:context_type => {:external => "context_type", :container => false, :type => "String"},
|
14
|
+
:context_id => {:external => "context_id", :container => false, :type => "Integer"},
|
15
|
+
:grading_scheme => {:external => "grading_scheme", :container => true, :type => "GradingSchemeEntry"}
|
16
|
+
|
17
|
+
}
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
@@ -3,7 +3,7 @@ require "pandarus/model_base"
|
|
3
3
|
# This is an autogenerated file. See readme.md.
|
4
4
|
module Pandarus
|
5
5
|
class Group < ModelBase
|
6
|
-
attr_accessor :id, :name, :description, :is_public, :followed_by_user, :join_level, :members_count, :avatar_url, :context_type, :course_id, :role, :group_category_id, :storage_quota_mb, :permissions
|
6
|
+
attr_accessor :id, :name, :description, :is_public, :followed_by_user, :join_level, :members_count, :avatar_url, :context_type, :course_id, :role, :group_category_id, :sis_group_id, :sis_import_id, :storage_quota_mb, :permissions
|
7
7
|
|
8
8
|
|
9
9
|
def self.attribute_map
|
@@ -20,6 +20,8 @@ module Pandarus
|
|
20
20
|
:course_id => {:external => "course_id", :container => false, :type => "Integer"},
|
21
21
|
:role => {:external => "role", :container => false, :type => "String"},
|
22
22
|
:group_category_id => {:external => "group_category_id", :container => false, :type => "Integer"},
|
23
|
+
:sis_group_id => {:external => "sis_group_id", :container => false, :type => "String"},
|
24
|
+
:sis_import_id => {:external => "sis_import_id", :container => false, :type => "Integer"},
|
23
25
|
:storage_quota_mb => {:external => "storage_quota_mb", :container => false, :type => "Integer"},
|
24
26
|
:permissions => {:external => "permissions", :container => false, :type => "Map"}
|
25
27
|
|
@@ -3,7 +3,7 @@ require "pandarus/model_base"
|
|
3
3
|
# This is an autogenerated file. See readme.md.
|
4
4
|
module Pandarus
|
5
5
|
class GroupMembership < ModelBase
|
6
|
-
attr_accessor :id, :group_id, :user_id, :workflow_state, :moderator, :just_created
|
6
|
+
attr_accessor :id, :group_id, :user_id, :workflow_state, :moderator, :just_created, :sis_import_id
|
7
7
|
|
8
8
|
|
9
9
|
def self.attribute_map
|
@@ -13,7 +13,8 @@ module Pandarus
|
|
13
13
|
:user_id => {:external => "user_id", :container => false, :type => "Integer"},
|
14
14
|
:workflow_state => {:external => "workflow_state", :container => false, :type => "String"},
|
15
15
|
:moderator => {:external => "moderator", :container => false, :type => nil},
|
16
|
-
:just_created => {:external => "just_created", :container => false, :type => nil}
|
16
|
+
:just_created => {:external => "just_created", :container => false, :type => nil},
|
17
|
+
:sis_import_id => {:external => "sis_import_id", :container => false, :type => "Integer"}
|
17
18
|
|
18
19
|
}
|
19
20
|
end
|
data/lib/pandarus/models/quiz.rb
CHANGED
@@ -3,7 +3,7 @@ require "pandarus/model_base"
|
|
3
3
|
# This is an autogenerated file. See readme.md.
|
4
4
|
module Pandarus
|
5
5
|
class Quiz < ModelBase
|
6
|
-
attr_accessor :id, :title, :html_url, :mobile_url, :description, :quiz_type, :assignment_group_id, :time_limit, :shuffle_answers, :hide_results, :show_correct_answers, :show_correct_answers_at, :hide_correct_answers_at, :scoring_policy, :allowed_attempts, :one_question_at_a_time, :question_count, :points_possible, :cant_go_back, :access_code, :ip_filter, :due_at, :lock_at, :unlock_at, :published, :unpublishable, :locked_for_user, :lock_info, :lock_explanation
|
6
|
+
attr_accessor :id, :title, :html_url, :mobile_url, :description, :quiz_type, :assignment_group_id, :time_limit, :shuffle_answers, :hide_results, :show_correct_answers, :show_correct_answers_at, :hide_correct_answers_at, :scoring_policy, :allowed_attempts, :one_question_at_a_time, :question_count, :points_possible, :cant_go_back, :access_code, :ip_filter, :due_at, :lock_at, :unlock_at, :published, :unpublishable, :locked_for_user, :lock_info, :lock_explanation, :speedgrader_url, :permissions, :all_dates
|
7
7
|
|
8
8
|
|
9
9
|
def self.attribute_map
|
@@ -36,7 +36,10 @@ module Pandarus
|
|
36
36
|
:unpublishable => {:external => "unpublishable", :container => false, :type => nil},
|
37
37
|
:locked_for_user => {:external => "locked_for_user", :container => false, :type => nil},
|
38
38
|
:lock_info => {:external => "lock_info", :container => false, :type => "LockInfo"},
|
39
|
-
:lock_explanation => {:external => "lock_explanation", :container => false, :type => "String"}
|
39
|
+
:lock_explanation => {:external => "lock_explanation", :container => false, :type => "String"},
|
40
|
+
:speedgrader_url => {:external => "speedgrader_url", :container => false, :type => "String"},
|
41
|
+
:permissions => {:external => "permissions", :container => false, :type => "QuizPermissions"},
|
42
|
+
:all_dates => {:external => "all_dates", :container => false, :type => "AssignmentDate"}
|
40
43
|
|
41
44
|
}
|
42
45
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require "pandarus/model_base"
|
2
|
+
|
3
|
+
# This is an autogenerated file. See readme.md.
|
4
|
+
module Pandarus
|
5
|
+
class QuizPermissions < ModelBase
|
6
|
+
attr_accessor :read, :submit, :create, :manage, :read_statistics, :review_grades, :update
|
7
|
+
|
8
|
+
|
9
|
+
def self.attribute_map
|
10
|
+
{
|
11
|
+
:read => {:external => "read", :container => false, :type => nil},
|
12
|
+
:submit => {:external => "submit", :container => false, :type => nil},
|
13
|
+
:create => {:external => "create", :container => false, :type => nil},
|
14
|
+
:manage => {:external => "manage", :container => false, :type => nil},
|
15
|
+
:read_statistics => {:external => "read_statistics", :container => false, :type => nil},
|
16
|
+
:review_grades => {:external => "review_grades", :container => false, :type => nil},
|
17
|
+
:update => {:external => "update", :container => false, :type => nil}
|
18
|
+
|
19
|
+
}
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
@@ -3,7 +3,7 @@ require "pandarus/model_base"
|
|
3
3
|
# This is an autogenerated file. See readme.md.
|
4
4
|
module Pandarus
|
5
5
|
class QuizReport < ModelBase
|
6
|
-
attr_accessor :id, :quiz_id, :report_type, :includes_all_versions, :anonymous, :created_at, :updated_at, :file, :progress_url
|
6
|
+
attr_accessor :id, :quiz_id, :report_type, :readable_type, :includes_all_versions, :anonymous, :generatable, :created_at, :updated_at, :url, :file, :progress_url, :progress
|
7
7
|
|
8
8
|
|
9
9
|
def self.attribute_map
|
@@ -11,12 +11,16 @@ module Pandarus
|
|
11
11
|
:id => {:external => "id", :container => false, :type => "Integer"},
|
12
12
|
:quiz_id => {:external => "quiz_id", :container => false, :type => "Integer"},
|
13
13
|
:report_type => {:external => "report_type", :container => false, :type => "String"},
|
14
|
+
:readable_type => {:external => "readable_type", :container => false, :type => "String"},
|
14
15
|
:includes_all_versions => {:external => "includes_all_versions", :container => false, :type => nil},
|
15
16
|
:anonymous => {:external => "anonymous", :container => false, :type => nil},
|
17
|
+
:generatable => {:external => "generatable", :container => false, :type => nil},
|
16
18
|
:created_at => {:external => "created_at", :container => false, :type => "DateTime"},
|
17
19
|
:updated_at => {:external => "updated_at", :container => false, :type => "DateTime"},
|
20
|
+
:url => {:external => "url", :container => false, :type => "String"},
|
18
21
|
:file => {:external => "file", :container => false, :type => "File"},
|
19
|
-
:progress_url => {:external => "progress_url", :container => false, :type => "String"}
|
22
|
+
:progress_url => {:external => "progress_url", :container => false, :type => "String"},
|
23
|
+
:progress => {:external => "progress", :container => false, :type => "Progress"}
|
20
24
|
|
21
25
|
}
|
22
26
|
end
|