Skip to content

payten/Sakai-OAE-Collection-Creation-Script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

What does it do?
----------------

This script allows you to batch create a collection for a set of users and to also add default content to this collection.

Configuring this Script
-----------------------

Initially, you'll need to setup your admin user login credentials and your Sakai OAE instance domain and port:

@url = URI.parse("http://localhost:8080")
@user = "admin"
@pass = "admin"

There are also a few global variables you can modify  to customise your collection and the content to create for it.  These are:

@userids  - an array of strings; the user ids of the Sakai users to create the collection for.

Alternatively, list all the userids in the users.txt file (one per line) and add this file's location as an arg when running the script (see below).

@collection_title - string; the title to give the collection content page
@collection_access - string; the level of access to apply to the collection and the default content added to it.  This can be either "everyone" (logged in users), "public" or "private (for the user only).

@collection_skin - string; the custom stylesheet to be applied to the collection content page.  NB. for this to work you'll need to patch with https://github.com/payten/3akai-ux/tree/customstylesforcontent to enable custom stylesheets for pooled content items.

This script also allows the creation and addition of content pages to the collection.  Define these pages with @default_content e.g.

@default_content = [
	{
		"title" => "My Page Title",
		"content" => "My <i>page's</i> content. <ul><li>List item</li><li>another list item</li></ul>"
	}
]


How to Run the Script
---------------------

With your Sakai OAE instance running, in the command line run:

>> ruby collection.rb

If you wish to use users.txt to seed the script:

>> ruby collection.rb users.txt

NB. This script was developed and tested with Ruby 1.8.7.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages