pandarus 0.4.5 → 0.4.6

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.
@@ -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, :post_to_sis, :integration_id, :integration_data, :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
6
+ attr_accessor :id, :name, :description, :created_at, :updated_at, :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, :post_to_sis, :integration_id, :integration_data, :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
@@ -11,6 +11,8 @@ module Pandarus
11
11
  :id => {:external => "id", :container => false, :type => "Integer"},
12
12
  :name => {:external => "name", :container => false, :type => "String"},
13
13
  :description => {:external => "description", :container => false, :type => "String"},
14
+ :created_at => {:external => "created_at", :container => false, :type => "DateTime"},
15
+ :updated_at => {:external => "updated_at", :container => false, :type => "DateTime"},
14
16
  :due_at => {:external => "due_at", :container => false, :type => "DateTime"},
15
17
  :lock_at => {:external => "lock_at", :container => false, :type => "DateTime"},
16
18
  :unlock_at => {:external => "unlock_at", :container => false, :type => "DateTime"},
@@ -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 Outcome < ModelBase
6
- attr_accessor :id, :url, :context_id, :context_type, :title, :description, :vendor_guid, :points_possible, :mastery_points, :ratings, :can_edit
6
+ attr_accessor :id, :url, :context_id, :context_type, :title, :display_name, :description, :vendor_guid, :points_possible, :mastery_points, :ratings, :can_edit
7
7
 
8
8
 
9
9
  def self.attribute_map
@@ -13,6 +13,7 @@ module Pandarus
13
13
  :context_id => {:external => "context_id", :container => false, :type => "Integer"},
14
14
  :context_type => {:external => "context_type", :container => false, :type => "String"},
15
15
  :title => {:external => "title", :container => false, :type => "String"},
16
+ :display_name => {:external => "display_name", :container => false, :type => "String"},
16
17
  :description => {:external => "description", :container => false, :type => "String"},
17
18
  :vendor_guid => {:external => "vendor_guid", :container => false, :type => "String"},
18
19
  :points_possible => {:external => "points_possible", :container => false, :type => "Integer"},
@@ -12,7 +12,7 @@ module Pandarus
12
12
  :context_id => {:external => "context_id", :container => false, :type => "Integer"},
13
13
  :context_type => {:external => "context_type", :container => false, :type => "String"},
14
14
  :outcome_group => {:external => "outcome_group", :container => false, :type => "OutcomeGroup"},
15
- :outcome => {:external => "outcome", :container => false, :type => "OutcomeGroup"}
15
+ :outcome => {:external => "outcome", :container => false, :type => "Outcome"}
16
16
 
17
17
  }
18
18
  end
@@ -13,7 +13,7 @@ module Pandarus
13
13
  :sortable_name => {:external => "sortable_name", :container => false, :type => "String"},
14
14
  :short_name => {:external => "short_name", :container => false, :type => "String"},
15
15
  :sis_user_id => {:external => "sis_user_id", :container => false, :type => "String"},
16
- :sis_import_id => {:external => "sis_import_id", :container => false, :type => "Int64"},
16
+ :sis_import_id => {:external => "sis_import_id", :container => false, :type => nil},
17
17
  :sis_login_id => {:external => "sis_login_id", :container => false, :type => "String"},
18
18
  :login_id => {:external => "login_id", :container => false, :type => "String"},
19
19
  :avatar_url => {:external => "avatar_url", :container => false, :type => "String"},
@@ -523,7 +523,7 @@ module Pandarus
523
523
  end
524
524
 
525
525
  # Get the sub-accounts of an account
526
- def get_the_sub_accounts_of_account(account_id,opts={})
526
+ def get_sub_accounts_of_account(account_id,opts={})
527
527
  query_param_keys = [
528
528
  :recursive
529
529
  ]
@@ -744,7 +744,7 @@ module Pandarus
744
744
  # List account admins
745
745
  def list_account_admins(account_id,opts={})
746
746
  query_param_keys = [
747
-
747
+ :user_id
748
748
  ]
749
749
 
750
750
  form_param_keys = [
@@ -2081,6 +2081,7 @@ module Pandarus
2081
2081
  :assignment__assignment_overrides__,
2082
2082
  :assignment__only_visible_to_overrides__,
2083
2083
  :assignment__published__,
2084
+ :assignment__grading_standard_id__,
2084
2085
 
2085
2086
  ]
2086
2087
 
@@ -2117,6 +2118,29 @@ module Pandarus
2117
2118
  ]
2118
2119
 
2119
2120
  form_param_keys = [
2121
+ :assignment__name__,
2122
+ :assignment__position__,
2123
+ :assignment__submission_types__,
2124
+ :assignment__allowed_extensions__,
2125
+ :assignment__turnitin_enabled__,
2126
+ :assignment__turnitin_settings__,
2127
+ :assignment__peer_reviews__,
2128
+ :assignment__automatic_peer_reviews__,
2129
+ :assignment__notify_of_update__,
2130
+ :assignment__group_category_id__,
2131
+ :assignment__grade_group_students_individually__,
2132
+ :assignment__external_tool_tag_attributes__,
2133
+ :assignment__points_possible__,
2134
+ :assignment__grading_type__,
2135
+ :assignment__due_at__,
2136
+ :assignment__lock_at__,
2137
+ :assignment__unlock_at__,
2138
+ :assignment__description__,
2139
+ :assignment__assignment_group_id__,
2140
+ :assignment__muted__,
2141
+ :assignment__assignment_overrides__,
2142
+ :assignment__only_visible_to_overrides__,
2143
+ :assignment__published__,
2120
2144
  :assignment__grading_standard_id__,
2121
2145
 
2122
2146
  ]
@@ -2220,7 +2244,7 @@ module Pandarus
2220
2244
  end
2221
2245
 
2222
2246
  # Redirect to the assignment override for a group
2223
- def redirect_to_the_assignment_override_for_group(group_id,assignment_id,opts={})
2247
+ def redirect_to_assignment_override_for_group(group_id,assignment_id,opts={})
2224
2248
  query_param_keys = [
2225
2249
 
2226
2250
  ]
