Skip to content

Commit

Permalink
UMICH-1054 added read file and Perl script for inserting Dashboard to…
Browse files Browse the repository at this point in the history
…ol into existing MyWorkspace sites

git-svn-id: https://source.sakaiproject.org/svn/dashboard/trunk@313580 66ffb92e-73f9-0310-93c1-f5514f145a0a
  • Loading branch information
zqian committed May 27, 2014
1 parent c1d39b3 commit 3eb74af
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dashboard/README_insertDashboardToMyWorkspace.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'When rolling out Dashboard tool, we need to make it the first tool in MyWorksapce sites.

For new users, their MyWorkspace sites will be creatd based on the !user.template.<user_type>, where we will put the Dashboard tool as the first tool in the site template.

For those existing MyWorkspace sites, use the updateMyWorkspaceSites.pl file to insert the Dashboard tool. Just replace the id, password (need to be admin user) and server urls.
39 changes: 39 additions & 0 deletions dashboard/updateMyWorkspaceSites.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/perl -w

use SOAP::Lite;

my $user = '<admin_userId>';
my $password = '<admin_password>';

# use one single server url instad of the cluster name
my $loginURI = "https://<server_URL>/sakai-axis/SakaiLogin.jws?wsdl";
my $loginsoap = SOAP::Lite
-> proxy($loginURI)
-> uri($loginURI);

my $scriptURI = "https://<server_url>/sakai-axis/SakaiScript.jws?wsdl";
my $scriptsoap = SOAP::Lite
-> proxy($scriptURI)
-> uri($scriptURI);

#START
print "\n";

#get session
my $session = $loginsoap->login($user, $password)->result;
print "session is: " . $session . "\n";

# add Dashboard tool to all myworkspace sites
print "begin to add Dashboard tool to all myworkspace sites."."\n";
print $session."\n";
my $r = $scriptsoap->addNewToolToAllWorkspaces($session, "sakai.dashboard", "Dashboard", "Dashboard", 0, 0, false)->result;
print $r;
print "after adding Dashboard tool to all myworkspace sites ".$r."\n";

# logout
my $logout = $loginsoap->logout($session)->result;
print "logging out: " . $logout . "\n";

#END
print "\n";
exit;

0 comments on commit 3eb74af

Please sign in to comment.