Shady – for super granular control of your Macbook screen brightness

On a recent trans-Pacific flight, I was doing some work on my Macbook. All was fine with the in-flight WiFi working pretty well. But when they turned off the lights after dinner, my screen was painfully bright-even on it’s lowest setting.

You can use shift-option-F1/F2 to gain some fine-tuning control over your screen’s brightness, but if you need more, there’s Shady – a tiny li’l utility that basically writes a variably transparent grey layer over your screen. That’s all. It’s great. Get it.

Shady - screen shader

Next Year’s Course Lists for Students and Course Rosters for Teachers from PowerSchool

I use a MacBook to do most of my work. This should work on a PC too, though navigating in Terminal might be a little different. Feel free to leave a message below to let me know if you run into problems and I'll see if I can help.

This spring, our principals want to give students their course lists for next school year with courses listed in alphabetical order. This is so that students can confirm their course enrollments without knowing what period or teacher they are assigned to. This is to help preclude students requesting changes to be with a particular teacher or friend.

I wrote a Python script to do this. <– Note: Change .txt to .py before running

We also wanted to provide teachers with class rosters so that they could look for any potential issues including gender balance.

Another Python script handles this. <– Note: Change .txt to .py before running

To get the data, use DDE to select records from the ScheduleCC table for the next school year. In my case, I set TermID >= 2700 since TermIDs for next year (2017-2018) are 2700, 2701 and 2702

Then I export the data using the fields below. The first 5 come from the ScheduleCC table. Other tables are: 2 Courses, 1 Students, 183 CustomText, 5 Teachers and 3 Sections. Note that for your PowerSchool setup, the Student_Email record may be located elsewhere.

Exported fields:
[1]Student_Number
[2]Course_Name
[1]first_name
[1]middle_name
[1]last_name
[1]Sched_NextYearGrade
TermID
[183]Student_EMail
Course_Number
SectionID
Expression
[5]First_Name
[5]Last_Name
[5]Email_Addr
[1]Gender
[1]Father_Email
[1]Mother_Email

Sorting of the data file is essential!


For student course lists, sort the data in this order: Sched_NextYearGrade, StudentID, Course_Name. If you just want to print course lists for just MS or HS,  remove the excess lines or refine your export from DDE. Save the file with the name sched_data.csv in the same folder as this script. Save this file as a csv file named sched_data.csv in the same folder as the shed_alpha.py script.

For teacher rosters, sort the data in this order: [5]Last_Name, [5]First_Name, TermID, Expression, SectionID, [1]Last_Name, [1]First_Name. Save the file as a csv file with the name roster_data.csv in the same folder as the class_rosters.py script.

To run the script, open Terminal and navigate to the folder containing the script and data file. For instance, if you saved them in a file called rosters in your Documents folder,

cd ~/Documents/rosters

and then run the script:

python class_rosters.py

The python scripts create an .rtf file for each student or teacher. Note that if you open the rtf file in preview, it may not show or print the page breaks that are in the documents. If you open them in MS Word, you should see them properly.

The scripts also create a handy Terminal command to bulk convert the rtf files to pdf format. This command requires LibreOffice available here. After running the the python script to create the rtf files, assuming all went well, you’ll see a folder with the current date and time in its name. Open the folder and find the file named convert_to_pdf.txt. Open this file, copy its contents, paste it into Terminal and hit Enter. In several seconds you’ll have your rtf files converted to pdfs. If you get an error message, Terminal probably isn’t in the correct folder. cd to the folder holding the rtf files and try again.

Oh, another little bonus is a file that gets created called 1mail_merge_info.csv. This has the three columns needed to use Amit Agarwal’s Mail Merge with Attachments to send them out to students and staff.

 

 

Creating individual corporate email signatures for staff

Our staff email signatures are a varied mix of good and bad. When I need to respond to someone who has just emailed me, I’d like to be able to look at the signature to see his or her position/title, room/office number and phone extension. For external email recipients, additional contact information should be included including a link to our website and to our Twitter feed. Personal badges and other clutter should be avoided for a clean, professional looking email. I want it to look like this:

Email Signature
Sample of desired email signature

