← Back to team overview

mahara-contributors team mailing list archive

[Bug 774684] Re: HTML file from Moodle is not transferred correctly

 

This one is a tricky little bug.

We are reading the mimetype when we import it.

To do this we use the finfo class. By default it loads the following magic database (according to manual):
If not specified, the MAGIC environment variable is used. If this variable is not set either, /usr/share/misc/magic is used by default. A .mime and/or .mgc suffix is added if needed.

>From what I see, the MAGIC env isn't set, and there is a *directory* at
/usr/share/misc/magic, and a *file* at /usr/share/misc/magic.mgc

This seems like a upstream bug in php, for now I will add in a check if
/usr/share/misc/magic is a dir, and if it is then will try .mgc (which
detects as html as expected)

Cheers,

Hugh

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/774684

Title:
  HTML file from Moodle is not transferred correctly

Status in Mahara ePortfolio:
  Confirmed

Bug description:
  This was trialed on the iMoot2011 site at http://2011.imoot.org/ It is
  connected to a Mahara 1.2 installation. When a text assignment and
  forum post (both simple text) were saved as HTML file to be
  transferred to Mahara, the HTML files could not be chosen in the "Some
  HTML" block. When the files were saved on the desktop from Moodle and
  uploaded into Mahara manually, they were recognized correctly and
  displayed.

  Would that be a Moodle or Mahara bug?

  I attach one of the files, but as the problem is in the transfer, I am
  not sure how useful this is.


References