GithubHelp home page GithubHelp logo

isabella232 / scorm-cloud Goto Github PK

View Code? Open in Web Editor NEW

This project forked from envylabs/scorm-cloud

0.0 0.0 0.0 110 KB

Ruby API Wrapper for the Rustici Local Web Services version of SCORM Cloud

Ruby 93.91% Gherkin 6.09%

scorm-cloud's Introduction

Rustici SCORM Cloud Ruby Client

This ruby gem is provides a ruby interface to the Rustici Local Web Services version of SCORM Cloud.

Shell CLI Interface

$ gem install ‘scorm_cloud’
$ scorm_cloud rustici.course.getCourseList —appid myappid —secret mysecret

Standard Ruby Use

require 'scorm_cloud'
sc = ScormCloud::ScormCloud.new("my_app_id","my_secret_key")
sc.course.get_course_list.each { |c| puts "#{c.id} #{c.title}"}

Ruby on Rails Use

Place the following in: Gemfile

require 'scorm_cloud', :git => '[email protected]:jasonpaluck/scorm-cloud.git'

Place the following in: config/initializers/scorm_cloud.rb

# Change MyApplication to the name of your application
MyApplication::Application.configure do |config|
	config.scorm_cloud.appid = "my_app_id"
	config.scorm_cloud.secretkey = "my_secret_key"
end

Place the following in: /app/controllers.course_controller.rb

# app/controllers/course_controller.rb
class CourseController < ApplicationController
	def index
		@courses = scorm_cloud.course.get_course_list
	end
	def launch
		return_url = course_index_url
		reg = scorm_cloud.registrations.create_registration(...)
		redirect_to scorm_cloud.registrations.launch(...)
	end
end

Place the following in: /app/views/course/index.html.erb

# app/views/course/index.html.erb
<ul>
<%= @courses.each |course| >
    <li>
        <
= link_to course_launch_path(course.title,course.id) >
    </li>
<
end %>
</ul>

scorm-cloud's People

Contributors

anhari avatar jasonpaluck avatar jswanner avatar ken-richard avatar kenrichard avatar redhatcat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.