Class: RusticiSoftwareCloudV2::CourseApi

Inherits:
Object
  • Object
show all
Extended by:
Gem::Deprecate
Defined in:
lib/rustici_software_cloud_v2/api/course_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ CourseApi

Returns a new instance of CourseApi.



18
19
20
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 18

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



16
17
18
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 16

def api_client
  @api_client
end

Instance Method Details

Get a launch link to preview a Course Returns the launch link to use to preview the course. Course preview does not require an underlying registration. As such, no interactions will be tracked during the preview launch. Previews are meant to be a way to confirm the course looks and acts the way it should. >Note: >The cmi5 standard does not support the ability to preview a course. A launch link can be built for a cmi5 course, but visiting the link will result in an error page. More details can be found in this [article explaining the complications behind cmi5 preview launches](support.scorm.com/hc/en-us/articles/1260805676710).

Parameters:

  • course_id
  • launch_link_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



30
31
32
33
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 30

def build_course_preview_launch_link(course_id, launch_link_request, opts = {})
  data, _status_code, _headers = build_course_preview_launch_link_with_http_info(course_id, launch_link_request, opts)
  data
end

Get a launch link to preview a Course Returns the launch link to use to preview the course. Course preview does not require an underlying registration. As such, no interactions will be tracked during the preview launch. Previews are meant to be a way to confirm the course looks and acts the way it should. >Note: >The cmi5 standard does not support the ability to preview a course. A launch link can be built for a cmi5 course, but visiting the link will result in an error page. More details can be found in this [article explaining the complications behind cmi5 preview launches](support.scorm.com/hc/en-us/articles/1260805676710).

Parameters:

  • course_id
  • launch_link_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(LaunchLinkSchema, Fixnum, Hash)>)

    LaunchLinkSchema data, response status code and response headers



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 41

