Publishing unfinished courses

Hi @alex and team,

Is there a way to publish an unfinished course to Oppia in some sort of sandbox environment, to make sure everything built in Moodle looks correct in Oppia before it’s made available to other users?

Thanks,
Julie

1 Like

Hi @Julie,

Yes, when you publish a course from Moodle you can mark it as ‘draft’, then only users who are admin/staff (or the person who uploaded the course, if they have the permission to upload), will be able to download it from the app.
Also, if a course is already published onto the Oppia server, you can edit the course in the Oppia server to mark it as a draft course (see: https://oppiamobile.readthedocs.io/en/latest/implementers/dashboard/courses.html#publish-a-draft-course)

Then when you want to make the course available for everyone, just remove the draft status.

Note that if a course is already published and available to users, and you’re then updating the course, marking the course as draft will then stop it being available to users, so it’s best to use one of the options here: https://oppiamobile.readthedocs.io/en/latest/content/updating.html

Cheers,
Alex

Thanks @alex, I’ll give this a shot.

A colleague was just trying to follow the instructions for publishing a course and received the following error message - any idea what might be happening or what permissions we need to update?

Screen Shot 2020-08-28 at 16.28.33

Thanks,
Julie

HI @Julie,

I’ve got this fixed up now…

For info, I needed to give the web server user access to create directories and files in the oppia export block plugin directory .

Cheers,
Alex

Thanks @alex

I was able to publish a draft course, but now I’m working on adding some images and media and trying to publish a new draft version with the images included. I’m following the same process that was previously successful, but getting the following error message. I’m the only person working on this course, so not sure how there could be a version newer than the one I just updated and am trying to publish.

I also attempted to delete the draft course from the server so I could publish the new version, but the only Edit options are to update the tag and the draft status.

Thanks,
Julie

I’m not exactly sure what’s going wrong here… one possibility is that the time zones set on each of the machines is different - the timestamp is used for the version number. Before I go in and make any changes, could you have a go at republishing that course again today and see if it works - if it works then it’s likely a timestamp issue and I can have a look at getting these set correctly, if not then it’ll be something else that’s going wrong.

For info you can delete a course, see: https://oppiamobile.readthedocs.io/en/latest/implementers/dashboard/courses.html#delete-a-course - it just needs to be done via the Django admin pages. But you could hold off doing this for now, until we’ve figured out what the problem is here,

Cheers,
Alex

Thanks Alex, I was able to publish a draft this morning, then made some additional edits and tried to publish again and am getting the same error message.

Thanks Julie, looks like it may well be a timezone issue then, I’ll have a look and let you know later today

@julie - can you share with me the link to the course in Moodle that you’re testing with… (can send via email/skype if that’s better)

It now certainly seems to be a timezone issue… when I export that course from Moodle it gives a version no (timestamp) of 20200903081505 (or more readable: 2020-Sept-03 8:51am), but the version on the Oppia server is 20200903095645 (2020-Sept-03 9:56am). The Oppia server updates the version no, as it might also update the gamification customisations.

So I need to figure out how to get these timezones both in sync… but although the system times are networked synced, it seems that a system user somewhere (maybe the webserver) is using a different timezone…

I might need to restart these machines to get any changes to take effect…let me know if there is goign to be more appropriate time for me to do this, maybe over the weekend… so it doesn;t disrupt people using the machines now?

If it’s possible to restart over the weekend that would be great, or maybe just morning in Finland so you’re not working on the weekend?

If the versions are roughly an hour apart, does that mean I should be able to save changes in Moodle and then publish a draft an hour later without issue?

Thanks, I’ll look more tomorrow morning (Finnish time!). I think the versions are actually 5 or 6 hours apart, since I wasn’t able to publish an update since you republished this morning.

Finally figured out what the problem was and it should be fixed up now.

The issue was that the Oppia server was set to the UTC timezone (so the version nos were based on this), but the Moodle server as set to America/NewYork timezone, so generated version numbers that were 4 hours behind the Oppia server.
It wasn’t anything to do with the operating system timezone settings (so I went on the wrong path to start with!), it was actually much simpler, the timezone needed to be changed to UTC in the Moodle site admin pages.

Cheers,
Alex

Great news, thanks @alex!

1 Like

Hi @alex I am getting the same message as I am trying to publish a draft of a course. Could you please grant me access to publish on moodle?

Also, I am wondering about how we can test a course through the zip file download. So, after downloading the zip file, do we just try to put that on the phone’s SD card? And then, what happens after? One of my colleagues is also wondering whether we need a zip or apk file for the course testing… Thanks!

Hi @whedidar - the permissions for publishing need to be given on the Oppia server side (rather than in Moodle), so to set up the permissions, it will depend what server you;re trying to publish to. for the Oppia server admin, there are instructions here https://oppiamobile.readthedocs.io/en/latest/implementers/dashboard/users.html#add-remove-permission-to-upload-courses

For testing the courses, there are 2 options:

  1. publish as draft, then in the app you will be able to download it to test (from within the Oppia app)
  2. copy the zip file onto the sd card (as you mention), but it needs to be put in a specific folder… (see: https://oppiamobile.readthedocs.io/en/latest/content/testing.html), replacing the ‘org.digitalcampus.mobile.learning’ part with the specific instance for the Oppia implementation you;re using (perhaps: ‘org.lmh.cha’)

In a call I had yesterday with the CHA team, we discussed updating/improving the permissions for course uploading and testing, so hopefully there will be some updates here in the October tech dev sprint.

Cheers,
Alex

1 Like