Rosterizer

Rosterizer ia a bookmarklet which extracts class rosters directly out of your class page on Self Service.

It is a direct replacement for the original Rosterizer which worked with Webadvisor. It’s not strictly needed anymore because you can download a class roster as a CSV file from Self Service, but I liked the old way.

To install:

This is the bookmarklet: Rosterizer

To install in Safari or Chrome, drag the bookmarklet to your favorites bar.

In other browsers or for help, follow the installation instructions here.

To use:

When you are logged in and viewing a class roster in Self Service, click the bookmarklet (or choose the favorite), and it will give you back a simple tab delimited roster which you can copy and paste into a spreadsheet to start your gradebook.

If the pasted roster doesn’t divide into columns nicely, try using “paste special” with option “text” to get Excel to recognize the tab delimited file and properly parse it. Alternately Excel has a command “text to columns” which will fix it for you.

If you're not logged in and viewing a roster, the bookmarklet won't do anything.

How it works:

Rosterizer is a a small javascript program which is contained in your browser bookmark.

Here is the source code

javascript: (function() {
	sectionId = window.location.pathname.split('/').reverse()[0];
	sectionName = document.getElementById("user-profile-name").textContent;
	term = document.getElementById("section-header-term").textContent;
	fetch('https://self-service.maritime.edu/Student/Student/Faculty/GetFacultySectionRosterAsync?sectionId=' + sectionId)
	.then(res => res.json())
	.then((obj) => {
	var s = sectionName + " " + term + "\n";
	for (index = 0; index < obj.RosterStudents.length; index++) {
		s += index + 1 + "\t" + obj.RosterStudents[index].StudentId + "\t" +
		obj.RosterStudents[index].DisplayNameLfm.padEnd(30, ' ') + "\t" +
		obj.RosterStudents[index].PreferredEmail + "\n";
	};
	document.body.innerHTML = "<pre>" + s + "</pre>";
	}).catch(err => console.error(err))
})()

It extracts the sectionID, section name, and term from the page you are viewing then makes an asynchronous call to Self Service to get the roster information and formats it as a simple tab-delimited text document. All processing occurs on your browser, unlike the original rosterizer.

Direct questions or problems to whaynes@maritime.edu