Child pages
  • Delegated Access Tool

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

back to index

Using the Tool

 

Overview

In order to use the Delegated Access tool in your Sakai instance, you'll need to configure both your instance and all appropriate sites, via property settings. The configuration workflow should be:

  1. Configure Sakai instance

  2. Configure sites

  3. Run hierarchy job via Job Scheduler


Configure instance

To configure your Sakai instance for site hierarchy, you must add a group of property settings to your local.properties file. These settings will determine the quantity, organization, and labels of nodes in the hierarchy.

Example:

delegatedaccess.hierarchy.site.properties.count=3

delegatedaccess.hierarchy.site.properties.1=School

delegatedaccess.hierarchy.site.properties.2=Department

delegatedaccess.hierarchy.site.properties.3=Subject

 

Keep in mind that the number in each node property setting will determine the order of nodes in the hierarchy. With the above example, users opening the hierarchy would:

  • Expand a "School" node to view all of its "Department" nodes

  • Expand a "Department" node to view all of its "Subject" nodes

  • Expand a “Subject” node to view all of its sites

 

Once you have added these property settings, you must restart your Tomcat server(s) for the changes to take effect.

 

Configure sites

To configure a site so it is included in site hierarchy, you must add the appropriate properties to the site.

These properties should align with the global settings for site hierarchy added to your local.properties file:

Global property node value = site property name

Using the previous example of global hierarchy settings, you might add the following property settings to a site:

school=Arts and Sciences

department=Education

subject=Educational Technology

 

You can add site properties to a specific site manually, via the Sites tool in the Admin Workspace. Select the Sites tool and follow these steps:

  1. Find and select appropriate site (search by site name or site ID as necessary).

  2. Click Add/Edit Properties button.

  3. Create first property setting by adding entry in Name and Value field.

  4. As necessary, click New Property button to create other property settings.

  5. Click Save.

Automating site configuration

You may want to automate site configuration as an alternative to adding site properties manually. Site properties can be added automatically via SIS integration, customized code during site creation, or through a daily script that can parse your sites’ id or title into the required site properties for each site (see example script below).

(Note: the following example is based on the hierarchy example above, with “school,” “department,” and “subject” nodes derived from the site titles)

<?php

require "../shared/functions.php";

$conn = mysql_connect(ip, dbuser, pwd);

mysql_select_db(dbname);

$soap = new SoapClient($script_wsdl, array('exceptions' => 0, 'connection_timeout' => 10));

 

$sql = "select SITE_ID, TITLE from SAKAI_SITE where type='course' and SITE_ID not in (select SITE_ID from SAKAI_SITE_PROPERTY where NAME = ‘School’)”;

$res  = mysql_query($sql);

 

while ($row = mysql_fetch_object($res)) {

 $site_id = $row->SITE_ID;

 $site_title = $row->TITLE;

 $pieces = explode(" ", $site_title);

 if(sizeof($pieces > 2)){

   $ss = $soap->setSiteProperty($session, $site_id, ‘School’, $pieces[0]);

   $ss = $soap->setSiteProperty($session, $site_id, 'Department', $pieces[1]);

   $ss = $soap->setSiteProperty($session, $site_id, ‘Subject’, $pieces[2]);

 }

}

?>

 

Run hierarchy job

Once you have configured your Sakai instance and all sites in your instance with the appropriate hierarchy property settings, you must run the Delegated Access Site Hierarchy job. This job populates the hierarchy in the Delegated Access tool, by searching for hierarchy property values in all sites in your instance.

In the Admin Workspace, select the Job Scheduler tool. Then follow these steps:

  1. Click the Jobs button.

  2. Click the New Jobs button.

  3. From the Type menu, select Delegated Access Site Hierarchy Job. In the Job Name field, enter this or another appropriate name.

  4. Click Post.

 

You'll see the job listed on the Jobs page, where you can click the Triggers link for it. You have two options for running the job:

  • Run the job immediately, by clicking Run Job Now.

  • Set up a trigger, such as for every time your SIS integration runs. Click Create Trigger. Enter a name in the Trigger Name field and an appropriate expression in the Cron Expression field. Then, click Post.

Once this job has run, all appropriate hierarchy nodes should display in the Delegated Access tool.

Adding the Tool

There are two tools for delegated access:

...