Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For example, we want to be able to restrict access to a particular folder to just those students who score above an 80 on a recent quiz. When the instructor grades her students, each assignment grade goes out into Sakai as a Excerpt

hiddentrue
gradebook.updateItemScore Excerpt
hiddentrue
event. The folder in question has an event-listener registered in its name. When all the events go out, the event listener examines each one for the specified condition (grade must be above 80). When a particular event (student's grade) meets the condition, that student's ID is added to the ACL for the folder under protection, and thereafter the student will be able to access it.

...

The conditions module contains an implementation of NotificationAction called ResourceReleaseRule, which also implements Predicate from Apache commons-collections. The purpose of Predicate is to add a Excerpt

hiddentrue
boolean evaluate(Object arg) Excerpt
hiddentrue
method which answers the question "Has the condition been met?" The notify() method checks the condition and then takes the necessary action to update the state of the ContentHostingService.

...