Rosterizer 2

Rosterizer2 ia a tool to extract 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:

To install rosterizer2 simply drag this link —> Rosterizer2 <– to your favorites bar in your web browser.

The favorites bar might be called the tool bar or the bookmarks bar depending on which web browser you are using.

Some browsers won’t let you install a bookmarklet by dragging. If dragging doesn’t work for you, follow the installation directions for your browser found on this page.

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.

How it works:

Rosterizer2 is a bookmarklet, a small javascript program which is contained in a 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 padding = Array(40).join(' ');
		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 + padding).slice(0,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 the way I want it. All processing occurs on your browser, unlike the original rosterizer.