Module: ScormEngine::Api::Endpoints

Includes:
About, Configuration, Courses, Courses::Configuration, Courses::Import, Destinations, Dispatches, Ping, Registrations, Registrations::Configuration, Registrations::LaunchHistory, Tenants::Configuration
Included in:
Client
Defined in:
lib/scorm_engine/api/endpoints.rb,
lib/scorm_engine/api/endpoints/ping.rb,
lib/scorm_engine/api/endpoints/about.rb,
lib/scorm_engine/api/endpoints/courses.rb,
lib/scorm_engine/api/endpoints/dispatches.rb,
lib/scorm_engine/api/endpoints/destinations.rb,
lib/scorm_engine/api/endpoints/configuration.rb,
lib/scorm_engine/api/endpoints/registrations.rb,
lib/scorm_engine/api/endpoints/courses/import.rb,
lib/scorm_engine/api/endpoints/courses/configuration.rb,
lib/scorm_engine/api/endpoints/tenants/configuration.rb,
lib/scorm_engine/api/endpoints/registrations/configuration.rb,
lib/scorm_engine/api/endpoints/registrations/launch_history.rb

Defined Under Namespace

Modules: About, Configuration, Courses, Destinations, Dispatches, Ping, Registrations, Tenants

Instance Method Summary collapse

Methods included from Tenants::Configuration

#get_tenant_configuration, #get_tenant_configuration_setting, #post_tenant_configuration, #put_tenant_configuration_setting

Methods included from Registrations::LaunchHistory

#get_registration_launch_history

Methods included from Registrations::Configuration

#get_registration_configuration, #get_registration_configuration_setting, #post_registration_configuration, #put_registration_configuration_setting

Methods included from Registrations

#delete_registration, #get_registration_exists, #get_registration_instances, #get_registration_progress, #get_registrations, #post_registration

Methods included from Ping

#get_ping

Methods included from Dispatches

#delete_dispatch, #delete_dispatch_registration_count, #get_dispatch, #get_dispatch_enabled, #get_dispatch_registration_count, #get_dispatch_zip, #get_dispatches, #post_dispatch, #put_dispatch, #put_dispatch_enabled

Methods included from Destinations

#delete_destination, #get_destination, #get_destination_dispatches_registration_count, #get_destinations, #post_destination, #post_destination_dispatches_enabled, #post_destination_dispatches_registration_instancing, #put_destination

Methods included from Courses::Import

#get_course_import, #post_course_import

Methods included from Courses::Configuration

#get_course_configuration, #get_course_configuration_setting, #post_course_configuration, #put_course_configuration_setting

Methods included from Courses

#delete_course, #get_course_detail, #get_course_preview, #get_courses

Methods included from Configuration

#delete_app_configuration, #get_app_configuration, #post_app_configuration

Methods included from About

#get_about, #get_about_user_count

Instance Method Details

Returns the link to use to launch this registration

Parameters:

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

Options Hash (options):

  • :registration_id (String)

    The ID of the registration.

  • :expiry (Integer) — default: 0

    Number of seconds from now this link will expire in. Use 0 for no expiration.

  • :redirect_on_exit_url (String)

    The URL the application should redirect to when the learner exits a course. If not specified, configured value will be used.

Returns:

  • (String)

See Also:



307
308
309
310
311
312
313
314
315
316
317
318
319
# File 'lib/scorm_engine/api/endpoints/registrations.rb', line 307

def get_registration_launch_link(options = {})
  require_options(options, :registration_id)

  options = options.dup
  registration_id = options.delete(:registration_id)
  options[:redirectOnExitUrl] = options.delete(:redirect_on_exit_url) if options.key?(:redirect_on_exit_url)

  response = get("registrations/#{registration_id}/launchLink", options)

  result = response.success? ? response.body["launchLink"] : nil

  Response.new(raw_response: response, result: result)
end