def build_course_preview_launch_link_with_http_info(course_id, launch_link_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.build_course_preview_launch_link ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.build_course_preview_launch_link"
  end
  # verify the required parameter 'launch_link_request' is set
  if launch_link_request.nil?
    fail ArgumentError, "Missing the required parameter 'launch_link_request' when calling CourseApi.build_course_preview_launch_link"
  end
  # resource path
  local_var_path = '/courses/{courseId}/preview'.sub('{' + 'courseId' + '}', course_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(launch_link_request)
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'LaunchLinkSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#build_course_preview_launch_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Get a launch link to preview a Course Version Returns the launch link to use to preview the course version. Course preview does not require an underlying registration. As such, no interactions will be tracked during the preview launch. Previews are meant to be a way to confirm the course looks and acts the way it should. >Note: >The cmi5 standard does not support the ability to preview a course. A launch link can be built for a cmi5 course, but visiting the link will result in an error page. More details can be found in this [article explaining the complications behind cmi5 preview launches](support.scorm.com/hc/en-us/articles/1260805676710).

Parameters:

  • course_id
  • version_id
  • launch_link_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



92
93
94
95
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 92

def build_course_preview_launch_link_with_version(course_id, version_id, launch_link_request, opts = {})
  data, _status_code, _headers = build_course_preview_launch_link_with_version_with_http_info(course_id, version_id, launch_link_request, opts)
  data
end

Get a launch link to preview a Course Version Returns the launch link to use to preview the course version. Course preview does not require an underlying registration. As such, no interactions will be tracked during the preview launch. Previews are meant to be a way to confirm the course looks and acts the way it should. &gt;Note: &gt;The cmi5 standard does not support the ability to preview a course. A launch link can be built for a cmi5 course, but visiting the link will result in an error page. More details can be found in this [article explaining the complications behind cmi5 preview launches](support.scorm.com/hc/en-us/articles/1260805676710).

Parameters:

  • course_id
  • version_id
  • launch_link_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(LaunchLinkSchema, Fixnum, Hash)>)

    LaunchLinkSchema data, response status code and response headers



104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 104

def build_course_preview_launch_link_with_version_with_http_info(course_id, version_id, launch_link_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.build_course_preview_launch_link_with_version ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.build_course_preview_launch_link_with_version"
  end
  # verify the required parameter 'version_id' is set
  if version_id.nil?
    fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.build_course_preview_launch_link_with_version"
  end
  # verify the required parameter 'launch_link_request' is set
  if launch_link_request.nil?
    fail ArgumentError, "Missing the required parameter 'launch_link_request' when calling CourseApi.build_course_preview_launch_link_with_version"
  end
  # resource path
  local_var_path = '/courses/{courseId}/versions/{versionId}/preview'.sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(launch_link_request)
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'LaunchLinkSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#build_course_preview_launch_link_with_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_fetch_and_import_course_job(course_id, import_request, opts = {}) ⇒ StringResultSchema

Create a Course from a package fetched from an external source Creates a course from a package fetched and imported from the provided url. The package will be downloaded from the url and stored in SCORM Cloud. An import job ID will be returned, which can be used with GetImportJobStatus to view the status of the import. Courses represent the learning material a learner will progress through. >Note: >The import job ID used for calls to GetImportJobStatus are only valid for one week after the course import finishes.

Parameters:

  • course_id

    A unique identifier your application will use to identify the course after import. Your application is responsible both for generating this unique ID and for keeping track of the ID for later use.

  • import_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :may_create_new_version (BOOLEAN)

    Is it OK to create a new version of this course? If this is set to false and the course already exists, the upload will fail. If true and the course already exists then a new version will be created. No effect if the course doesn&#39;t already exist. (default to false)

  • :postback_url (String)

    An optional parameter that specifies a URL to send a postback to when the course has finished uploading.

Returns:



160
161
162
163
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 160

def create_fetch_and_import_course_job(course_id, import_request, opts = {})
  data, _status_code, _headers = create_fetch_and_import_course_job_with_http_info(course_id, import_request, opts)
  data
end

#create_fetch_and_import_course_job_with_http_info(course_id, import_request, opts = {}) ⇒ Array<(StringResultSchema, Fixnum, Hash)>

Create a Course from a package fetched from an external source Creates a course from a package fetched and imported from the provided url. The package will be downloaded from the url and stored in SCORM Cloud. An import job ID will be returned, which can be used with GetImportJobStatus to view the status of the import. Courses represent the learning material a learner will progress through. &gt;Note: &gt;The import job ID used for calls to GetImportJobStatus are only valid for one week after the course import finishes.

Parameters:

  • course_id

    A unique identifier your application will use to identify the course after import. Your application is responsible both for generating this unique ID and for keeping track of the ID for later use.

  • import_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :may_create_new_version (BOOLEAN)

    Is it OK to create a new version of this course? If this is set to false and the course already exists, the upload will fail. If true and the course already exists then a new version will be created. No effect if the course doesn&#39;t already exist.

  • :postback_url (String)

    An optional parameter that specifies a URL to send a postback to when the course has finished uploading.

Returns:

  • (Array<(StringResultSchema, Fixnum, Hash)>)

    StringResultSchema data, response status code and response headers



173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 173

def create_fetch_and_import_course_job_with_http_info(course_id, import_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.create_fetch_and_import_course_job ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.create_fetch_and_import_course_job"
  end
  # verify the required parameter 'import_request' is set
  if import_request.nil?
    fail ArgumentError, "Missing the required parameter 'import_request' when calling CourseApi.create_fetch_and_import_course_job"
  end
  # resource path
  local_var_path = '/courses/importJobs'

  # query parameters
  query_params = {}
  query_params[:'courseId'] = course_id
  query_params[:'mayCreateNewVersion'] = opts[:'may_create_new_version'] if !opts[:'may_create_new_version'].nil?
  query_params[:'postbackUrl'] = opts[:'postback_url'] if !opts[:'postback_url'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(import_request)
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'StringResultSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#create_fetch_and_import_course_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_no_upload_and_import_course_job(course_id, import_request, opts = {}) ⇒ StringResultSchema

Create a Course from a fetched or referenced external media file Creates a course from one of the following methods: fetchRequest, mediaFileReferenceRequest, or connectorReferenceRequest. In all cases, an import job ID will be returned, which can be used with GetImportJobStatus to view the status of the import. Courses represent the learning material a learner will progress through. - A fetchRequest performs the same actions as CreateFetchAndImportCourseJob. A course will be created from a package fetched from the provided url. The package will be downloaded from the url and stored in SCORM Cloud. - A mediaFileReferenceRequest will not store the file in SCORM Cloud. Instead it will reference the media file at the time the learner needs to view the file from the provided url. - A connectorReferenceRequest is used to import content from an external content connector, for example an LTI 1.3 tool. >Note: >The import job ID used for calls to GetImportJobStatus are only valid for one week after the course import finishes. >Info: >Unless working with media files, it is typical to use one of the other two import methods. >- CreateUploadAndImportCourseJob would be used if the course is in your local file system. >- CreateFetchAndImportCourseJob would be better suited for situations where the course is uploaded remotely but is accessible via a public url.

Parameters:

  • course_id

    A unique identifier your application will use to identify the course after import. Your application is responsible both for generating this unique ID and for keeping track of the ID for later use.

  • import_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :may_create_new_version (BOOLEAN)

    Is it OK to create a new version of this course? If this is set to false and the course already exists, the upload will fail. If true and the course already exists then a new version will be created. No effect if the course doesn&#39;t already exist. (default to false)

  • :postback_url (String)

    An optional parameter that specifies a URL to send a postback to when the course has finished uploading.

Returns:



228
229
230
231
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 228

def create_no_upload_and_import_course_job(course_id, import_request, opts = {})
  data, _status_code, _headers = create_no_upload_and_import_course_job_with_http_info(course_id, import_request, opts)
  data
end

#create_no_upload_and_import_course_job_with_http_info(course_id, import_request, opts = {}) ⇒ Array<(StringResultSchema, Fixnum, Hash)>

Create a Course from a fetched or referenced external media file Creates a course from one of the following methods: fetchRequest, mediaFileReferenceRequest, or connectorReferenceRequest. In all cases, an import job ID will be returned, which can be used with GetImportJobStatus to view the status of the import. Courses represent the learning material a learner will progress through. - A fetchRequest performs the same actions as CreateFetchAndImportCourseJob. A course will be created from a package fetched from the provided url. The package will be downloaded from the url and stored in SCORM Cloud. - A mediaFileReferenceRequest will not store the file in SCORM Cloud. Instead it will reference the media file at the time the learner needs to view the file from the provided url. - A connectorReferenceRequest is used to import content from an external content connector, for example an LTI 1.3 tool. &gt;Note: &gt;The import job ID used for calls to GetImportJobStatus are only valid for one week after the course import finishes. &gt;Info: &gt;Unless working with media files, it is typical to use one of the other two import methods. &gt;- CreateUploadAndImportCourseJob would be used if the course is in your local file system. &gt;- CreateFetchAndImportCourseJob would be better suited for situations where the course is uploaded remotely but is accessible via a public url.

Parameters:

  • course_id

    A unique identifier your application will use to identify the course after import. Your application is responsible both for generating this unique ID and for keeping track of the ID for later use.

  • import_request
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :may_create_new_version (BOOLEAN)

    Is it OK to create a new version of this course? If this is set to false and the course already exists, the upload will fail. If true and the course already exists then a new version will be created. No effect if the course doesn&#39;t already exist.

  • :postback_url (String)

    An optional parameter that specifies a URL to send a postback to when the course has finished uploading.

Returns:

  • (Array<(StringResultSchema, Fixnum, Hash)>)

    StringResultSchema data, response status code and response headers



241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 241

def create_no_upload_and_import_course_job_with_http_info(course_id, import_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.create_no_upload_and_import_course_job ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.create_no_upload_and_import_course_job"
  end
  # verify the required parameter 'import_request' is set
  if import_request.nil?
    fail ArgumentError, "Missing the required parameter 'import_request' when calling CourseApi.create_no_upload_and_import_course_job"
  end
  # resource path
  local_var_path = '/courses/importJobs/noUpload'

  # query parameters
  query_params = {}
  query_params[:'courseId'] = course_id
  query_params[:'mayCreateNewVersion'] = opts[:'may_create_new_version'] if !opts[:'may_create_new_version'].nil?
  query_params[:'postbackUrl'] = opts[:'postback_url'] if !opts[:'postback_url'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(import_request)
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'StringResultSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#create_no_upload_and_import_course_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_upload_and_import_course_job(course_id, opts = {}) ⇒ StringResultSchema

Create a Course from an uploaded package Creates a course from a package uploaded from your file system. The package will be sent as part of the request and will be stored in SCORM Cloud. An import job ID will be returned, which can be used with GetImportJobStatus to view the status of the import. Courses represent the learning material a learner will progress through. >Note: >The import job ID used for calls to GetImportJobStatus are only valid for one week after the course import finishes.

Parameters:

  • course_id

    A unique identifier your application will use to identify the course after import. Your application is responsible both for generating this unique ID and for keeping track of the ID for later use.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :may_create_new_version (BOOLEAN)

    Is it OK to create a new version of this course? If this is set to false and the course already exists, the upload will fail. If true and the course already exists then a new version will be created. No effect if the course doesn&#39;t already exist. (default to false)

  • :postback_url (String)

    An optional parameter that specifies a URL to send a postback to when the course has finished uploading.

  • :uploaded_content_type (String)

    The MIME type identifier for the content to be uploaded. This is required if uploading a media file (.pdf, .mp3, or .mp4). (default to application/zip)

  • :content_metadata (String)

    Serialized &#39;mediaFileMetadata&#39; schema.

  • :file (File)

    The zip file of the course contents to import.

Returns:



298
299
300
301
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 298

def create_upload_and_import_course_job(course_id, opts = {})
  data, _status_code, _headers = create_upload_and_import_course_job_with_http_info(course_id, opts)
  data
end

#create_upload_and_import_course_job_with_http_info(course_id, opts = {}) ⇒ Array<(StringResultSchema, Fixnum, Hash)>

Create a Course from an uploaded package Creates a course from a package uploaded from your file system. The package will be sent as part of the request and will be stored in SCORM Cloud. An import job ID will be returned, which can be used with GetImportJobStatus to view the status of the import. Courses represent the learning material a learner will progress through. &gt;Note: &gt;The import job ID used for calls to GetImportJobStatus are only valid for one week after the course import finishes.

Parameters:

  • course_id

    A unique identifier your application will use to identify the course after import. Your application is responsible both for generating this unique ID and for keeping track of the ID for later use.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :may_create_new_version (BOOLEAN)

    Is it OK to create a new version of this course? If this is set to false and the course already exists, the upload will fail. If true and the course already exists then a new version will be created. No effect if the course doesn&#39;t already exist.

  • :postback_url (String)

    An optional parameter that specifies a URL to send a postback to when the course has finished uploading.

  • :uploaded_content_type (String)

    The MIME type identifier for the content to be uploaded. This is required if uploading a media file (.pdf, .mp3, or .mp4).

  • :content_metadata (String)

    Serialized &#39;mediaFileMetadata&#39; schema.

  • :file (File)

    The zip file of the course contents to import.

Returns:

  • (Array<(StringResultSchema, Fixnum, Hash)>)

    StringResultSchema data, response status code and response headers



313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 313

def create_upload_and_import_course_job_with_http_info(course_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.create_upload_and_import_course_job ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.create_upload_and_import_course_job"
  end
  # resource path
  local_var_path = '/courses/importJobs/upload'

  # query parameters
  query_params = {}
  query_params[:'courseId'] = course_id
  query_params[:'mayCreateNewVersion'] = opts[:'may_create_new_version'] if !opts[:'may_create_new_version'].nil?
  query_params[:'postbackUrl'] = opts[:'postback_url'] if !opts[:'postback_url'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'uploadedContentType'] = opts[:'uploaded_content_type'] if !opts[:'uploaded_content_type'].nil?

  # form parameters
  form_params = {}
  form_params['contentMetadata'] = opts[:'content_metadata'] if !opts[:'content_metadata'].nil?
  form_params['file'] = opts[:'file'] if !opts[:'file'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'StringResultSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#create_upload_and_import_course_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_course(course_id, opts = {}) ⇒ nil

Delete a Course Deletes the specified course. >Caution: >When a course is deleted, so is everything connected to the course. This includes: >- Registrations >- Invitations >- Dispatches >- Debug Logs

Parameters:

  • course_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


364
365
366
367
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 364

def delete_course(course_id, opts = {})
  delete_course_with_http_info(course_id, opts)
  nil
end

#delete_course_asset(course_id, relative_path, opts = {}) ⇒ nil

Delete an asset file from a Course Deletes the asset file at the specified relative path from the latest version of the course. GetCourseFileList can be used to find the relative path of the file. >Caution: >This may have unintended consequences if the asset is still being linked to in other files in the course. Make sure that other files relying on this asset are modified or removed as well. This can be done with the ImportCourseAssetFile or UploadCourseAssetFile endpoints.

Parameters:

  • course_id
  • relative_path

    Relative path of the asset within the course.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


419
420
421
422
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 419

def delete_course_asset(course_id, relative_path, opts = {})
  delete_course_asset_with_http_info(course_id, relative_path, opts)
  nil
end

#delete_course_asset_with_http_info(course_id, relative_path, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete an asset file from a Course Deletes the asset file at the specified relative path from the latest version of the course. GetCourseFileList can be used to find the relative path of the file. &gt;Caution: &gt;This may have unintended consequences if the asset is still being linked to in other files in the course. Make sure that other files relying on this asset are modified or removed as well. This can be done with the ImportCourseAssetFile or UploadCourseAssetFile endpoints.

Parameters:

  • course_id
  • relative_path

    Relative path of the asset within the course.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 430

def delete_course_asset_with_http_info(course_id, relative_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.delete_course_asset ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.delete_course_asset"
  end
  # verify the required parameter 'relative_path' is set
  if relative_path.nil?
    fail ArgumentError, "Missing the required parameter 'relative_path' when calling CourseApi.delete_course_asset"
  end
  # resource path
  local_var_path = '/courses/{courseId}/asset'.sub('{' + 'courseId' + '}', course_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'relativePath'] = relative_path

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#delete_course_asset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_course_configuration_setting(course_id, setting_id, opts = {}) ⇒ nil

Delete a configuration setting explicitly set for a Course Clears the specified setting from the course. This causes the setting to inherit a value from a higher level (e.g. application). If the configuration setting was not set at the course level it will continue to persist and will require deletion from the level it was set.

Parameters:

  • course_id
  • setting_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


480
481
482
483
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 480

def delete_course_configuration_setting(course_id, setting_id, opts = {})
  delete_course_configuration_setting_with_http_info(course_id, setting_id, opts)
  nil
end

#delete_course_configuration_setting_with_http_info(course_id, setting_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete a configuration setting explicitly set for a Course Clears the specified setting from the course. This causes the setting to inherit a value from a higher level (e.g. application). If the configuration setting was not set at the course level it will continue to persist and will require deletion from the level it was set.

Parameters:

  • course_id
  • setting_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 491

def delete_course_configuration_setting_with_http_info(course_id, setting_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.delete_course_configuration_setting ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.delete_course_configuration_setting"
  end
  # verify the required parameter 'setting_id' is set
  if setting_id.nil?
    fail ArgumentError, "Missing the required parameter 'setting_id' when calling CourseApi.delete_course_configuration_setting"
  end
  # resource path
  local_var_path = '/courses/{courseId}/configuration/{settingId}'.sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'settingId' + '}', setting_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#delete_course_configuration_setting\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_course_tags(course_id, tags, opts = {}) ⇒ nil

Delete tags from a Course Deletes the specified tags from the course. Deleting tags that do not exist will still result in a success.

Parameters:

  • course_id
  • tags
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


540
541
542
543
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 540

def delete_course_tags(course_id, tags, opts = {})
  delete_course_tags_with_http_info(course_id, tags, opts)
  nil
end

#delete_course_tags_with_http_info(course_id, tags, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete tags from a Course Deletes the specified tags from the course. Deleting tags that do not exist will still result in a success.

Parameters:

  • course_id
  • tags
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 551

def delete_course_tags_with_http_info(course_id, tags, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.delete_course_tags ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.delete_course_tags"
  end
  # verify the required parameter 'tags' is set
  if tags.nil?
    fail ArgumentError, "Missing the required parameter 'tags' when calling CourseApi.delete_course_tags"
  end
  # resource path
  local_var_path = '/courses/{courseId}/tags'.sub('{' + 'courseId' + '}', course_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(tags)
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#delete_course_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_course_version(course_id, version_id, opts = {}) ⇒ nil

Delete a Course Version Deletes the specified version of the course. If deleting the last remaining version of the course, the course itself will be deleted and no longer accessible. >Caution: >When a course is deleted, so is everything connected to this course. This includes: >- Registrations >- Invitations >- Dispatches >- Debug Logs

Parameters:

  • course_id
  • version_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


600
601
602
603
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 600

def delete_course_version(course_id, version_id, opts = {})
  delete_course_version_with_http_info(course_id, version_id, opts)
  nil
end

#delete_course_version_asset(course_id, version_id, relative_path, opts = {}) ⇒ nil

Delete an asset file from a Course Version Deletes the asset file at the specified relative path from the course version. GetCourseVersionFileList can be used to find the relative path of the file. >Caution: >This may have unintended consequences if the asset is still being linked to in other files in the course. Make sure that other files relying on this asset are modified or removed as well. This can be done with the ImportCourseVersionAssetFile or UploadCourseVersionAssetFile endpoints.

Parameters:

  • course_id
  • version_id
  • relative_path

    Relative path of the asset within the course.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


661
662
663
664
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 661

def delete_course_version_asset(course_id, version_id, relative_path, opts = {})
  delete_course_version_asset_with_http_info(course_id, version_id, relative_path, opts)
  nil
end

#delete_course_version_asset_with_http_info(course_id, version_id, relative_path, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete an asset file from a Course Version Deletes the asset file at the specified relative path from the course version. GetCourseVersionFileList can be used to find the relative path of the file. &gt;Caution: &gt;This may have unintended consequences if the asset is still being linked to in other files in the course. Make sure that other files relying on this asset are modified or removed as well. This can be done with the ImportCourseVersionAssetFile or UploadCourseVersionAssetFile endpoints.

Parameters:

  • course_id
  • version_id
  • relative_path

    Relative path of the asset within the course.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 673

def delete_course_version_asset_with_http_info(course_id, version_id, relative_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.delete_course_version_asset ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.delete_course_version_asset"
  end
  # verify the required parameter 'version_id' is set
  if version_id.nil?
    fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.delete_course_version_asset"
  end
  # verify the required parameter 'relative_path' is set
  if relative_path.nil?
    fail ArgumentError, "Missing the required parameter 'relative_path' when calling CourseApi.delete_course_version_asset"
  end
  # resource path
  local_var_path = '/courses/{courseId}/versions/{versionId}/asset'.sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'relativePath'] = relative_path

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#delete_course_version_asset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_course_version_configuration_setting(course_id, version_id, setting_id, opts = {}) ⇒ nil

Delete a configuration setting explicitly set for a Course Version Clears the specified setting from the course version. This causes the setting to inherit a value from a higher level (e.g. application). If the configuration setting was not set at the course level it will continue to persist and will require deletion from the level it was set.

Parameters:

  • course_id
  • version_id
  • setting_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


728
729
730
731
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 728

def delete_course_version_configuration_setting(course_id, version_id, setting_id, opts = {})
  delete_course_version_configuration_setting_with_http_info(course_id, version_id, setting_id, opts)
  nil
end

#delete_course_version_configuration_setting_with_http_info(course_id, version_id, setting_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete a configuration setting explicitly set for a Course Version Clears the specified setting from the course version. This causes the setting to inherit a value from a higher level (e.g. application). If the configuration setting was not set at the course level it will continue to persist and will require deletion from the level it was set.

Parameters:

  • course_id
  • version_id
  • setting_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 740

def delete_course_version_configuration_setting_with_http_info(course_id, version_id, setting_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.delete_course_version_configuration_setting ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.delete_course_version_configuration_setting"
  end
  # verify the required parameter 'version_id' is set
  if version_id.nil?
    fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.delete_course_version_configuration_setting"
  end
  # verify the required parameter 'setting_id' is set
  if setting_id.nil?
    fail ArgumentError, "Missing the required parameter 'setting_id' when calling CourseApi.delete_course_version_configuration_setting"
  end
  # resource path
  local_var_path = '/courses/{courseId}/versions/{versionId}/configuration/{settingId}'.sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s).sub('{' + 'settingId' + '}', setting_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#delete_course_version_configuration_setting\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_course_version_with_http_info(course_id, version_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete a Course Version Deletes the specified version of the course. If deleting the last remaining version of the course, the course itself will be deleted and no longer accessible. &gt;Caution: &gt;When a course is deleted, so is everything connected to this course. This includes: &gt;- Registrations &gt;- Invitations &gt;- Dispatches &gt;- Debug Logs

Parameters:

  • course_id
  • version_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 611

def delete_course_version_with_http_info(course_id, version_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.delete_course_version ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.delete_course_version"
  end
  # verify the required parameter 'version_id' is set
  if version_id.nil?
    fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.delete_course_version"
  end
  # resource path
  local_var_path = '/courses/{courseId}/versions/{versionId}'.sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#delete_course_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_course_with_http_info(course_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete a Course Deletes the specified course. &gt;Caution: &gt;When a course is deleted, so is everything connected to the course. This includes: &gt;- Registrations &gt;- Invitations &gt;- Dispatches &gt;- Debug Logs

Parameters:

  • course_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 374

def delete_course_with_http_info(course_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.delete_course ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.delete_course"
  end
  # resource path
  local_var_path = '/courses/{courseId}'.sub('{' + 'courseId' + '}', course_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#delete_course\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_course(course_id, opts = {}) ⇒ CourseSchema

Get detailed information about a Course Returns detailed information about the course. This includes title, update date, learning standard, and version.

Parameters:

  • course_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_registration_count (BOOLEAN)

    Include the registration count in the results (default to false)

  • :include_course_metadata (BOOLEAN)

    Include course metadata in the results. If the course has no metadata, adding this parameter has no effect. (default to false)

Returns:



794
795
796
797
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 794

def get_course(course_id, opts = {})
  data, _status_code, _headers = get_course_with_http_info(course_id, opts)
  data
end

#get_course_asset(course_id, relative_path, opts = {}) ⇒ File

Download an asset file from a Course Downloads the asset file at the specified relative path from the latest version of the course. GetCourseFileList can be used to find the relative path of the file.

Parameters:

  • course_id
  • relative_path

    Relative path of the asset within the course.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (File)


854
855
856
857
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 854

def get_course_asset(course_id, relative_path, opts = {})
  data, _status_code, _headers = get_course_asset_with_http_info(course_id, relative_path, opts)
  data
end

#get_course_asset_with_http_info(course_id, relative_path, opts = {}) ⇒ Array<(File, Fixnum, Hash)>

Download an asset file from a Course Downloads the asset file at the specified relative path from the latest version of the course. GetCourseFileList can be used to find the relative path of the file.

Parameters:

  • course_id
  • relative_path

    Relative path of the asset within the course.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(File, Fixnum, Hash)>)

    File data, response status code and response headers



865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 865

def get_course_asset_with_http_info(course_id, relative_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.get_course_asset ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_asset"
  end
  # verify the required parameter 'relative_path' is set
  if relative_path.nil?
    fail ArgumentError, "Missing the required parameter 'relative_path' when calling CourseApi.get_course_asset"
  end
  # resource path
  local_var_path = '/courses/{courseId}/asset'.sub('{' + 'courseId' + '}', course_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'relativePath'] = relative_path

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#get_course_asset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_course_configuration(course_id, opts = {}) ⇒ SettingListSchema

Get effective configuration settings for a Course Returns the effective configuration settings for the course. If not set at the course level, the setting will inherit a value from a higher level (e.g. application). If there is a configuration setting present at a more specific level, that setting will override the one set at the course level.

Parameters:

  • course_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_metadata (BOOLEAN) — default: default to false

Returns:



916
917
918
919
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 916

def get_course_configuration(course_id, opts = {})
  data, _status_code, _headers = get_course_configuration_with_http_info(course_id, opts)
  data
end

#get_course_configuration_with_http_info(course_id, opts = {}) ⇒ Array<(SettingListSchema, Fixnum, Hash)>

Get effective configuration settings for a Course Returns the effective configuration settings for the course. If not set at the course level, the setting will inherit a value from a higher level (e.g. application). If there is a configuration setting present at a more specific level, that setting will override the one set at the course level.

Parameters:

  • course_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_metadata (BOOLEAN)

Returns:

  • (Array<(SettingListSchema, Fixnum, Hash)>)

    SettingListSchema data, response status code and response headers



927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 927

def get_course_configuration_with_http_info(course_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.get_course_configuration ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_configuration"
  end
  # resource path
  local_var_path = '/courses/{courseId}/configuration'.sub('{' + 'courseId' + '}', course_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'includeMetadata'] = opts[:'include_metadata'] if !opts[:'include_metadata'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SettingListSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#get_course_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_course_file_list(course_id, opts = {}) ⇒ FileListSchema

Get a list of asset files in a Course Returns a list of asset files in the course. Included will be the relative path to use for the other course asset manipulation calls.

Parameters:

  • course_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



973
974
975
976
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 973

def get_course_file_list(course_id, opts = {})
  data, _status_code, _headers = get_course_file_list_with_http_info(course_id, opts)
  data
end

#get_course_file_list_with_http_info(course_id, opts = {}) ⇒ Array<(FileListSchema, Fixnum, Hash)>

Get a list of asset files in a Course Returns a list of asset files in the course. Included will be the relative path to use for the other course asset manipulation calls.

Parameters:

  • course_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(FileListSchema, Fixnum, Hash)>)

    FileListSchema data, response status code and response headers



983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 983

def get_course_file_list_with_http_info(course_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.get_course_file_list ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_file_list"
  end
  # resource path
  local_var_path = '/courses/{courseId}/asset/list'.sub('{' + 'courseId' + '}', course_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FileListSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#get_course_file_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_course_statements(course_id, opts = {}) ⇒ XapiStatementResult

Get xAPI statements for a Course Returns xAPI statements for the course.

Parameters:

  • course_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :learner_id (String)

    Only entries for the specified learner id will be included.

  • :since (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :_until (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :more (String)

    Pagination token returned as &#x60;more&#x60; property of multi page list requests

Returns:



1032
1033
1034
1035
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1032

def get_course_statements(course_id, opts = {})
  data, _status_code, _headers = get_course_statements_with_http_info(course_id, opts)
  data
end

#get_course_statements_with_http_info(course_id, opts = {}) ⇒ Array<(XapiStatementResult, Fixnum, Hash)>

Get xAPI statements for a Course Returns xAPI statements for the course.

Parameters:

  • course_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :learner_id (String)

    Only entries for the specified learner id will be included.

  • :since (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :_until (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :more (String)

    Pagination token returned as &#x60;more&#x60; property of multi page list requests

Returns:

  • (Array<(XapiStatementResult, Fixnum, Hash)>)

    XapiStatementResult data, response status code and response headers



1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1046

def get_course_statements_with_http_info(course_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.get_course_statements ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_statements"
  end
  # resource path
  local_var_path = '/courses/{courseId}/xAPIStatements'.sub('{' + 'courseId' + '}', course_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'learnerId'] = opts[:'learner_id'] if !opts[:'learner_id'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil?
  query_params[:'more'] = opts[:'more'] if !opts[:'more'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'XapiStatementResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#get_course_statements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_course_tags(course_id, opts = {}) ⇒ TagListSchema

Get tags for a Course Returns the tags for the course.

Parameters:

  • course_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1095
1096
1097
1098
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1095

def get_course_tags(course_id, opts = {})
  data, _status_code, _headers = get_course_tags_with_http_info(course_id, opts)
  data
end

#get_course_tags_with_http_info(course_id, opts = {}) ⇒ Array<(TagListSchema, Fixnum, Hash)>

Get tags for a Course Returns the tags for the course.

Parameters:

  • course_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(TagListSchema, Fixnum, Hash)>)

    TagListSchema data, response status code and response headers



1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1105

def get_course_tags_with_http_info(course_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.get_course_tags ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_tags"
  end
  # resource path
  local_var_path = '/courses/{courseId}/tags'.sub('{' + 'courseId' + '}', course_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TagListSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#get_course_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_course_version_asset(course_id, version_id, relative_path, opts = {}) ⇒ File

Download an asset file from a specific Course Version Downloads the asset file at the provided relative path from the course version. GetCourseVersionFileList can be used to find the relative path of the file.

Parameters:

  • course_id
  • version_id
  • relative_path

    Relative path of the asset within the course.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (File)


1152
1153
1154
1155
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1152

def get_course_version_asset(course_id, version_id, relative_path, opts = {})
  data, _status_code, _headers = get_course_version_asset_with_http_info(course_id, version_id, relative_path, opts)
  data
end

#get_course_version_asset_with_http_info(course_id, version_id, relative_path, opts = {}) ⇒ Array<(File, Fixnum, Hash)>

Download an asset file from a specific Course Version Downloads the asset file at the provided relative path from the course version. GetCourseVersionFileList can be used to find the relative path of the file.

Parameters:

  • course_id
  • version_id
  • relative_path

    Relative path of the asset within the course.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(File, Fixnum, Hash)>)

    File data, response status code and response headers



1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1164

def get_course_version_asset_with_http_info(course_id, version_id, relative_path, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.get_course_version_asset ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_version_asset"
  end
  # verify the required parameter 'version_id' is set
  if version_id.nil?
    fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.get_course_version_asset"
  end
  # verify the required parameter 'relative_path' is set
  if relative_path.nil?
    fail ArgumentError, "Missing the required parameter 'relative_path' when calling CourseApi.get_course_version_asset"
  end
  # resource path
  local_var_path = '/courses/{courseId}/versions/{versionId}/asset'.sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'relativePath'] = relative_path

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#get_course_version_asset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_course_version_configuration(course_id, version_id, opts = {}) ⇒ SettingListSchema

Get effective configuration settings for a Course Version Returns the effective configuration settings for the course version. If not set at the course level, the setting will inherit a value from a higher level (e.g. application). If there is a configuration setting present at a more specific level, that setting will override the one set at the course level.

Parameters:

  • course_id
  • version_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_metadata (BOOLEAN) — default: default to false

Returns:



1220
1221
1222
1223
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1220

def get_course_version_configuration(course_id, version_id, opts = {})
  data, _status_code, _headers = get_course_version_configuration_with_http_info(course_id, version_id, opts)
  data
end

#get_course_version_configuration_with_http_info(course_id, version_id, opts = {}) ⇒ Array<(SettingListSchema, Fixnum, Hash)>

Get effective configuration settings for a Course Version Returns the effective configuration settings for the course version. If not set at the course level, the setting will inherit a value from a higher level (e.g. application). If there is a configuration setting present at a more specific level, that setting will override the one set at the course level.

Parameters:

  • course_id
  • version_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_metadata (BOOLEAN)

Returns:

  • (Array<(SettingListSchema, Fixnum, Hash)>)

    SettingListSchema data, response status code and response headers



1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1232

def get_course_version_configuration_with_http_info(course_id, version_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.get_course_version_configuration ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_version_configuration"
  end
  # verify the required parameter 'version_id' is set
  if version_id.nil?
    fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.get_course_version_configuration"
  end
  # resource path
  local_var_path = '/courses/{courseId}/versions/{versionId}/configuration'.sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'includeMetadata'] = opts[:'include_metadata'] if !opts[:'include_metadata'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SettingListSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#get_course_version_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_course_version_file_list(course_id, version_id, opts = {}) ⇒ FileListSchema

Get a list of asset files in a Course Version Returns a list of asset files in the course version. Included will be the relative path to use for the other course asset manipulation calls.

Parameters:

  • course_id
  • version_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1283
1284
1285
1286
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1283

def get_course_version_file_list(course_id, version_id, opts = {})
  data, _status_code, _headers = get_course_version_file_list_with_http_info(course_id, version_id, opts)
  data
end

#get_course_version_file_list_with_http_info(course_id, version_id, opts = {}) ⇒ Array<(FileListSchema, Fixnum, Hash)>

Get a list of asset files in a Course Version Returns a list of asset files in the course version. Included will be the relative path to use for the other course asset manipulation calls.

Parameters:

  • course_id
  • version_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(FileListSchema, Fixnum, Hash)>)

    FileListSchema data, response status code and response headers



1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1294

def get_course_version_file_list_with_http_info(course_id, version_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.get_course_version_file_list ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_version_file_list"
  end
  # verify the required parameter 'version_id' is set
  if version_id.nil?
    fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.get_course_version_file_list"
  end
  # resource path
  local_var_path = '/courses/{courseId}/versions/{versionId}/asset/list'.sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FileListSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#get_course_version_file_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_course_version_info(course_id, version_id, opts = {}) ⇒ CourseSchema

Get detailed information about a Course Version Returns detailed information about the course version. This includes update date and registration count (if optional value is passed in).

Parameters:

  • course_id
  • version_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_registration_count (BOOLEAN)

    Include the registration count in the results (default to false)

  • :include_course_metadata (BOOLEAN)

    Include course metadata in the results. If the course has no metadata, adding this parameter has no effect. (default to false)

Returns:



1346
1347
1348
1349
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1346

def get_course_version_info(course_id, version_id, opts = {})
  data, _status_code, _headers = get_course_version_info_with_http_info(course_id, version_id, opts)
  data
end

#get_course_version_info_with_http_info(course_id, version_id, opts = {}) ⇒ Array<(CourseSchema, Fixnum, Hash)>

Get detailed information about a Course Version Returns detailed information about the course version. This includes update date and registration count (if optional value is passed in).

Parameters:

  • course_id
  • version_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_registration_count (BOOLEAN)

    Include the registration count in the results

  • :include_course_metadata (BOOLEAN)

    Include course metadata in the results. If the course has no metadata, adding this parameter has no effect.

Returns:

  • (Array<(CourseSchema, Fixnum, Hash)>)

    CourseSchema data, response status code and response headers



1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1359

def get_course_version_info_with_http_info(course_id, version_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.get_course_version_info ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_version_info"
  end
  # verify the required parameter 'version_id' is set
  if version_id.nil?
    fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.get_course_version_info"
  end
  # resource path
  local_var_path = '/courses/{courseId}/versions/{versionId}'.sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'includeRegistrationCount'] = opts[:'include_registration_count'] if !opts[:'include_registration_count'].nil?
  query_params[:'includeCourseMetadata'] = opts[:'include_course_metadata'] if !opts[:'include_course_metadata'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CourseSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#get_course_version_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_course_version_statements(course_id, version_id, opts = {}) ⇒ XapiStatementResult

Get xAPI statements for a Course Version Returns xAPI statements for the course version.

Parameters:

  • course_id
  • version_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :learner_id (String)

    Only entries for the specified learner id will be included.

  • :since (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :_until (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :more (String)

    Pagination token returned as &#x60;more&#x60; property of multi page list requests

Returns:



1415
1416
1417
1418
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1415

def get_course_version_statements(course_id, version_id, opts = {})
  data, _status_code, _headers = get_course_version_statements_with_http_info(course_id, version_id, opts)
  data
end

#get_course_version_statements_with_http_info(course_id, version_id, opts = {}) ⇒ Array<(XapiStatementResult, Fixnum, Hash)>

Get xAPI statements for a Course Version Returns xAPI statements for the course version.

Parameters:

  • course_id
  • version_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :learner_id (String)

    Only entries for the specified learner id will be included.

  • :since (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :_until (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :more (String)

    Pagination token returned as &#x60;more&#x60; property of multi page list requests

Returns:

  • (Array<(XapiStatementResult, Fixnum, Hash)>)

    XapiStatementResult data, response status code and response headers



1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1430

def get_course_version_statements_with_http_info(course_id, version_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.get_course_version_statements ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_version_statements"
  end
  # verify the required parameter 'version_id' is set
  if version_id.nil?
    fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.get_course_version_statements"
  end
  # resource path
  local_var_path = '/courses/{courseId}/versions/{versionId}/xAPIStatements'.sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'learnerId'] = opts[:'learner_id'] if !opts[:'learner_id'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil?
  query_params[:'more'] = opts[:'more'] if !opts[:'more'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'XapiStatementResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#get_course_version_statements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_course_versions(course_id, opts = {}) ⇒ CourseListNonPagedSchema

Get a list of a Course’s Versions Returns information about all versions of the course. This can be useful to see information such as registration counts and modification times across the versions of a course.

Parameters:

  • course_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :since (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :_until (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :include_registration_count (BOOLEAN)

    Include the registration count in the results (default to false)

  • :include_course_metadata (BOOLEAN)

    Include course metadata in the results. If the course has no metadata, adding this parameter has no effect. (default to false)

Returns:



1487
1488
1489
1490
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1487

def get_course_versions(course_id, opts = {})
  data, _status_code, _headers = get_course_versions_with_http_info(course_id, opts)
  data
end

#get_course_versions_with_http_info(course_id, opts = {}) ⇒ Array<(CourseListNonPagedSchema, Fixnum, Hash)>

Get a list of a Course&#39;s Versions Returns information about all versions of the course. This can be useful to see information such as registration counts and modification times across the versions of a course.

Parameters:

  • course_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :since (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :_until (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :include_registration_count (BOOLEAN)

    Include the registration count in the results

  • :include_course_metadata (BOOLEAN)

    Include course metadata in the results. If the course has no metadata, adding this parameter has no effect.

Returns:

  • (Array<(CourseListNonPagedSchema, Fixnum, Hash)>)

    CourseListNonPagedSchema data, response status code and response headers



1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1501

def get_course_versions_with_http_info(course_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.get_course_versions ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_versions"
  end
  # resource path
  local_var_path = '/courses/{courseId}/versions'.sub('{' + 'courseId' + '}', course_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil?
  query_params[:'includeRegistrationCount'] = opts[:'include_registration_count'] if !opts[:'include_registration_count'].nil?
  query_params[:'includeCourseMetadata'] = opts[:'include_course_metadata'] if !opts[:'include_course_metadata'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CourseListNonPagedSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#get_course_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_course_with_http_info(course_id, opts = {}) ⇒ Array<(CourseSchema, Fixnum, Hash)>

Get detailed information about a Course Returns detailed information about the course. This includes title, update date, learning standard, and version.

Parameters:

  • course_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_registration_count (BOOLEAN)

    Include the registration count in the results

  • :include_course_metadata (BOOLEAN)

    Include course metadata in the results. If the course has no metadata, adding this parameter has no effect.

Returns:

  • (Array<(CourseSchema, Fixnum, Hash)>)

    CourseSchema data, response status code and response headers



806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 806

def get_course_with_http_info(course_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.get_course ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course"
  end
  # resource path
  local_var_path = '/courses/{courseId}'.sub('{' + 'courseId' + '}', course_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'includeRegistrationCount'] = opts[:'include_registration_count'] if !opts[:'include_registration_count'].nil?
  query_params[:'includeCourseMetadata'] = opts[:'include_course_metadata'] if !opts[:'include_course_metadata'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CourseSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#get_course\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_course_zip(course_id, opts = {}) ⇒ File

Download a zip package for a Course Downloads a zip package for the course. The course zip package contains all of the files (assets) needed for a learner to take the course. The returned zip will contain all of the files orginally uploaded with the course, as well as any modifications made through updating/ adding new assets. >Info: >If looking to retrieve a specific file from a course, use ‘GetCourseAsset` instead.

Parameters:

  • course_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (File)


1550
1551
1552
1553
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1550

def get_course_zip(course_id, opts = {})
  data, _status_code, _headers = get_course_zip_with_http_info(course_id, opts)
  data
end

#get_course_zip_with_http_info(course_id, opts = {}) ⇒ Array<(File, Fixnum, Hash)>

Download a zip package for a Course Downloads a zip package for the course. The course zip package contains all of the files (assets) needed for a learner to take the course. The returned zip will contain all of the files orginally uploaded with the course, as well as any modifications made through updating/ adding new assets. &gt;Info: &gt;If looking to retrieve a specific file from a course, use &#x60;GetCourseAsset&#x60; instead.

Parameters:

  • course_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(File, Fixnum, Hash)>)

    File data, response status code and response headers



1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1560

def get_course_zip_with_http_info(course_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.get_course_zip ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_course_zip"
  end
  # resource path
  local_var_path = '/courses/{courseId}/zip'.sub('{' + 'courseId' + '}', course_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#get_course_zip\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_courses(opts = {}) ⇒ CourseListSchema

Get a list of Courses Returns a list of courses. Can be filtered using the request parameters to provide a subset of results. >Note: >This request is paginated and will only provide a limited amount of resources at a time. If there are more results to be collected, a ‘more` token provided with the response which can be passed to get the next page of results. When passing this token, no other filter parameters can be sent as part of the request. The resources will continue to respect the filters passed in by the original request.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :since (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :_until (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :datetime_filter (String)

    Specifies field that &#x60;since&#x60; and &#x60;until&#x60; parameters are applied against (default to updated)

  • :tags (Array<String>)

    Filter items matching any tag provided (not all)

  • :filter (String)

    Optional string which filters results by a specified field (described by filterBy).

  • :filter_by (String)

    Optional enum parameter for specifying the field on which to run the filter. (default to course_id)

  • :order_by (String)

    Optional enum parameter for specifying the field and order by which to sort the results. (default to created_desc)

  • :more (String)

    Pagination token returned as &#x60;more&#x60; property of multi page list requests

  • :include_course_metadata (BOOLEAN)

    Include course metadata in the results. If the course has no metadata, adding this parameter has no effect. (default to false)

  • :include_registration_count (BOOLEAN)

    Include the registration count in the results (default to false)

  • :include_total_count (BOOLEAN)

    Include the total count of results matching the provided filters as a header on the initial request. The header will not be present on subsequent requests resulting from passing the &#x60;more&#x60; token. (default to false)

Returns:



1615
1616
1617
1618
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1615

def get_courses(opts = {})
  data, _status_code, _headers = get_courses_with_http_info(opts)
  data
end

#get_courses_with_http_info(opts = {}) ⇒ Array<(CourseListSchema, Fixnum, Hash)>

Get a list of Courses Returns a list of courses. Can be filtered using the request parameters to provide a subset of results. &gt;Note: &gt;This request is paginated and will only provide a limited amount of resources at a time. If there are more results to be collected, a &#x60;more&#x60; token provided with the response which can be passed to get the next page of results. When passing this token, no other filter parameters can be sent as part of the request. The resources will continue to respect the filters passed in by the original request.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :since (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :_until (DateTime)

    Filter by ISO 8601 TimeStamp inclusive (defaults to UTC)

  • :datetime_filter (String)

    Specifies field that &#x60;since&#x60; and &#x60;until&#x60; parameters are applied against

  • :tags (Array<String>)

    Filter items matching any tag provided (not all)

  • :filter (String)

    Optional string which filters results by a specified field (described by filterBy).

  • :filter_by (String)

    Optional enum parameter for specifying the field on which to run the filter.

  • :order_by (String)

    Optional enum parameter for specifying the field and order by which to sort the results.

  • :more (String)

    Pagination token returned as &#x60;more&#x60; property of multi page list requests

  • :include_course_metadata (BOOLEAN)

    Include course metadata in the results. If the course has no metadata, adding this parameter has no effect.

  • :include_registration_count (BOOLEAN)

    Include the registration count in the results

  • :include_total_count (BOOLEAN)

    Include the total count of results matching the provided filters as a header on the initial request. The header will not be present on subsequent requests resulting from passing the &#x60;more&#x60; token.

Returns:

  • (Array<(CourseListSchema, Fixnum, Hash)>)

    CourseListSchema data, response status code and response headers



1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1635

def get_courses_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.get_courses ...'
  end
  # resource path
  local_var_path = '/courses'

  # query parameters
  query_params = {}
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil?
  query_params[:'datetimeFilter'] = opts[:'datetime_filter'] if !opts[:'datetime_filter'].nil?
  query_params[:'tags'] = @api_client.build_collection_param(opts[:'tags'], :csv) if !opts[:'tags'].nil?
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'filterBy'] = opts[:'filter_by'] if !opts[:'filter_by'].nil?
  query_params[:'orderBy'] = opts[:'order_by'] if !opts[:'order_by'].nil?
  query_params[:'more'] = opts[:'more'] if !opts[:'more'].nil?
  query_params[:'includeCourseMetadata'] = opts[:'include_course_metadata'] if !opts[:'include_course_metadata'].nil?
  query_params[:'includeRegistrationCount'] = opts[:'include_registration_count'] if !opts[:'include_registration_count'].nil?
  query_params[:'includeTotalCount'] = opts[:'include_total_count'] if !opts[:'include_total_count'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CourseListSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#get_courses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_import_job_status(import_job_id, opts = {}) ⇒ ImportJobResultSchema

Get import job status for a Course Check the status of a course import. This can be called incrementally to check the progress of a call to any of the import options. >Note: >The import job ID used for calls to GetImportJobStatus are only valid for one week after the course import finishes.

Parameters:

  • import_job_id

    Id received when the import job was submitted to the importJobs resource.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1687
1688
1689
1690
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1687

def get_import_job_status(import_job_id, opts = {})
  data, _status_code, _headers = get_import_job_status_with_http_info(import_job_id, opts)
  data
end

#get_import_job_status_with_http_info(import_job_id, opts = {}) ⇒ Array<(ImportJobResultSchema, Fixnum, Hash)>

Get import job status for a Course Check the status of a course import. This can be called incrementally to check the progress of a call to any of the import options. &gt;Note: &gt;The import job ID used for calls to GetImportJobStatus are only valid for one week after the course import finishes.

Parameters:

  • import_job_id

    Id received when the import job was submitted to the importJobs resource.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ImportJobResultSchema, Fixnum, Hash)>)

    ImportJobResultSchema data, response status code and response headers



1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1697

def get_import_job_status_with_http_info(import_job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.get_import_job_status ...'
  end
  # verify the required parameter 'import_job_id' is set
  if import_job_id.nil?
    fail ArgumentError, "Missing the required parameter 'import_job_id' when calling CourseApi.get_import_job_status"
  end
  # resource path
  local_var_path = '/courses/importJobs/{importJobId}'.sub('{' + 'importJobId' + '}', import_job_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ImportJobResultSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#get_import_job_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_versioned_course_zip(course_id, version_id, opts = {}) ⇒ File

Download a zip package for a Course Version Downloads a zip package for the course version. The course zip package contains all of the files (assets) needed for a learner to take the course. The returned zip will contain all of the files orginally uploaded with the course, as well as any modifications made through updating/ adding new assets. >Info: >If looking to retrieve a specific file from a course version, use ‘GetCourseVersionAsset` instead.

Parameters:

  • course_id
  • version_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (File)


1743
1744
1745
1746
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1743

def get_versioned_course_zip(course_id, version_id, opts = {})
  data, _status_code, _headers = get_versioned_course_zip_with_http_info(course_id, version_id, opts)
  data
end

#get_versioned_course_zip_with_http_info(course_id, version_id, opts = {}) ⇒ Array<(File, Fixnum, Hash)>

Download a zip package for a Course Version Downloads a zip package for the course version. The course zip package contains all of the files (assets) needed for a learner to take the course. The returned zip will contain all of the files orginally uploaded with the course, as well as any modifications made through updating/ adding new assets. &gt;Info: &gt;If looking to retrieve a specific file from a course version, use &#x60;GetCourseVersionAsset&#x60; instead.

Parameters:

  • course_id
  • version_id
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(File, Fixnum, Hash)>)

    File data, response status code and response headers



1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1754

def get_versioned_course_zip_with_http_info(course_id, version_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.get_versioned_course_zip ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.get_versioned_course_zip"
  end
  # verify the required parameter 'version_id' is set
  if version_id.nil?
    fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.get_versioned_course_zip"
  end
  # resource path
  local_var_path = '/courses/{courseId}/versions/{versionId}/zip'.sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#get_versioned_course_zip\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#import_course_asset_file(course_id, asset_schema, opts = {}) ⇒ AssetFileSchema

Import an asset file for a Course Creates or updates an asset file fetched from the provided url into the course. The file will be downloaded from the url and stored in SCORM Cloud. This is a useful way to modify the course structure without needing to reimport the whole course after you’ve made changes. >Info: >If the course structure is being heavily modified, consider creating a new version instead. This can be done by calling one of the course import jobs while passing true for ‘mayCreateNewVersion`.

Parameters:

  • course_id
  • asset_schema
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :update_asset_policy (String)

    Describes how SCORM Cloud should handle importing asset files with respect to overwriting files. Valid values are &#39;reject&#39;, &#39;strict&#39;, and &#39;lax&#39;. A &#39;reject&#39; policy request will fail if the asset file already exists on the system (&#39;overwriting&#39; not allowed). A &#39;strict&#39; policy request will fail if the asset file does not already exist (&#39;overwriting&#39; is required). A &#39;lax&#39; policy request will not consider whether the file already exists (i.e., it will attempt to import in all cases). (default to lax)

Returns:



1805
1806
1807
1808
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1805

def import_course_asset_file(course_id, asset_schema, opts = {})
  data, _status_code, _headers = import_course_asset_file_with_http_info(course_id, asset_schema, opts)
  data
end

#import_course_asset_file_with_http_info(course_id, asset_schema, opts = {}) ⇒ Array<(AssetFileSchema, Fixnum, Hash)>

Import an asset file for a Course Creates or updates an asset file fetched from the provided url into the course. The file will be downloaded from the url and stored in SCORM Cloud. This is a useful way to modify the course structure without needing to reimport the whole course after you&#39;ve made changes. &gt;Info: &gt;If the course structure is being heavily modified, consider creating a new version instead. This can be done by calling one of the course import jobs while passing true for &#x60;mayCreateNewVersion&#x60;.

Parameters:

  • course_id
  • asset_schema
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :update_asset_policy (String)

    Describes how SCORM Cloud should handle importing asset files with respect to overwriting files. Valid values are &#39;reject&#39;, &#39;strict&#39;, and &#39;lax&#39;. A &#39;reject&#39; policy request will fail if the asset file already exists on the system (&#39;overwriting&#39; not allowed). A &#39;strict&#39; policy request will fail if the asset file does not already exist (&#39;overwriting&#39; is required). A &#39;lax&#39; policy request will not consider whether the file already exists (i.e., it will attempt to import in all cases).

Returns:

  • (Array<(AssetFileSchema, Fixnum, Hash)>)

    AssetFileSchema data, response status code and response headers



1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1817

def import_course_asset_file_with_http_info(course_id, asset_schema, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.import_course_asset_file ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.import_course_asset_file"
  end
  # verify the required parameter 'asset_schema' is set
  if asset_schema.nil?
    fail ArgumentError, "Missing the required parameter 'asset_schema' when calling CourseApi.import_course_asset_file"
  end
  # resource path
  local_var_path = '/courses/{courseId}/asset'.sub('{' + 'courseId' + '}', course_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'updateAssetPolicy'] = opts[:'update_asset_policy'] if !opts[:'update_asset_policy'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(asset_schema)
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AssetFileSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#import_course_asset_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#import_course_version_asset_file(course_id, version_id, asset_schema, opts = {}) ⇒ AssetFileSchema

Import an asset file for a Course Version Creates or updates an asset file fetched from the provided url into the course version. The file will be downloaded from the url and stored in SCORM Cloud. This is a useful way to modify the course structure without needing to reimport the whole course after you’ve made changes. >Info: >If the course structure is being heavily modified, consider creating a new version instead. This can be done by calling one of the course import jobs while passing true for ‘mayCreateNewVersion`.

Parameters:

  • course_id
  • version_id
  • asset_schema
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :update_asset_policy (String)

    Describes how SCORM Cloud should handle importing asset files with respect to overwriting files. Valid values are &#39;reject&#39;, &#39;strict&#39;, and &#39;lax&#39;. A &#39;reject&#39; policy request will fail if the asset file already exists on the system (&#39;overwriting&#39; not allowed). A &#39;strict&#39; policy request will fail if the asset file does not already exist (&#39;overwriting&#39; is required). A &#39;lax&#39; policy request will not consider whether the file already exists (i.e., it will attempt to import in all cases). (default to lax)

Returns:



1870
1871
1872
1873
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1870

def import_course_version_asset_file(course_id, version_id, asset_schema, opts = {})
  data, _status_code, _headers = import_course_version_asset_file_with_http_info(course_id, version_id, asset_schema, opts)
  data
end

#import_course_version_asset_file_with_http_info(course_id, version_id, asset_schema, opts = {}) ⇒ Array<(AssetFileSchema, Fixnum, Hash)>

Import an asset file for a Course Version Creates or updates an asset file fetched from the provided url into the course version. The file will be downloaded from the url and stored in SCORM Cloud. This is a useful way to modify the course structure without needing to reimport the whole course after you&#39;ve made changes. &gt;Info: &gt;If the course structure is being heavily modified, consider creating a new version instead. This can be done by calling one of the course import jobs while passing true for &#x60;mayCreateNewVersion&#x60;.

Parameters:

  • course_id
  • version_id
  • asset_schema
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :update_asset_policy (String)

    Describes how SCORM Cloud should handle importing asset files with respect to overwriting files. Valid values are &#39;reject&#39;, &#39;strict&#39;, and &#39;lax&#39;. A &#39;reject&#39; policy request will fail if the asset file already exists on the system (&#39;overwriting&#39; not allowed). A &#39;strict&#39; policy request will fail if the asset file does not already exist (&#39;overwriting&#39; is required). A &#39;lax&#39; policy request will not consider whether the file already exists (i.e., it will attempt to import in all cases).

Returns:

  • (Array<(AssetFileSchema, Fixnum, Hash)>)

    AssetFileSchema data, response status code and response headers



1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1883

def import_course_version_asset_file_with_http_info(course_id, version_id, asset_schema, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.import_course_version_asset_file ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.import_course_version_asset_file"
  end
  # verify the required parameter 'version_id' is set
  if version_id.nil?
    fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.import_course_version_asset_file"
  end
  # verify the required parameter 'asset_schema' is set
  if asset_schema.nil?
    fail ArgumentError, "Missing the required parameter 'asset_schema' when calling CourseApi.import_course_version_asset_file"
  end
  # resource path
  local_var_path = '/courses/{courseId}/versions/{versionId}/asset'.sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'updateAssetPolicy'] = opts[:'update_asset_policy'] if !opts[:'update_asset_policy'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(asset_schema)
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AssetFileSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#import_course_version_asset_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#put_course_tags(course_id, tags, opts = {}) ⇒ nil

Add tags to a Course Applies the provided tags to the course. Tags are used to easily identify resources. Adding tags can enable more refined searches when making calls to certain endpoints (e.g. GetCourses).

Parameters:

  • course_id
  • tags
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


1938
1939
1940
1941
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1938

def put_course_tags(course_id, tags, opts = {})
  put_course_tags_with_http_info(course_id, tags, opts)
  nil
end

#put_course_tags_batch(batch, opts = {}) ⇒ nil

Add a group of tags to a group of Courses Applies all of the provided tags on all of the provided courses. Tags are used to easily identify resources. Adding tags can enable more refined searches when making calls to certain endpoints (e.g. GetCourses).

Parameters:

  • batch

    Array of ids, and array of tags for bulk tag operations

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


1997
1998
1999
2000
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1997

def put_course_tags_batch(batch, opts = {})
  put_course_tags_batch_with_http_info(batch, opts)
  nil
end

#put_course_tags_batch_with_http_info(batch, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Add a group of tags to a group of Courses Applies all of the provided tags on all of the provided courses. Tags are used to easily identify resources. Adding tags can enable more refined searches when making calls to certain endpoints (e.g. GetCourses).

Parameters:

  • batch

    Array of ids, and array of tags for bulk tag operations

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 2007

def put_course_tags_batch_with_http_info(batch, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.put_course_tags_batch ...'
  end
  # verify the required parameter 'batch' is set
  if batch.nil?
    fail ArgumentError, "Missing the required parameter 'batch' when calling CourseApi.put_course_tags_batch"
  end
  # resource path
  local_var_path = '/courses/tags'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(batch)
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#put_course_tags_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#put_course_tags_with_http_info(course_id, tags, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Add tags to a Course Applies the provided tags to the course. Tags are used to easily identify resources. Adding tags can enable more refined searches when making calls to certain endpoints (e.g. GetCourses).

Parameters:

  • course_id
  • tags
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 1949

def put_course_tags_with_http_info(course_id, tags, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.put_course_tags ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.put_course_tags"
  end
  # verify the required parameter 'tags' is set
  if tags.nil?
    fail ArgumentError, "Missing the required parameter 'tags' when calling CourseApi.put_course_tags"
  end
  # resource path
  local_var_path = '/courses/{courseId}/tags'.sub('{' + 'courseId' + '}', course_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(tags)
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#put_course_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#set_course_configuration(course_id, configuration_settings, opts = {}) ⇒ nil

Update configuration settings for a Course Updates configuration settings at the course level. This will explicitly set a value at the course level and override any settings from a higher level. These settings will affect all items within the course which do not have their own explicit configuration set. This can effectively be used to set course level defaults.

Parameters:

  • course_id
  • configuration_settings
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


2052
2053
2054
2055
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 2052

def set_course_configuration(course_id, configuration_settings, opts = {})
  set_course_configuration_with_http_info(course_id, configuration_settings, opts)
  nil
end

#set_course_configuration_with_http_info(course_id, configuration_settings, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update configuration settings for a Course Updates configuration settings at the course level. This will explicitly set a value at the course level and override any settings from a higher level. These settings will affect all items within the course which do not have their own explicit configuration set. This can effectively be used to set course level defaults.

Parameters:

  • course_id
  • configuration_settings
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 2063

def set_course_configuration_with_http_info(course_id, configuration_settings, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.set_course_configuration ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.set_course_configuration"
  end
  # verify the required parameter 'configuration_settings' is set
  if configuration_settings.nil?
    fail ArgumentError, "Missing the required parameter 'configuration_settings' when calling CourseApi.set_course_configuration"
  end
  # resource path
  local_var_path = '/courses/{courseId}/configuration'.sub('{' + 'courseId' + '}', course_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(configuration_settings)
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#set_course_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#set_course_title(course_id, title, opts = {}) ⇒ nil

Update title for a Course Updates the title of the course.

Parameters:

  • course_id
  • title
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


2112
2113
2114
2115
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 2112

def set_course_title(course_id, title, opts = {})
  set_course_title_with_http_info(course_id, title, opts)
  nil
end

#set_course_title_with_http_info(course_id, title, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update title for a Course Updates the title of the course.

Parameters:

  • course_id
  • title
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 2123

def set_course_title_with_http_info(course_id, title, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.set_course_title ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.set_course_title"
  end
  # verify the required parameter 'title' is set
  if title.nil?
    fail ArgumentError, "Missing the required parameter 'title' when calling CourseApi.set_course_title"
  end
  # resource path
  local_var_path = '/courses/{courseId}/title'.sub('{' + 'courseId' + '}', course_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(title)
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#set_course_title\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#set_course_version_configuration(course_id, version_id, configuration_settings, opts = {}) ⇒ nil

Update configuration settings for a Course Version Updates configuration settings at the course level. This will explicitly set a value at the course level and override any settings from a higher level. These settings will affect all items within the course which do not have their own explicit configuration set. This can effectively be used to set course level defaults.

Parameters:

  • course_id
  • version_id
  • configuration_settings
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


2173
2174
2175
2176
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 2173

def set_course_version_configuration(course_id, version_id, configuration_settings, opts = {})
  set_course_version_configuration_with_http_info(course_id, version_id, configuration_settings, opts)
  nil
end

#set_course_version_configuration_with_http_info(course_id, version_id, configuration_settings, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update configuration settings for a Course Version Updates configuration settings at the course level. This will explicitly set a value at the course level and override any settings from a higher level. These settings will affect all items within the course which do not have their own explicit configuration set. This can effectively be used to set course level defaults.

Parameters:

  • course_id
  • version_id
  • configuration_settings
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 2185

def set_course_version_configuration_with_http_info(course_id, version_id, configuration_settings, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.set_course_version_configuration ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.set_course_version_configuration"
  end
  # verify the required parameter 'version_id' is set
  if version_id.nil?
    fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.set_course_version_configuration"
  end
  # verify the required parameter 'configuration_settings' is set
  if configuration_settings.nil?
    fail ArgumentError, "Missing the required parameter 'configuration_settings' when calling CourseApi.set_course_version_configuration"
  end
  # resource path
  local_var_path = '/courses/{courseId}/versions/{versionId}/configuration'.sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(configuration_settings)
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#set_course_version_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#upload_course_asset_file(course_id, destination, opts = {}) ⇒ AssetFileSchema

Upload an asset file for a Course Creates or updates an asset file uploaded from your file system into the course. The file will be sent as part of the request and will be stored in SCORM Cloud alongside the course. This is a useful way to modify the course structure without needing to reimport the whole course after you’ve made changes. >Info: >If the course structure is being heavily modified, consider creating a new version instead. This can be done by calling one of the course import jobs while passing true for ‘mayCreateNewVersion`.

Parameters:

  • course_id
  • destination

    Relative path from the course&#39;s base directory where the asset file will be uploaded. &#x60;/Etiquette/Course.html&#x60; will upload the file into the Etiquette folder of the course.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :file (File)

    The asset file to import into the course.

  • :update_asset_policy (String)

    Describes how SCORM Cloud should handle importing asset files with respect to overwriting files. Valid values are &#39;reject&#39;, &#39;strict&#39;, and &#39;lax&#39;. A &#39;reject&#39; policy request will fail if the asset file already exists on the system (&#39;overwriting&#39; not allowed). A &#39;strict&#39; policy request will fail if the asset file does not already exist (&#39;overwriting&#39; is required). A &#39;lax&#39; policy request will not consider whether the file already exists (i.e., it will attempt to import in all cases). (default to lax)

Returns:



2240
2241
2242
2243
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 2240

def upload_course_asset_file(course_id, destination, opts = {})
  data, _status_code, _headers = upload_course_asset_file_with_http_info(course_id, destination, opts)
  data
end

#upload_course_asset_file_with_http_info(course_id, destination, opts = {}) ⇒ Array<(AssetFileSchema, Fixnum, Hash)>

Upload an asset file for a Course Creates or updates an asset file uploaded from your file system into the course. The file will be sent as part of the request and will be stored in SCORM Cloud alongside the course. This is a useful way to modify the course structure without needing to reimport the whole course after you&#39;ve made changes. &gt;Info: &gt;If the course structure is being heavily modified, consider creating a new version instead. This can be done by calling one of the course import jobs while passing true for &#x60;mayCreateNewVersion&#x60;.

Parameters:

  • course_id
  • destination

    Relative path from the course&#39;s base directory where the asset file will be uploaded. &#x60;/Etiquette/Course.html&#x60; will upload the file into the Etiquette folder of the course.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :file (File)

    The asset file to import into the course.

  • :update_asset_policy (String)

    Describes how SCORM Cloud should handle importing asset files with respect to overwriting files. Valid values are &#39;reject&#39;, &#39;strict&#39;, and &#39;lax&#39;. A &#39;reject&#39; policy request will fail if the asset file already exists on the system (&#39;overwriting&#39; not allowed). A &#39;strict&#39; policy request will fail if the asset file does not already exist (&#39;overwriting&#39; is required). A &#39;lax&#39; policy request will not consider whether the file already exists (i.e., it will attempt to import in all cases).

Returns:

  • (Array<(AssetFileSchema, Fixnum, Hash)>)

    AssetFileSchema data, response status code and response headers



2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 2253

def upload_course_asset_file_with_http_info(course_id, destination, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.upload_course_asset_file ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.upload_course_asset_file"
  end
  # verify the required parameter 'destination' is set
  if destination.nil?
    fail ArgumentError, "Missing the required parameter 'destination' when calling CourseApi.upload_course_asset_file"
  end
  # resource path
  local_var_path = '/courses/{courseId}/asset/upload'.sub('{' + 'courseId' + '}', course_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'updateAssetPolicy'] = opts[:'update_asset_policy'] if !opts[:'update_asset_policy'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['destination'] = destination
  form_params['file'] = opts[:'file'] if !opts[:'file'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AssetFileSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#upload_course_asset_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#upload_course_version_asset_file(course_id, version_id, destination, opts = {}) ⇒ AssetFileSchema

Upload an asset file for Course Version Creates or updates an asset file uploaded from your file system into the course version. The file will be sent as part of the request and will be stored in SCORM Cloud alongside the course. This is a useful way to modify the course structure without needing to reimport the whole course after you’ve made changes. >Info: >If the course structure is being heavily modified, consider creating a new version instead. This can be done by calling one of the course import jobs while passing true for ‘mayCreateNewVersion`.

Parameters:

  • course_id
  • version_id
  • destination

    Relative path from the course&#39;s base directory where the asset file will be uploaded. &#x60;/Etiquette/Course.html&#x60; will upload the file into the Etiquette folder of the course.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :file (File)

    The asset file to import into the course.

  • :update_asset_policy (String)

    Describes how SCORM Cloud should handle importing asset files with respect to overwriting files. Valid values are &#39;reject&#39;, &#39;strict&#39;, and &#39;lax&#39;. A &#39;reject&#39; policy request will fail if the asset file already exists on the system (&#39;overwriting&#39; not allowed). A &#39;strict&#39; policy request will fail if the asset file does not already exist (&#39;overwriting&#39; is required). A &#39;lax&#39; policy request will not consider whether the file already exists (i.e., it will attempt to import in all cases). (default to lax)

Returns:



2309
2310
2311
2312
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 2309

def upload_course_version_asset_file(course_id, version_id, destination, opts = {})
  data, _status_code, _headers = upload_course_version_asset_file_with_http_info(course_id, version_id, destination, opts)
  data
end

#upload_course_version_asset_file_with_http_info(course_id, version_id, destination, opts = {}) ⇒ Array<(AssetFileSchema, Fixnum, Hash)>

Upload an asset file for Course Version Creates or updates an asset file uploaded from your file system into the course version. The file will be sent as part of the request and will be stored in SCORM Cloud alongside the course. This is a useful way to modify the course structure without needing to reimport the whole course after you&#39;ve made changes. &gt;Info: &gt;If the course structure is being heavily modified, consider creating a new version instead. This can be done by calling one of the course import jobs while passing true for &#x60;mayCreateNewVersion&#x60;.

Parameters:

  • course_id
  • version_id
  • destination

    Relative path from the course&#39;s base directory where the asset file will be uploaded. &#x60;/Etiquette/Course.html&#x60; will upload the file into the Etiquette folder of the course.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :file (File)

    The asset file to import into the course.

  • :update_asset_policy (String)

    Describes how SCORM Cloud should handle importing asset files with respect to overwriting files. Valid values are &#39;reject&#39;, &#39;strict&#39;, and &#39;lax&#39;. A &#39;reject&#39; policy request will fail if the asset file already exists on the system (&#39;overwriting&#39; not allowed). A &#39;strict&#39; policy request will fail if the asset file does not already exist (&#39;overwriting&#39; is required). A &#39;lax&#39; policy request will not consider whether the file already exists (i.e., it will attempt to import in all cases).

Returns:

  • (Array<(AssetFileSchema, Fixnum, Hash)>)

    AssetFileSchema data, response status code and response headers



2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
# File 'lib/rustici_software_cloud_v2/api/course_api.rb', line 2323

def upload_course_version_asset_file_with_http_info(course_id, version_id, destination, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CourseApi.upload_course_version_asset_file ...'
  end
  # verify the required parameter 'course_id' is set
  if course_id.nil?
    fail ArgumentError, "Missing the required parameter 'course_id' when calling CourseApi.upload_course_version_asset_file"
  end
  # verify the required parameter 'version_id' is set
  if version_id.nil?
    fail ArgumentError, "Missing the required parameter 'version_id' when calling CourseApi.upload_course_version_asset_file"
  end
  # verify the required parameter 'destination' is set
  if destination.nil?
    fail ArgumentError, "Missing the required parameter 'destination' when calling CourseApi.upload_course_version_asset_file"
  end
  # resource path
  local_var_path = '/courses/{courseId}/versions/{versionId}/asset/upload'.sub('{' + 'courseId' + '}', course_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'updateAssetPolicy'] = opts[:'update_asset_policy'] if !opts[:'update_asset_policy'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['destination'] = destination
  form_params['file'] = opts[:'file'] if !opts[:'file'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AssetFileSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CourseApi#upload_course_version_asset_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end