@@ -2256,7 +2280,7 @@ module Pandarus
2256
2280
  end
2257
2281
 
2258
2282
  # Redirect to the assignment override for a section
2259
- def redirect_to_the_assignment_override_for_section(course_section_id,assignment_id,opts={})
2283
+ def redirect_to_assignment_override_for_section(course_section_id,assignment_id,opts={})
2260
2284
  query_param_keys = [
2261
2285
 
2262
2286
  ]
@@ -4950,13 +4974,13 @@ module Pandarus
4950
4974
  :course__open_enrollment__,
4951
4975
  :course__self_enrollment__,
4952
4976
  :course__restrict_enrollments_to_course_dates__,
4953
- :course__enroll_me__,
4954
4977
  :course__term_id__,
4955
4978
  :course__sis_course_id__,
4956
4979
  :course__integration_id__,
4957
4980
  :course__hide_final_grades__,
4958
4981
  :course__apply_assignment_group_weights__,
4959
4982
  :offer,
4983
+ :enroll_me,
4960
4984
  :course__syllabus_body__,
4961
4985
 
4962
4986
  ]
@@ -6809,7 +6833,7 @@ module Pandarus
6809
6833
  end
6810
6834
 
6811
6835
  # Get the full topic
6812
- def get_the_full_topic_courses(course_id,topic_id,opts={})
6836
+ def get_full_topic_courses(course_id,topic_id,opts={})
6813
6837
  query_param_keys = [
6814
6838
 
6815
6839
  ]
@@ -6845,7 +6869,7 @@ module Pandarus
6845
6869
  end
6846
6870
 
6847
6871
  # Get the full topic
6848
- def get_the_full_topic_groups(group_id,topic_id,opts={})
6872
+ def get_full_topic_groups(group_id,topic_id,opts={})
6849
6873
  query_param_keys = [
6850
6874
 
6851
6875
  ]
@@ -6881,7 +6905,7 @@ module Pandarus
6881
6905
  end
6882
6906
 
6883
6907
  # Get the full topic
6884
- def get_the_full_topic_collection_items(collection_item_id,topic_id,opts={})
6908
+ def get_full_topic_collection_items(collection_item_id,topic_id,opts={})
6885
6909
  query_param_keys = [
6886
6910
 
6887
6911
  ]
@@ -8550,6 +8574,41 @@ module Pandarus
8550
8574
  response.map {|response|Enrollment.new(response)}
8551
8575
  end
8552
8576
 
8577
+ # Enrollment by ID
8578
+ def enrollment_by_id(account_id,id,opts={})
8579
+ query_param_keys = [
8580
+
8581
+ ]
8582
+
8583
+ form_param_keys = [
8584
+
8585
+ ]
8586
+
8587
+ # verify existence of params
8588
+ raise "account_id is required" if account_id.nil?
8589
+ raise "id is required" if id.nil?
8590
+ # set default values and merge with input
8591
+ options = underscored_merge_opts(opts,
8592
+ :account_id => account_id,
8593
+ :id => id
8594
+ )
8595
+
8596
+ # resource path
8597
+ path = path_replace("/v1/accounts/{account_id}/enrollments/{id}",
8598
+ :account_id => account_id,
8599
+ :id => id)
8600
+ headers = nil
8601
+ form_params = select_params(options, form_param_keys)
8602
+ query_params = select_params(options, query_param_keys)
8603
+ if opts[:next_page]
8604
+ pagination_params = page_params_load(:get, path)
8605
+ query_params.merge! pagination_params if pagination_params
8606
+ end
8607
+ response = mixed_request(:get, path, query_params, form_params, headers)
8608
+ page_params_store(:get, path)
8609
+ Enrollment.new(response)
8610
+ end
8611
+
8553
8612
  # Enroll a user
8554
8613
  def enroll_user_courses(course_id,enrollment__user_id__,enrollment__type__,opts={})
