Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure while duplicating a course #54

Open
cli-ish opened this issue Nov 26, 2021 · 0 comments
Open

Failure while duplicating a course #54

cli-ish opened this issue Nov 26, 2021 · 0 comments

Comments

@cli-ish
Copy link

cli-ish commented Nov 26, 2021

There is an error when duplicating courses which use the remui course format. The Remui course image does no longer exists after a duplication if the course setting page is open at the same time.

Steps to reproduce:

  1. Checkout master branch
  2. Install version (1.1.1)
  3. create course
  4. Set course format to remui
  5. Add image to the remui section and save
  6. Reopen course setting page and open a new tab
  7. duplicate the created course over /backup/copy.php?id={courseid} (in the new tab)
  8. Run cron job (terminal)
  9. See that the new created course does not have a remui course image.

image

image

Most likely its based on the filearea context or a fresh generated draftid when editing the course page.
Because it works when none is editing the course. (must be explizit saved, a simple exit while editing the page does not work and will result also in an empty image)

The error exists somewhere in this function or below in the call chain. https://github.com/WisdmLabs/moodle-format_remuiformat/blob/master/lib.php#L639

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant