← Back to team overview

mahara-contributors team mailing list archive

[Bug 1512894] Re: Leap2A import isn't populating the artefact_file_embedded table for most things

 

The embedded image problem was resolved along the way and I couldn't
replicate it anymore.

For the rest, the code needs to be reviewed and investigated if it is
still an issue.

** Tags added: review

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1512894

Title:
  Leap2A import isn't populating the artefact_file_embedded table for
  most things

Status in Mahara:
  Confirmed

Bug description:
  The artefact_file_embedded table was added with the TinyMCE image
  picker button. Its purpose is to store the embed relationship, so that
  it can be checked for permission purposes (I have permission to view
  this thing; do I then have permission to view this other thing?)

  Currently, it's somewhat redundant for some purposes, because this
  relationship is also tracked in the view_artefact &
  artefact_attachment tables, as well as a couple of other places. But
  artefact_file_embedded is unique in that it's abstract enough to cover
  cases that aren't covered by the other tables, such as view
  descriptions and forum posts.

  So, for best practice, we should always be populating this table
  whenever we embed an image into a text field. And we do this pretty
  much everywhere *except* in Leap2a imports.

  For Leap2a imports, artefact_file_embedded is populated for images in
  view descriptions, but not for images embedded in anything else: blog
  entries, resume fields, text blocks, notes, etc.

  We should re-use the
  EmbeddedImage->rewrite_embedded_image_urls_from_import() method, for
  all imports. By my analysis, it can probably go in (or maybe replace)
  the call to ImportLeap->fix_artefact_references() in
  ImportLeap->do_import()

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1512894/+subscriptions


References