Tweaked activities for saving.

Made sure the context is set so the Classes or Homework can be saved.