Seeking Advice Regarding Current Status of Journal Plugin

Seeking Advice Regarding Current Status of Journal Plugin

by Jason Press -
Number of replies: 8

Hello,

I'm preparing to update my Moodle 2.8.5+ website to the latest core release (and keep it updated moving forward). While reviewing the site's plugins and potential compatibility issues, I discovered that the Journal plugin/activity (which is used extensively on the website) appears to no longer be fully maintained and compatible with the current Moodle core (i.e., it was last updated a year ago and is only compatible up to Moodle 3.9).

Can anyone offer advice as to the best way of handling this situation? Ideally, I'd like to keep the hundreds of Journal entries submitted by the large group of students on the site. However, if the Journal plugin is no longer maintained, it seems that I may be in the position of needing to delete and/or convert all Journal submissions, which seems like a large task that I'm not even sure how to approach.

Is there perhaps a newer and fully maintained plugin to which the old Journal submissions could be migrated/converted over to? Or perhaps there is still some hope that the original Journal plugin might get an additional update at some point soon?

Any suggestions around this matter would be greatly appreciated.

Average of ratings: -
In reply to Jason Press

Re: Seeking Advice Regarding Current Status of Journal Plugin

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
You are right that the Journal maintainers are very slow about making changes as needed to the plugin. That version of journal will work with Moodle 3.11, but does have a couple of deprecated strings for which the code needs to be updated. If you have someone who can do some coding for you, it is pretty easy to fix.

A newer, fully maintained plugin that can be used to replace journal, is the Diary plugin. It is based off Journal, but has a lot of improvements. The main one is that a user can make multiple entries, either one a day, or one every time you want one.

If you are careful, and try it in a sandbox with backup data, you might even be able to change the journal database tables to the same name as those for diary and transfer all you old entries to Diary. I would imagine you would need to start with at least one version earlier of Diary, so that immediately after, deleting the dairy table then renaming the ones from journal to the dairy names, you would then need to update to the latest version of Diary so that additional fields would get added.
Average of ratings: Useful (2)
In reply to AL Rachels

Re: Seeking Advice Regarding Current Status of Journal Plugin

by Jason Press -
Thank you AL! Those are some helpful pointers.

I'm very interested in the possibility of "converting" the Journal DB tables into Diary tables. I did some basic preliminary testing in a sandbox as follows:

  1. On a clean installation, I installed the Journal plugin and Diary plugin (one version earlier [3.4.0])
  2. Added a simple Journal activity/page and submitted an entry
  3. Added a simple Diary activity/page and submitted a slightly different entry
  4. Exported and compared the “mood_diary” and “mood_journal” DB rows in a text editor
  5. Exported and compared the “mood_diary_entries” and “mood_journal_entries” DB rows in a text editor
  6. I wasn't sure exactly how to modify the "diary" DB rows so, as a test, I simply overwrote the Diary page title and contents in the appropriate spot with the corresponding Journal page title and contents
  7. Deleted all Journal/Diary DB tables and re-imported the two modified Diary tables as well as the unmodified Journal tables
  8. Upgraded the Diary plugin from 3.4.0 to 3.4.1
I can confirm that this process was successful (i.e., the updated/modified content appeared in the Diary entry as expected), though it's obviously not much different than just manually adding/overwriting Journal activities and submissions on the front-end. It also didn't take into account any details like maintaining the original submission dates.

When considering the conversion of dozens of Journal activities and hundreds of submissions, can you offer any insight as to how the specific process might look? In other words, how can I modify my current “mood_journal” and “mood_journal_entries” DB tables to fit the Diary format?
In reply to Jason Press

Re: Seeking Advice Regarding Current Status of Journal Plugin

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Sorry to take so long to reply as we had an extreme medical event going on here at my house for the past month.
To answer your question...please make sure you are trying this with backup data...the main thing is to make sure that when you are done is that you have all the correct field names created in your new mdl_diary and mdl_diary_entries tables. That's because all the new diary capabilities use a bunch of new fields that were NOT in the original Journal tables. Note, there are going to be a bunch more fields added when I get caught up and release a new version.
Average of ratings: Useful (1)
In reply to AL Rachels

