Thursday, March 19, 2015

My latest and greatest solution to keep student grades and work forever in moodle


Highlights.
  • We have an external DB that moodle is synched to for enrollments.
  • Our teachers like *old, completed, dropped enrollments removed from their courses.
  • We need to keep student work for perpetuity - student work = assignments uploaded, quizzes takes, teacher comments, forum posts.
  • Our latest solution is to put a copy of the external DB up with another instance of moodle - that consumes the copy of the DB.
  • I added a trigger to execute a stored procedure that copies enrollments from the live db to the copy of the live DB.  The trigger is on the record insert event of the enrollments table in the live DB.
  • Now I have a conceptual "enrollment DB that will continue to grow over time - any enrollment added to the live table copies and enrollments removed from the live DB is ignored by my copy.
  • Restore the live DB to the restored_student instance.  It takes a couple minutes, the DB is about 400 MB - But I have it automatically backing up so I can restore at a moments notice the live DB to the restored_student DB.
  • After updating the DB, I have to also update the name of the external enrollment DB.  The live DB naturally is configured to consume from the live enrollment DB.

To really boil it down... I have 2 steps whenever I want to stand up the live site against a copy of the "perpetual" enrollment DB.

1 - Restore the live DB to the restored_student DB
2 - Update the Site Admin | Plugins | Enrollments | External DB configuration















1 comment:

  1. Hello,
    My name is Esdras Polanco. Director of Virtual Education for a Theological Seminary in Guatemala.

    We also use Moodle and we use ABHE Solutions (CampusSis.com). We would like to ask you if you have done the connection between both systems. If so. We would request your assistance. If you have develop a code or plugin, we would be interest in buy it.

    We are interest in ABHE enrollments synched in moodle. We actually use Moodle2.8

    Thanks for your time.

    In Christ,

    Esdras Polanco
    educacionvirtual@seteca.edu

    ReplyDelete