[catsoop-dev] Button to Generate Email Notification of Manual Grade

adam j hartz hz at mit.edu
Tue Jul 9 10:25:39 EDT 2019


Hi Valerie,

Thanks for sending this!

> I've been using this email-generating button, since students in 6.s090
> requested to be notified when their submissions are manually graded.
> It only appears if the course's preload.py has a variable
> cs_show_grade_email_generate_button set to True.

I like this idea a lot, but I think we may want to find a more general
way to implement this (and open the door to other, similar kinds of
interactions) if we're going to include it in CAT-SOOP itself.

From a high-level perspective, I think my preference for generalizing
this idea would be to add a number of additional hooks into the system
to handle cases like this.  Right now, CAT-SOOP provides hooks at
various points in the page loading process, and those hooks allow
plugins to run code at those points.  I think adding hooks related to
other kinds of events (student submits a question, a manual grade is
entered, a question's grader finishes, user logs in, etc) would be a
general way to offer these kinds of event-driven functionalities.

In that view, the code for sending e-mail in response to manual grade
entry would live in a plugin, and the CAT-SOOP codebase would only
contain the most general stuff (i.e., code that triggers a
"manual_grade_entered" hook after a manual grade has been entered, or
something like that).


In a bit more detail, what I would envision here would be something
along the lines of adding a call like:

   loader.run_plugins(context, context["cs_course"],
                      "manual_grade_entered", context)

to the bottom of the handle_grade function in the default handler.  Then
I would put the code for actually sending the e-mail in
__PLUGINS__/email/manual_grade_entered.py within your course.  Within
that file, I would use the catsoop.mail.internal_message function to
send the student an e-mail (which avoids the need for manual
intervention, and which also avoids the extra complication that not
everyone's e-mail address will have the form <username>@mit.edu).

We could also then think about other places we would want to add these
kinds of hooks into the system.


My high-level hope is to provide the flexibility to implement these
kinds of really nice modifications without requiring anyone to touch the
code of CAT-SOOP itself (even if we can't predict the details of what
those modifications will be for future users).  I think adding these
kinds of hooks, along with some other additions to the plugin system
that I've been discussing with Ike and Duane, could really be a big
improvement in that department.

Happy to continue the conversation.

Thanks again!
-Adam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
Url : http://mailman.mit.edu/pipermail/catsoop-dev/attachments/20190709/1438b464/attachment.bin


More information about the catsoop-dev mailing list