Re: Seeking Advice Regarding Current Status of Journal Plugin

by Jason Press -
Hi AL, thank you for your reply and I hope all is well.

If you would be open to point me in the right direction by way of some example code, I think I can make this work. Most of the DB modifications seem fairly simple. The only ones I'm not sure about are the sections containing the entries/submissions themselves.

Here is an example of a section in the "mood_journal" table that I'm not sure how to convert:

    INSERT INTO `mood_journal` (`id`, `course`, `name`, `intro`, `introformat`, `days`, `grade`, `timemodified`) VALUES
    (1, 5, 'TEMP JOURNAL TEST', 'Test Journal question', 1, 0, 100, 1631985790);
For reference, here is the corresponding section from the Diary 3.4.0 "mood_diary" table:

INSERT INTO `mood_diary` (`id`, `course`, `name`, `intro`, `introformat`, `days`, `scale`, `assessed`, `assesstimestart`, `assesstimefinish`, `timemodified`, `timeopen`, `timeclose`, `editall`, `editdates`) VALUES
(1, 5, 'TEMP DIARY TEST', 'Test Diary question', 1, 7, 100, 0, 0, 0, 1632592317, 0, 0, 1, 1);

And here is an example of a section in the "mood_journal_entries" table that I'm not sure how to convert:

    INSERT INTO `mood_journal_entries` (`id`, `journal`, `userid`, `modified`, `text`, `format`, `rating`, `entrycomment`, `teacher`, `timemarked`, `mailed`) VALUES
    (1, 1, 2, 1631987131, 'Test journal submission – Please ignore', 1, NULL, NULL, 0, 0, 0);
Again, for reference, here is the corresponding section from the Diary 3.4.0 "mood_diary_entries" table:

INSERT INTO `mood_diary_entries` (`id`, `diary`, `userid`, `timecreated`, `timemodified`, `text`, `format`, `rating`, `entrycomment`, `teacher`, `timemarked`, `mailed`) VALUES
(1, 1, 2, 1632592320, 1632592341, 'Test diary submission – Please ignore', 1, NULL, NULL, 0, 0, 0);

Would you be able to "convert" the bolded "mood_journal" and "mood_journal_entries" example code sections above into their respective Diary format for me? I'm just not sure which values to change/remove/add and exactly how to do so.
In reply to Jason Press

Re: Seeking Advice Regarding Current Status of Journal Plugin

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Sorry to take so long to reply but if you send me a journal backup to experiment with, I will try to figure out a step-by-step method to convert it to Diary format.
Average of ratings: Useful (2)
In reply to AL Rachels

Re: Seeking Advice Regarding Current Status of Journal Plugin

by Jason Press -
To conclude this post– I'm happy to share that, thanks to much patience and generosity from AL, I was able to switch from the outdated "Journal" plugin to the newer, fully-maintained "Diary" plugin.

AL built a "transfer tool" into the Diary plugin which automated the process of converting Journal pages/entries into Diary pages/entries. It worked perfectly and I'm very happy with the results! 🙂

This new transfer feature is available in the latest version of the Diary plugin.

Thanks so much AL, it has been a pleasure working with you!!
Average of ratings: Useful (2)
In reply to Jason Press

Re: Seeking Advice Regarding Current Status of Journal Plugin

by Bob Gilmore -
Picture of Particularly helpful Moodlers
We used to use Journal a lot, but found it quite limiting. What I've done instead is created a Database activity that mimics the behaviour and found it superior, if slightly harder to initially set up. The database activity isn't as featureful as the newer Diary plugin, but as Database is a core part of Moodle, I'm more confident of it's continual support.
In reply to Bob Gilmore

Re: Seeking Advice Regarding Current Status of Journal Plugin

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I also found Journal to be, "quite limiting," which is why I developed the Diary plugin in the first place, and why I am willing to add new capabilities, when asked. I still have a pretty long list of tickets for other new capabilities that I want to add.

I am retired, and enjoy working on Diary, and the other three plugins I maintain. That's what I do each morning, and all day on rainy days, so they will be supported for the foreseeable future. I will admit, that I bought a new mini lathe yesterday, and playing with it might impinge on my time. 😉