Google Apps Manager or GAM (https://github.com/jay0lee/GAM/wiki) allows a Google Admin to set signatures for accounts in the domain. So, I use a Python script to create an html signature for each staff person as well as a batch file that tells GAM which signature file to upload to each account.

It all starts with a spreadsheet. The one I use is the Form Responses sheet from a Google Form I use to collect the necessary data from staff. I do this so that individuals are able to decide on how their names show and to ensure that we have accurate information about room numbers and phone extensions. This also allows the individual to decide whether or not to include a personal cell phone number in the signature.

The column headers in the spreadsheet are:
Timestamp, email, Name, Position, Room, Extension, Mobile, Include_Mobile

The script then processes the data in the spreadsheet to create a signature file for each row and staff member as well as a batch file that I run in terminal with the command:

python gam.py batch batchfile.txt

This creates the individualized email signature seen above. KIS social media links like official KIS Twitter feeds, Facebook and Instagram links will be added in the fall of 2017.

 

SQLDeveloper and Java 1.7.0_80.jdk

SQLDeveloper needs to run under a Java version greater than 7 and less than 8. Installing the most up-to-date JDK gets you at least version 1.8.0_131 (as of 26 April, 2017). You can find older versions of Java from their Download Archives where I was able to find version 1.7.0_80.

Alas, even after installing this version, SQLDeveloper “sees” the newer version that I also have installed on my Macbook Pro and not the required JDK.  Luckily one Paulo Pedroso on the stackOverflow posted a solution which was to edit the file
/Applications/SQLDeveloper.app/Contents/MacOS/sqldeveloper.sh
(I used nano) to the line that reads
export JAVA_HOME-‘/use/libexec/java_home -v 1.7’
and simply change the 1.7 to 1.7.0_80.

Yup, that’s it.

Enable PowerTeacher Pro for individual sections

Using DDA with the Sections table, filter the course and sections you want to change – making sure you select the current year so that you do not convert previous years’ gradebooks. In DDA, Click “Modify Records”. In the drop-down menu, choose “Gradebook Type”=2 to change all the selected sections to the new PowerTeacher Pro Gradebook.

For future reference, to enable PTP for all courses, from PowerSource:
Enable PowerTeacher Pro: PowerTeacher Pro is enabled at a section level by setting the gradebook type. You can set this individually by section or en-masse using DDA or Quick Import. You can also set the default gradebook type of newly created sections to PowerTeacher Pro in PowerSchool from the District > PowerTeacher Pro Settings > Default Gradebook Type page . Setting a section to PowerTeacher Pro will cause it to become read-only in PowerTeacher Gradebook.

Changing Extensions in Finder – Disable Verification

When you change a file extension in Mac OS, you are asked to confirm that you actually want to do so. This can be annoying to those who routinely change say, .txt extensions to .csv. Thanks to KirkMC’s post in MacWorld, a simple Terminal command will disable that confirmation popup:

defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false

Then just relaunch Finder for the change to take effect:

killall Finder

Turning PowerSchool’s Parent/Student Portal On and Off

It’s the simps: In the District, under Setup select District. On the next page, under District Information, select Miscellaneous. At the very bottom of the page, find the checkbox for Disable Student and Parent Portals/Mobile Apps and check/uncheck as appropriate.
If turning the portal off, be sure to edit the message just below the checkbox.

Get notification when Autocrat fails to run

We have several leave request forms that get processed by the Autocrat Add-on. Inevitably, Autocrat seems to get stuck and fails to run. This is an issue for us when staff are submitting forms expecting that they will be acted upon while our crack team of support staffers remain unaware that the requests have been submitted.

Whenever Autocrat runs, it adds a note logging successful completion into the cell in the last row, last column of this spreadsheet. If this cell is blank, Autocrat has failed to execute. So, I came up with this little script. It checks the form responses spreadsheet’s last row and column every 6 hours (adjustable). If that cell is empty, indicating an Autocrat failure, an email is sent to me which looks like this:

To use this yourself, click here for the script. Copy the code and paste it into a new script in your form’s spreadsheet (Tools > Script Editor). Then set a trigger for the script to run at your preferred time interval.

PowerSchool – Teams for Teachers, Students, Courses and Sections

PowerSource article 6185 walks the user through setting up Teams in PowerSchool. Of particular interest is the comment from Laura Cowart about mass assigning students to teams (below). Team lists with ID numbers are found with the “Teams” link on the left of the PowerScheduler page.

Select all the students for Team "A" by hand from a larger group, say 8th grade, then navigate to the main PowerSchduler page. Select Functions and choose Update Selections. 

This is a mass change utility so you'll want to take some care here. Set your table to Students and verify that you have the correct number of students (the number you just selected by hand) in your current selection of records. If you're not sure, click on the blue link List Students to see the students included in your current selection. Click on Scheduling Functions from the breadcrumb trail, then Update Selections again from the Functions menu to return to where you can update the records.

When you're ready to make the change, click on the blue link Modify Records and choose Sched_NextYearTeam from the dropdown menu. Set the value to the ID number of the team you want to populate (find the number by clicking on Teams, under Parameters, on the left of the main PowerScheduler page) and then click Modify Selected Records on the lower right.

To retrieve a list of students from a certain team, use a search like this on the Students page: Sched_NextYearTeam=2781.