Packaging PowerTeacher Gradebook for Munki


Important Update: As of April, 2017 (possibly earlier), the LaunchGradebook.ptg file appears to be tied to the specific user logged in, so it can’t just be generically distributed. So if you don’t have an older version of LaunchGradebook.ptg for your organization, you essentially won’t be able to distribute Gradebook to your users. Fortunately, (hat tip to Zack McCauley), there is a workaround, which is to edit the .ptg file (apparently, it’s just a text file) and remove the values on the right side of the equals sign for these parameters:

ptg.com.pearson.powerschool.userid=
ptg.com.pearson.powerschool.sessionid=
ptg.com.pearson.powerschool.credentials=
ptg.com.pearson.powerschool.schoolnumber=

PowerTeacher Gradebook (part of PowerSchool from Pearson) is a bit tricky to package for.

gradebook00
It comes as .dmg that “installs” to the user’s Applications folder, but if you launch the Gradebook.app after “installing” it, you’ll just get this message: gradebook01

So you actually have to log back into the web interface and then click Launch there. gradebook02
What this does is actually download and run a .ptg (PowerTeacher Gradebook) file using Gradebook.app from /Users/username/Applications.

Distributing this kind of setup for Munki is tricky, but here’s basically what I did to make it work (you can do your own tweaks for a workflow that’s more conducive to your school’s situation).

Get the files from PowerSchool

Pick a sample dummy user to “install” the Gradebook .dmg for. Once it’s “installed,” find the Gradebook.app package and put it somewhere for later distribution.

Log into a PowerSchool account and click the Launch button to download the LaunchGradebook.ptg file, which you’ll also put somewhere for later distribution (don’t launch it just yet; after you launch it, it deletes itself).

Create a first-run .app

In Automator, add a Run Shell Script

This is mine, as an example:

# Run LaunchGradebook the first time
open /Library/Application\ Support/PowerSchool/LaunchGradebook.ptg

# Remove Gradebook First Run from the dock
/usr/local/bin/dockutil –remove ‘Gradebook First Run’ –no-restart

# Add to the dock
/usr/local/bin/dockutil –add /Applications/Gradebook.app

if [[ -d ~/Applications/Gradebook.app ]]; then
# Delete the local Gradebook
rm -rf ~/Applications/Gradebook.app
fi

# Create a new alias
ln -s /Applications/Gradebook.app ~/Desktop/Gradebook\ Login

Save that Automator script as Gradebook First Run.app.

Have the postinstall script for your package add the first-run .app to user Docks

Here is mine as an example:

#!/bin/bash

# Add Gradebook First Run to all user Docks
/usr/local/bin/dockutil –add /Library/Application\ Support/PowerSchool/Gradebook\ First\ Run.app –allhomes

Create a .pkg

If you don’t know how to do that, check out this tutorial that uses Adobe Remote Update Manager as an example) that has Gradebook.app as a payload to the /Applications folder and LaunchGradebook.ptg and the first-run .app as payloads to a user-defined folder—I just picked /Library/Application Support/PowerSchool, but you can pick something else, as long as it doesn’t interfere with anything else and makes sense to you.

Required Items

Once that’s all assembled, import it into Munki and make sure the package requires Java (I’ve heard the newer versions do not need Java, but I haven’t had a chance to test that yet, so you may not need Java) and dockutil.

P.S. I haven’t had a chance to fully test this with an upgrade, but I believe distributing the contents of ~/Library/Caches/Pearson to all users (from a working install) will allow upgraded Gradebook installations to run without having to redo manually launching the .ptg file.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.