Skip to content

Site images removed upon course copy #726

@Vozsvarozs

Description

@Vozsvarozs

Upon copying a course with a certificate that uses site images, the cert in the newly created course will have the image elements' Image value set to No image (instead of the site image).

Replication steps (tested on Moodle v4.5+):

  1. Add a site image in the plugin settings (mod/customcert/upload_image.php)
  2. Create a course.
  3. Create a custom certificate.
  4. Add an image and/or a background image element to the cert.
  5. Create a copy of the course (Manage course categories and courses > create copy via copy icon)
  6. Open the copied course, check the cert: elements originally using site images have No image selected now

Relates to #298, where a solution using local copies for the images were used previously - though not even that course backup / restore method seems to be working anymore. Steps:

1-6 same as above.
7. Create a course backup.
8. Restore the backup into a new course.
9. Same as last step above, i.e. check cert to see that elements with site images are set to No image.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions