Personal tools
You are here: Home > CS 342 Blog Entries > Folder with blog entries for Cooper Walbrun > Blog Entry for Week Ending April 28

Blog Entry for Week Ending April 28

by Walbrun, Cooper last modified Apr 28, 2017 01:51 PM

This week, I uncovered another elusive issue with the code I had written for awarding badges for Plone site events. For reasons I cannot explain, the unit tests I wrote involving checking whether a badge was created (for example) for creating a Page on the Plone site were passing. However, in practice, no badges were actually created in the Plone site when creating Pages. I stared at the source code of our add-on for a long time before determining that the problem was with our add-on's interaction with the Zope database. I had written a method that queries the database for a badge given its name and returns the badge if it is found, and the way to return the badge is to call an object-retrieval method on the item that is returned by the query. Instead, I had originally just directly returned the item (rather than calling item.getObject()), and this was causing Plone to throw silent errors when a badge was awarded to a user.

Other than fixing this bug, which once-and-for-all resolved all the bugs in our source, I implemented more trigger methods that revolve around "workflow state transitions." In short, this just means users are awarded badges for Publishing their content (e.g. a Page) and/or Retracting their content (retraction means reverting Published content back to Private). This was another feature we discussed in our initial gamification plan for the add-on, so it was very satisfying to finish it. I have since tested and written unit tests for the transition triggers, and everything is working as intended.

The one challenge that still stands in my group's way is creating a view (a page interface) for a user's profile that displays his/her badges, level, and experience. We found out this past week that our add-on has no pre-existing support for displaying such information, and instead only supports displaying badge pages (a page showing an individual badge's name, roster, description, and so forth). Making this view is an overwhelming task on its own, and after spending most of Wednesday night working as a group, Cory, Levi, and myself are not much closer to completing it. Thus our goal for the remainder of the semester will be to make this view or find out how to leverage another package/add-on to create this view.

by Walbrun, Cooper last modified Apr 28, 2017 01:51 PM
CS emphasis accredited by

ABET logo

Contact Us

Computer Science Department
UW Oshkosh
800 Algoma Blvd.
Oshkosh, WI 54901

Phone: (920) 424-2068
Fax: (920) 424-0045
Building: Halsey Science Hall

Rooms: 229 (general office), 218 (George Thomas, chair)

Email: Send mail to chair at