8555
8614
  query_param_keys = [
@@ -9957,6 +10016,78 @@ module Pandarus
9957
10016
  response.map {|response|File.new(response)}
9958
10017
  end
9959
10018
 
10019
+ # List files
10020
+ def list_files_users(user_id,opts={})
10021
+ query_param_keys = [
10022
+ :content_types,
10023
+ :search_term,
10024
+ :include,
10025
+ :sort,
10026
+ :order
10027
+ ]
10028
+
10029
+ form_param_keys = [
10030
+
10031
+ ]
10032
+
10033
+ # verify existence of params
10034
+ raise "user_id is required" if user_id.nil?
10035
+ # set default values and merge with input
10036
+ options = underscored_merge_opts(opts,
10037
+ :user_id => user_id
10038
+ )
10039
+
10040
+ # resource path
10041
+ path = path_replace("/v1/users/{user_id}/files",
10042
+ :user_id => user_id)
10043
+ headers = nil
10044
+ form_params = select_params(options, form_param_keys)
10045
+ query_params = select_params(options, query_param_keys)
10046
+ if opts[:next_page]
10047
+ pagination_params = page_params_load(:get, path)
10048
+ query_params.merge! pagination_params if pagination_params
10049
+ end
10050
+ response = mixed_request(:get, path, query_params, form_params, headers)
10051
+ page_params_store(:get, path)
10052
+ response.map {|response|File.new(response)}
10053
+ end
10054
+
10055
+ # List files
10056
+ def list_files_groups(group_id,opts={})
10057
+ query_param_keys = [
10058
+ :content_types,
10059
+ :search_term,
10060
+ :include,
10061
+ :sort,
10062
+ :order
10063
+ ]
10064
+
10065
+ form_param_keys = [
10066
+
10067
+ ]
10068
+
10069
+ # verify existence of params
10070
+ raise "group_id is required" if group_id.nil?
10071
+ # set default values and merge with input
10072
+ options = underscored_merge_opts(opts,
10073
+ :group_id => group_id
10074
+ )
10075
+
10076
+ # resource path
10077
+ path = path_replace("/v1/groups/{group_id}/files",
10078
+ :group_id => group_id)
10079
+ headers = nil
10080
+ form_params = select_params(options, form_param_keys)
10081
+ query_params = select_params(options, query_param_keys)
10082
+ if opts[:next_page]
10083
+ pagination_params = page_params_load(:get, path)
10084
+ query_params.merge! pagination_params if pagination_params
10085
+ end
10086
+ response = mixed_request(:get, path, query_params, form_params, headers)
10087
+ page_params_store(:get, path)
10088
+ response.map {|response|File.new(response)}
10089
+ end
10090
+
9960
10091
  # List files
9961
10092
  def list_files_folders(id,opts={})
9962
10093
  query_param_keys = [
@@ -11582,7 +11713,7 @@ module Pandarus
11582
11713
  end
11583
11714
 
11584
11715
  # List the groups available in a context.
11585
- def list_the_groups_available_in_context_accounts(account_id,opts={})
11716
+ def list_groups_available_in_context_accounts(account_id,opts={})
11586
11717
  query_param_keys = [
11587
11718
 
11588
11719
  ]
@@ -11614,7 +11745,7 @@ module Pandarus
11614
11745
  end
11615
11746
 
11616
11747
  # List the groups available in a context.
11617
- def list_the_groups_available_in_context_courses(course_id,opts={})
11748
+ def list_groups_available_in_context_courses(course_id,opts={})
11618
11749
  query_param_keys = [
11619
11750
 
11620
11751
  ]
@@ -12308,10 +12439,148 @@ module Pandarus
12308
12439
 
12309
12440
  end
12310
12441
 
12442
+ # Create live assessment results
12443
+ def create_live_assessment_results(course_id,assessment_id,opts={})
12444
+ query_param_keys = [
12445
+
12446
+ ]
12447
+
12448
+ form_param_keys = [
12449
+
12450
+ ]
12451
+
12452
+ # verify existence of params
12453
+ raise "course_id is required" if course_id.nil?
12454
+ raise "assessment_id is required" if assessment_id.nil?
12455
+ # set default values and merge with input
12456
+ options = underscored_merge_opts(opts,
12457
+ :course_id => course_id,
12458
+ :assessment_id => assessment_id
12459
+ )
12460
+
12461
+ # resource path
12462
+ path = path_replace("/v1/courses/{course_id}/live_assessments/{assessment_id}/results",
12463
+ :course_id => course_id,
12464
+ :assessment_id => assessment_id)
12465
+ headers = nil
12466
+ form_params = select_params(options, form_param_keys)
12467
+ query_params = select_params(options, query_param_keys)
12468
+ if opts[:next_page]
12469
+ pagination_params = page_params_load(:post, path)
12470
+ query_params.merge! pagination_params if pagination_params
12471
+ end
12472
+ response = mixed_request(:post, path, query_params, form_params, headers)
12473
+ page_params_store(:post, path)
12474
+ response
12475
+
12476
+ end
12477
+
12478
+ # List live assessment results
12479
+ def list_live_assessment_results(course_id,assessment_id,opts={})
12480
+ query_param_keys = [
12481
+ :user_id
12482
+ ]
12483
+
12484
+ form_param_keys = [
12485
+
12486
+ ]
12487
+
12488
+ # verify existence of params
12489
+ raise "course_id is required" if course_id.nil?
12490
+ raise "assessment_id is required" if assessment_id.nil?
12491
+ # set default values and merge with input
12492
+ options = underscored_merge_opts(opts,
12493
+ :course_id => course_id,
12494
+ :assessment_id => assessment_id
12495
+ )
12496
+
12497
+ # resource path
12498
+ path = path_replace("/v1/courses/{course_id}/live_assessments/{assessment_id}/results",
12499
+ :course_id => course_id,
12500
+ :assessment_id => assessment_id)
12501
+ headers = nil
12502
+ form_params = select_params(options, form_param_keys)
12503
+ query_params = select_params(options, query_param_keys)
12504
+ if opts[:next_page]
12505
+ pagination_params = page_params_load(:get, path)
12506
+ query_params.merge! pagination_params if pagination_params
12507
+ end
12508
+ response = mixed_request(:get, path, query_params, form_params, headers)
12509
+ page_params_store(:get, path)
12510
+ response
12511
+
12512
+ end
12513
+
12514
+ # Create or find a live assessment
12515
+ def create_or_find_live_assessment(course_id,opts={})
12516
+ query_param_keys = [
12517
+
12518
+ ]
12519
+
12520
+ form_param_keys = [
12521
+
12522
+ ]
12523
+
12524
+ # verify existence of params
12525
+ raise "course_id is required" if course_id.nil?
12526
+ # set default values and merge with input
12527
+ options = underscored_merge_opts(opts,
12528
+ :course_id => course_id
12529
+ )
12530
+
12531
+ # resource path
12532
+ path = path_replace("/v1/courses/{course_id}/live_assessments",
12533
+ :course_id => course_id)
12534
+ headers = nil
12535
+ form_params = select_params(options, form_param_keys)
12536
+ query_params = select_params(options, query_param_keys)
12537
+ if opts[:next_page]
12538
+ pagination_params = page_params_load(:post, path)
12539
+ query_params.merge! pagination_params if pagination_params
12540
+ end
12541
+ response = mixed_request(:post, path, query_params, form_params, headers)
12542
+ page_params_store(:post, path)
12543
+ response
12544
+
12545
+ end
12546
+
12547
+ # List live assessments
12548
+ def list_live_assessments(course_id,opts={})
12549
+ query_param_keys = [
12550
+
12551
+ ]
12552
+
12553
+ form_param_keys = [
12554
+
12555
+ ]
12556
+
12557
+ # verify existence of params
12558
+ raise "course_id is required" if course_id.nil?
12559
+ # set default values and merge with input
12560
+ options = underscored_merge_opts(opts,
12561
+ :course_id => course_id
12562
+ )
12563
+
12564
+ # resource path
12565
+ path = path_replace("/v1/courses/{course_id}/live_assessments",
12566
+ :course_id => course_id)
12567
+ headers = nil
12568
+ form_params = select_params(options, form_param_keys)
12569
+ query_params = select_params(options, query_param_keys)
12570
+ if opts[:next_page]
12571
+ pagination_params = page_params_load(:get, path)
12572
+ query_params.merge! pagination_params if pagination_params
12573
+ end
12574
+ response = mixed_request(:get, path, query_params, form_params, headers)
12575
+ page_params_store(:get, path)
12576
+ response
12577
+
12578
+ end
12579
+
12311
12580
  # List user logins
12312
- def list_user_logins_accounts(account_id,user__id__,opts={})
12581
+ def list_user_logins_accounts(account_id,opts={})
12313
12582
  query_param_keys = [
12314
- :user__id__
12583
+
12315
12584
  ]
12316
12585
 
12317
12586
  form_param_keys = [
@@ -12320,11 +12589,9 @@ module Pandarus
12320
12589
 
12321
12590
  # verify existence of params
12322
12591
  raise "account_id is required" if account_id.nil?
12323
- raise "user__id__ is required" if user__id__.nil?
12324
12592
  # set default values and merge with input
12325
12593
  options = underscored_merge_opts(opts,
12326
- :account_id => account_id,
12327
- :user__id__ => user__id__
12594
+ :account_id => account_id
12328
12595
  )
12329
12596
 
12330
12597
  # resource path
@@ -12344,9 +12611,9 @@ module Pandarus
12344
12611
  end
12345
12612
 
12346
12613
  # List user logins
12347
- def list_user_logins_users(user_id,user__id__,opts={})
12614
+ def list_user_logins_users(user_id,opts={})
12348
12615
  query_param_keys = [
12349
- :user__id__
12616
+
12350
12617
  ]
12351
12618
 
12352
12619
  form_param_keys = [
@@ -12355,11 +12622,9 @@ module Pandarus
12355
12622
 
12356
12623
  # verify existence of params
12357
12624
  raise "user_id is required" if user_id.nil?
12358
- raise "user__id__ is required" if user__id__.nil?
12359
12625
  # set default values and merge with input
12360
12626
  options = underscored_merge_opts(opts,
12361
- :user_id => user_id,
12362
- :user__id__ => user__id__
12627
+ :user_id => user_id
12363
12628
  )
12364
12629
 
12365
12630
  # resource path
@@ -12379,7 +12644,7 @@ module Pandarus
12379
12644
  end
12380
12645
 
12381
12646
  # Create a user login
12382
- def create_user_login(account_id,user__id__,login__unique_id__,login__password__,login__sis_user_id__,opts={})
12647
+ def create_user_login(account_id,user__id__,login__unique_id__,opts={})
12383
12648
  query_param_keys = [
12384
12649
 
12385
12650
  ]
@@ -12396,15 +12661,11 @@ module Pandarus
12396
12661
  raise "account_id is required" if account_id.nil?
12397
12662
  raise "user__id__ is required" if user__id__.nil?
12398
12663
  raise "login__unique_id__ is required" if login__unique_id__.nil?
12399
- raise "login__password__ is required" if login__password__.nil?
12400
- raise "login__sis_user_id__ is required" if login__sis_user_id__.nil?
12401
12664
  # set default values and merge with input
12402
12665
  options = underscored_merge_opts(opts,
12403
12666
  :account_id => account_id,
12404
12667
  :user__id__ => user__id__,
12405
- :login__unique_id__ => login__unique_id__,
12406
- :login__password__ => login__password__,
12407
- :login__sis_user_id__ => login__sis_user_id__
12668
+ :login__unique_id__ => login__unique_id__
12408
12669
  )
12409
12670
 
12410
12671
  # resource path
@@ -12424,7 +12685,7 @@ module Pandarus
12424
12685
  end
12425
12686
 
12426
12687
  # Edit a user login
12427
- def edit_user_login(account_id,id,login__unique_id__,login__password__,login__sis_user_id__,opts={})
12688
+ def edit_user_login(account_id,id,opts={})
12428
12689
  query_param_keys = [
12429
12690
 
12430
12691
  ]
@@ -12439,16 +12700,10 @@ module Pandarus
12439
12700
  # verify existence of params
12440
12701
  raise "account_id is required" if account_id.nil?
12441
12702
  raise "id is required" if id.nil?
12442
- raise "login__unique_id__ is required" if login__unique_id__.nil?
12443
- raise "login__password__ is required" if login__password__.nil?
12444
- raise "login__sis_user_id__ is required" if login__sis_user_id__.nil?
12445
12703
  # set default values and merge with input
12446
12704
  options = underscored_merge_opts(opts,
12447
12705
  :account_id => account_id,
12448
- :id => id,
12449
- :login__unique_id__ => login__unique_id__,
12450
- :login__password__ => login__password__,
12451
- :login__sis_user_id__ => login__sis_user_id__
12706
+ :id => id
12452
12707
  )
12453
12708
 
12454
12709
  # resource path
@@ -13427,7 +13682,8 @@ module Pandarus
13427
13682
  # Get all outcome links for context
13428
13683
  def get_all_outcome_links_for_context_accounts(account_id,opts={})
13429
13684
  query_param_keys = [
13430
-
13685
+ :outcome_style,
13686
+ :outcome_group_style
13431
13687
  ]
13432
13688
 
13433
13689
  form_param_keys = [
@@ -13459,7 +13715,8 @@ module Pandarus
13459
13715
  # Get all outcome links for context
13460
13716
  def get_all_outcome_links_for_context_courses(course_id,opts={})
13461
13717
  query_param_keys = [
13462
-
13718
+ :outcome_style,
13719
+ :outcome_group_style
13463
13720
  ]
13464
13721
 
13465
13722
  form_param_keys = [
@@ -13917,6 +14174,7 @@ module Pandarus
13917
14174
  form_param_keys = [
13918
14175
  :outcome_id,
13919
14176
  :title,
14177
+ :display_name,
13920
14178
  :description,
13921
14179
  :vendor_guid,
13922
14180
  :mastery_points,
@@ -13955,6 +14213,7 @@ module Pandarus
13955
14213
 
13956
14214
  form_param_keys = [
13957
14215
  :title,
14216
+ :display_name,
13958
14217
  :description,
13959
14218
  :vendor_guid,
13960
14219
  :mastery_points,
@@ -13997,6 +14256,7 @@ module Pandarus
13997
14256
  form_param_keys = [
13998
14257
  :outcome_id,
13999
14258
  :title,
14259
+ :display_name,
14000
14260
  :description,
14001
14261
  :vendor_guid,
14002
14262
  :mastery_points,
@@ -14038,6 +14298,7 @@ module Pandarus
14038
14298
 
14039
14299
  form_param_keys = [
14040
14300
  :title,
14301
+ :display_name,
14041
14302
  :description,
14042
14303
  :vendor_guid,
14043
14304
  :mastery_points,
@@ -14083,6 +14344,7 @@ module Pandarus
14083
14344
  form_param_keys = [
14084
14345
  :outcome_id,
14085
14346
  :title,
14347
+ :display_name,
14086
14348
  :description,
14087
14349
  :vendor_guid,
14088
14350
  :mastery_points,
@@ -14124,6 +14386,7 @@ module Pandarus
14124
14386
 
14125
14387
  form_param_keys = [
14126
14388
  :title,
14389
+ :display_name,
14127
14390
  :description,
14128
14391
  :vendor_guid,
14129
14392
  :mastery_points,
@@ -14712,6 +14975,7 @@ module Pandarus
14712
14975
 
14713
14976
  form_param_keys = [
14714
14977
  :title,
14978
+ :display_name,
14715
14979
  :description,
14716
14980
  :vendor_guid,
14717
14981
  :mastery_points,
@@ -15616,7 +15880,7 @@ module Pandarus
15616
15880
  end
15617
15881
 
15618
15882
  # Get the results for a single poll session
15619
- def get_the_results_for_single_poll_session(poll_id,id,opts={})
15883
+ def get_results_for_single_poll_session(poll_id,id,opts={})
15620
15884
  query_param_keys = [
15621
15885
 
15622
15886
  ]
@@ -15652,7 +15916,7 @@ module Pandarus
15652
15916
  end
15653
15917
 
15654
15918
  # Create a single poll session
15655
- def create_single_poll_session(poll_id,poll_sessions__course_id__,poll_sessions__course_section_id__,opts={})
15919
+ def create_single_poll_session(poll_id,poll_sessions__course_id__,opts={})
15656
15920
  query_param_keys = [
15657
15921
 
15658
15922
  ]
@@ -15667,12 +15931,10 @@ module Pandarus
15667
15931
  # verify existence of params
15668
15932
  raise "poll_id is required" if poll_id.nil?
15669
15933
  raise "poll_sessions__course_id__ is required" if poll_sessions__course_id__.nil?
15670
- raise "poll_sessions__course_section_id__ is required" if poll_sessions__course_section_id__.nil?
15671
15934
  # set default values and merge with input
15672
15935
  options = underscored_merge_opts(opts,
15673
15936
  :poll_id => poll_id,
15674
- :poll_sessions__course_id__ => poll_sessions__course_id__,
15675
- :poll_sessions__course_section_id__ => poll_sessions__course_section_id__
15937
+ :poll_sessions__course_id__ => poll_sessions__course_id__
15676
15938
  )
15677
15939
 
15678
15940
  # resource path
@@ -15984,6 +16246,7 @@ module Pandarus
15984
16246
  form_param_keys = [
15985
16247
  :poll_choices__text__,
15986
16248
  :poll_choices__is_correct__,
16249
+ :poll_choices__position__,
15987
16250
 
15988
16251
  ]
15989
16252
 
@@ -16021,6 +16284,7 @@ module Pandarus
16021
16284
  form_param_keys = [
16022
16285
  :poll_choices__text__,
16023
16286
  :poll_choices__is_correct__,
16287
+ :poll_choices__position__,
16024
16288
 
16025
16289
  ]
16026
16290
 
@@ -16728,7 +16992,7 @@ module Pandarus
16728
16992
  end
16729
16993
 
16730
16994
  # Fetching the latest quiz statistics
16731
- def fetching_the_latest_quiz_statistics(course_id,quiz_id,all_versions,opts={})
16995
+ def fetching_latest_quiz_statistics(course_id,quiz_id,all_versions,opts={})
16732
16996
  query_param_keys = [
16733
16997
  :all_versions
16734
16998
  ]
@@ -16880,8 +17144,8 @@ module Pandarus
16880
17144
 
16881
17145
  end
16882
17146
 
16883
- # Answering a question.
16884
- def answering_question(quiz_submission_id,id,attempt,validation_token,opts={})
17147
+ # Answering questions
17148
+ def answering_questions(quiz_submission_id,attempt,validation_token,quiz_questions,opts={})
16885
17149
  query_param_keys = [
16886
17150
 
16887
17151
  ]
@@ -16890,36 +17154,35 @@ module Pandarus
16890
17154
  :attempt,
16891
17155
  :validation_token,
16892
17156
  :access_code,
16893
- :answer,
17157
+ :quiz_questions,
16894
17158
 
16895
17159
  ]
16896
17160
 
16897
17161
  # verify existence of params
16898
17162
  raise "quiz_submission_id is required" if quiz_submission_id.nil?
16899
- raise "id is required" if id.nil?
16900
17163
  raise "attempt is required" if attempt.nil?
16901
17164
  raise "validation_token is required" if validation_token.nil?
17165
+ raise "quiz_questions is required" if quiz_questions.nil?
16902
17166
  # set default values and merge with input
16903
17167
  options = underscored_merge_opts(opts,
16904
17168
  :quiz_submission_id => quiz_submission_id,
16905
- :id => id,
16906
17169
  :attempt => attempt,
16907
- :validation_token => validation_token
17170
+ :validation_token => validation_token,
17171
+ :quiz_questions => quiz_questions
16908
17172
  )
16909
17173
 
16910
17174
  # resource path
16911
- path = path_replace("/v1/quiz_submissions/{quiz_submission_id}/questions/{id}",
16912
- :quiz_submission_id => quiz_submission_id,
16913
- :id => id)
17175
+ path = path_replace("/v1/quiz_submissions/{quiz_submission_id}/questions",
17176
+ :quiz_submission_id => quiz_submission_id)
16914
17177
  headers = nil
16915
17178
  form_params = select_params(options, form_param_keys)
16916
17179
  query_params = select_params(options, query_param_keys)
16917
17180
  if opts[:next_page]
16918
- pagination_params = page_params_load(:put, path)
17181
+ pagination_params = page_params_load(:post, path)
16919
17182
  query_params.merge! pagination_params if pagination_params
16920
17183
  end
16921
- response = mixed_request(:put, path, query_params, form_params, headers)
16922
- page_params_store(:put, path)
17184
+ response = mixed_request(:post, path, query_params, form_params, headers)
17185
+ page_params_store(:post, path)
16923
17186
  response
16924
17187
 
16925
17188
  end
@@ -17090,7 +17353,7 @@ module Pandarus
17090
17353
  end
17091
17354
 
17092
17355
  # Create the quiz submission (start a quiz-taking session)
17093
- def create_the_quiz_submission_start_quiz_taking_session(course_id,quiz_id,opts={})
17356
+ def create_quiz_submission_start_quiz_taking_session(course_id,quiz_id,opts={})
17094
17357
  query_param_keys = [
17095
17358
 
17096
17359
  ]
@@ -17172,7 +17435,7 @@ module Pandarus
17172
17435
  end
17173
17436
 
17174
17437
  # Complete the quiz submission (turn it in).
17175
- def complete_the_quiz_submission_turn_it_in(course_id,quiz_id,id,attempt,validation_token,opts={})
17438
+ def complete_quiz_submission_turn_it_in(course_id,quiz_id,id,attempt,validation_token,opts={})
17176
17439
  query_param_keys = [
17177
17440
 
17178
17441
  ]
@@ -18472,7 +18735,7 @@ module Pandarus
18472
18735
  end
18473
18736
 
18474
18737
  # Submit an assignment
18475
- def submit_assignment_courses(course_id,assignment_id,comment__text_comment__,submission__submission_type__,submission__body__,submission__url__,submission__file_ids__,submission__media_comment_id__,submission__media_comment_type__,opts={})
18738
+ def submit_assignment_courses(course_id,assignment_id,submission__submission_type__,opts={})
18476
18739
  query_param_keys = [
18477
18740
 
18478
18741
  ]
@@ -18491,24 +18754,12 @@ module Pandarus
18491
18754
  # verify existence of params
18492
18755
  raise "course_id is required" if course_id.nil?
18493
18756
  raise "assignment_id is required" if assignment_id.nil?
18494
- raise "comment__text_comment__ is required" if comment__text_comment__.nil?
18495
18757
  raise "submission__submission_type__ is required" if submission__submission_type__.nil?
18496
- raise "submission__body__ is required" if submission__body__.nil?
18497
- raise "submission__url__ is required" if submission__url__.nil?
18498
- raise "submission__file_ids__ is required" if submission__file_ids__.nil?
18499
- raise "submission__media_comment_id__ is required" if submission__media_comment_id__.nil?
18500
- raise "submission__media_comment_type__ is required" if submission__media_comment_type__.nil?
18501
18758
  # set default values and merge with input
18502
18759
  options = underscored_merge_opts(opts,
18503
18760
  :course_id => course_id,
18504
18761
  :assignment_id => assignment_id,
18505
- :comment__text_comment__ => comment__text_comment__,
18506
- :submission__submission_type__ => submission__submission_type__,
18507
- :submission__body__ => submission__body__,
18508
- :submission__url__ => submission__url__,
18509
- :submission__file_ids__ => submission__file_ids__,
18510
- :submission__media_comment_id__ => submission__media_comment_id__,
18511
- :submission__media_comment_type__ => submission__media_comment_type__
18762
+ :submission__submission_type__ => submission__submission_type__
18512
18763
  )
18513
18764
 
18514
18765
  # resource path
@@ -18529,7 +18780,7 @@ module Pandarus
18529
18780
  end
18530
18781
 
18531
18782
  # Submit an assignment
18532
- def submit_assignment_sections(section_id,assignment_id,comment__text_comment__,submission__submission_type__,submission__body__,submission__url__,submission__file_ids__,submission__media_comment_id__,submission__media_comment_type__,opts={})
18783
+ def submit_assignment_sections(section_id,assignment_id,submission__submission_type__,opts={})
18533
18784
  query_param_keys = [
18534
18785
 
18535
18786
  ]
@@ -18548,24 +18799,12 @@ module Pandarus
18548
18799
  # verify existence of params
18549
18800
  raise "section_id is required" if section_id.nil?
18550
18801
  raise "assignment_id is required" if assignment_id.nil?
18551
- raise "comment__text_comment__ is required" if comment__text_comment__.nil?
18552
18802
  raise "submission__submission_type__ is required" if submission__submission_type__.nil?
18553
- raise "submission__body__ is required" if submission__body__.nil?
18554
- raise "submission__url__ is required" if submission__url__.nil?
18555
- raise "submission__file_ids__ is required" if submission__file_ids__.nil?
18556
- raise "submission__media_comment_id__ is required" if submission__media_comment_id__.nil?
18557
- raise "submission__media_comment_type__ is required" if submission__media_comment_type__.nil?
18558
18803
  # set default values and merge with input
18559
18804
  options = underscored_merge_opts(opts,
18560
18805
  :section_id => section_id,
18561
18806
  :assignment_id => assignment_id,
18562
- :comment__text_comment__ => comment__text_comment__,
18563
- :submission__submission_type__ => submission__submission_type__,
18564
- :submission__body__ => submission__body__,
18565
- :submission__url__ => submission__url__,
18566
- :submission__file_ids__ => submission__file_ids__,
18567
- :submission__media_comment_id__ => submission__media_comment_id__,
18568
- :submission__media_comment_type__ => submission__media_comment_type__
18807
+ :submission__submission_type__ => submission__submission_type__
18569
18808
  )
18570
18809
 
18571
18810
  # resource path
@@ -18910,7 +19149,7 @@ module Pandarus
18910
19149
  end
18911
19150
 
18912
19151
  # Grade or comment on a submission
18913
- def grade_or_comment_on_submission_courses(course_id,assignment_id,user_id,comment__text_comment__,comment__media_comment_id__,comment__media_comment_type__,submission__posted_grade__,rubric_assessment,opts={})
19152
+ def grade_or_comment_on_submission_courses(course_id,assignment_id,user_id,opts={})
18914
19153
  query_param_keys = [
18915
19154
 
18916
19155
  ]
@@ -18930,21 +19169,11 @@ module Pandarus
18930
19169
  raise "course_id is required" if course_id.nil?
18931
19170
  raise "assignment_id is required" if assignment_id.nil?
18932
19171
  raise "user_id is required" if user_id.nil?
18933
- raise "comment__text_comment__ is required" if comment__text_comment__.nil?
18934
- raise "comment__media_comment_id__ is required" if comment__media_comment_id__.nil?
18935
- raise "comment__media_comment_type__ is required" if comment__media_comment_type__.nil?
18936
- raise "submission__posted_grade__ is required" if submission__posted_grade__.nil?
18937
- raise "rubric_assessment is required" if rubric_assessment.nil?
18938
19172
  # set default values and merge with input
18939
19173
  options = underscored_merge_opts(opts,
18940
19174
  :course_id => course_id,
18941
19175
  :assignment_id => assignment_id,
18942
- :user_id => user_id,
18943
- :comment__text_comment__ => comment__text_comment__,
18944
- :comment__media_comment_id__ => comment__media_comment_id__,
18945
- :comment__media_comment_type__ => comment__media_comment_type__,
18946
- :submission__posted_grade__ => submission__posted_grade__,
18947
- :rubric_assessment => rubric_assessment
19176
+ :user_id => user_id
18948
19177
  )
18949
19178
 
18950
19179
  # resource path
@@ -18966,7 +19195,7 @@ module Pandarus
18966
19195
  end
18967
19196
 
18968
19197
  # Grade or comment on a submission
18969
- def grade_or_comment_on_submission_sections(section_id,assignment_id,user_id,comment__text_comment__,comment__media_comment_id__,comment__media_comment_type__,submission__posted_grade__,rubric_assessment,opts={})
19198
+ def grade_or_comment_on_submission_sections(section_id,assignment_id,user_id,opts={})
18970
19199
  query_param_keys = [
18971
19200
 
18972
19201
  ]
@@ -18986,21 +19215,11 @@ module Pandarus
18986
19215
  raise "section_id is required" if section_id.nil?
18987
19216
  raise "assignment_id is required" if assignment_id.nil?
18988
19217
  raise "user_id is required" if user_id.nil?
18989
- raise "comment__text_comment__ is required" if comment__text_comment__.nil?
18990
- raise "comment__media_comment_id__ is required" if comment__media_comment_id__.nil?
18991
- raise "comment__media_comment_type__ is required" if comment__media_comment_type__.nil?
18992
- raise "submission__posted_grade__ is required" if submission__posted_grade__.nil?
18993
- raise "rubric_assessment is required" if rubric_assessment.nil?
18994
19218
  # set default values and merge with input
18995
19219
  options = underscored_merge_opts(opts,
18996
19220
  :section_id => section_id,
18997
19221
  :assignment_id => assignment_id,
18998
- :user_id => user_id,
18999
- :comment__text_comment__ => comment__text_comment__,
19000
- :comment__media_comment_id__ => comment__media_comment_id__,
19001
- :comment__media_comment_type__ => comment__media_comment_type__,
19002
- :submission__posted_grade__ => submission__posted_grade__,
19003
- :rubric_assessment => rubric_assessment
19222
+ :user_id => user_id
19004
19223
  )
19005
19224
 
19006
19225
  # resource path
@@ -19132,6 +19351,181 @@ module Pandarus
19132
19351
  Tab.new(response)
19133
19352
  end
19134
19353
 
19354
+ # List observees
19355
+ def list_observees(user_id,opts={})
19356
+ query_param_keys = [
19357
+
19358
+ ]
19359
+
19360
+ form_param_keys = [
19361
+
19362
+ ]
19363
+
19364
+ # verify existence of params
19365
+ raise "user_id is required" if user_id.nil?
19366
+ # set default values and merge with input
19367
+ options = underscored_merge_opts(opts,
19368
+ :user_id => user_id
19369
+ )
19370
+
19371
+ # resource path
19372
+ path = path_replace("/v1/users/{user_id}/observees",
19373
+ :user_id => user_id)
19374
+ headers = nil
19375
+ form_params = select_params(options, form_param_keys)
19376
+ query_params = select_params(options, query_param_keys)
19377
+ if opts[:next_page]
19378
+ pagination_params = page_params_load(:get, path)
19379
+ query_params.merge! pagination_params if pagination_params
19380
+ end
19381
+ response = mixed_request(:get, path, query_params, form_params, headers)
19382
+ page_params_store(:get, path)
19383
+ response.map {|response|User.new(response)}
19384
+ end
19385
+
19386
+ # Add an observee with credentials
19387
+ def add_observee_with_credentials(user_id,observee__unique_id__,observee__password__,opts={})
19388
+ query_param_keys = [
19389
+
19390
+ ]
19391
+
19392
+ form_param_keys = [
19393
+ :observee__unique_id__,
19394
+ :observee__password__,
19395
+
19396
+ ]
19397
+
19398
+ # verify existence of params
19399
+ raise "user_id is required" if user_id.nil?
19400
+ raise "observee__unique_id__ is required" if observee__unique_id__.nil?
19401
+ raise "observee__password__ is required" if observee__password__.nil?
19402
+ # set default values and merge with input
19403
+ options = underscored_merge_opts(opts,
19404
+ :user_id => user_id,
19405
+ :observee__unique_id__ => observee__unique_id__,
19406
+ :observee__password__ => observee__password__
19407
+ )
19408
+
19409
+ # resource path
19410
+ path = path_replace("/v1/users/{user_id}/observees",
19411
+ :user_id => user_id)
19412
+ headers = nil
19413
+ form_params = select_params(options, form_param_keys)
19414
+ query_params = select_params(options, query_param_keys)
19415
+ if opts[:next_page]
19416
+ pagination_params = page_params_load(:post, path)
19417
+ query_params.merge! pagination_params if pagination_params
19418
+ end
19419
+ response = mixed_request(:post, path, query_params, form_params, headers)
19420
+ page_params_store(:post, path)
19421
+ User.new(response)
19422
+ end
19423
+
19424
+ # Show an observee
19425
+ def show_observee(user_id,observee_id,opts={})
19426
+ query_param_keys = [
19427
+
19428
+ ]
19429
+
19430
+ form_param_keys = [
19431
+
19432
+ ]
19433
+
19434
+ # verify existence of params
19435
+ raise "user_id is required" if user_id.nil?
19436
+ raise "observee_id is required" if observee_id.nil?
19437
+ # set default values and merge with input
19438
+ options = underscored_merge_opts(opts,
19439
+ :user_id => user_id,
19440
+ :observee_id => observee_id
19441
+ )
19442
+
19443
+ # resource path
19444
+ path = path_replace("/v1/users/{user_id}/observees/{observee_id}",
19445
+ :user_id => user_id,
19446
+ :observee_id => observee_id)
19447
+ headers = nil
19448
+ form_params = select_params(options, form_param_keys)
19449
+ query_params = select_params(options, query_param_keys)
19450
+ if opts[:next_page]
19451
+ pagination_params = page_params_load(:get, path)
19452
+ query_params.merge! pagination_params if pagination_params
19453
+ end
19454
+ response = mixed_request(:get, path, query_params, form_params, headers)
19455
+ page_params_store(:get, path)
19456
+ User.new(response)
19457
+ end
19458
+
19459
+ # Add an observee
19460
+ def add_observee(user_id,observee_id,opts={})
19461
+ query_param_keys = [
19462
+
19463
+ ]
19464
+
19465
+ form_param_keys = [
19466
+
19467
+ ]
19468
+
19469
+ # verify existence of params
19470
+ raise "user_id is required" if user_id.nil?
19471
+ raise "observee_id is required" if observee_id.nil?
19472
+ # set default values and merge with input
19473
+ options = underscored_merge_opts(opts,
19474
+ :user_id => user_id,
19475
+ :observee_id => observee_id
19476
+ )
19477
+
19478
+ # resource path
19479
+ path = path_replace("/v1/users/{user_id}/observees/{observee_id}",
19480
+ :user_id => user_id,
19481
+ :observee_id => observee_id)
19482
+ headers = nil
19483
+ form_params = select_params(options, form_param_keys)
19484
+ query_params = select_params(options, query_param_keys)
19485
+ if opts[:next_page]
19486
+ pagination_params = page_params_load(:put, path)
19487
+ query_params.merge! pagination_params if pagination_params
19488
+ end
19489
+ response = mixed_request(:put, path, query_params, form_params, headers)
19490
+ page_params_store(:put, path)
19491
+ User.new(response)
19492
+ end
19493
+
19494
+ # Remove an observee
19495
+ def remove_observee(user_id,observee_id,opts={})
19496
+ query_param_keys = [
19497
+
19498
+ ]
19499
+
19500
+ form_param_keys = [
19501
+
19502
+ ]
19503
+
19504
+ # verify existence of params
19505
+ raise "user_id is required" if user_id.nil?
19506
+ raise "observee_id is required" if observee_id.nil?
19507
+ # set default values and merge with input
19508
+ options = underscored_merge_opts(opts,
19509
+ :user_id => user_id,
19510
+ :observee_id => observee_id
19511
+ )
19512
+
19513
+ # resource path
19514
+ path = path_replace("/v1/users/{user_id}/observees/{observee_id}",
19515
+ :user_id => user_id,
19516
+ :observee_id => observee_id)
19517
+ headers = nil
19518
+ form_params = select_params(options, form_param_keys)
19519
+ query_params = select_params(options, query_param_keys)
19520
+ if opts[:next_page]
19521
+ pagination_params = page_params_load(:delete, path)
19522
+ query_params.merge! pagination_params if pagination_params
19523
+ end
19524
+ response = mixed_request(:delete, path, query_params, form_params, headers)
19525
+ page_params_store(:delete, path)
19526
+ User.new(response)
19527
+ end
19528
+
19135
19529
  # List users in account
19136
19530
  def list_users_in_account(account_id,opts={})
19137
19531
  query_param_keys = [
@@ -19165,7 +19559,7 @@ module Pandarus
19165
19559
  end
19166
19560
 
19167
19561
  # List the activity stream
19168
- def list_the_activity_stream_self(opts={})
19562
+ def list_activity_stream_self(opts={})
19169
19563
  query_param_keys = [
19170
19564
 
19171
19565
  ]
@@ -19197,7 +19591,7 @@ module Pandarus
19197
19591
  end
19198
19592
 
19199
19593
  # List the activity stream
19200
- def list_the_activity_stream_activity_stream(opts={})
19594
+ def list_activity_stream_activity_stream(opts={})
19201
19595
  query_param_keys = [
19202
19596
 
19203
19597
  ]
@@ -19261,7 +19655,7 @@ module Pandarus
19261
19655
  end
19262
19656
 
19263
19657
  # List the TODO items
19264
- def list_the_todo_items(opts={})
19658
+ def list_todo_items(opts={})
19265
19659
  query_param_keys = [
19266
19660
 
19267
19661
  ]
@@ -1,3 +1,3 @@
1
1
  module Pandarus
2
- VERSION = '0.4.5' unless defined?(Pandarus::VERSION)
2
+ VERSION = '0.4.6' unless defined?(Pandarus::VERSION)
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pandarus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-06-03 00:00:00.000000000 Z
12
+ date: 2014-07-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake