Moodle
  1. Moodle
  2. MDL-44502

Add mimetypes for Maple worksheets

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5.3
    • Fix Version/s: 2.5.6, 2.6.3
    • Component/s: Libraries
    • Labels:
    • Testing Instructions:
      Hide
      • Go to a course and turn editing on.
      • Upload a Maple file (say per drag+drop) - a test file is attached to this tracker item.
      • Verify: File is shown with "Math" icon (Sigma symbol on gray-ish ground).

      (The Mimetype can not directly be verified on the user interface, but with Maple installed, you might want to check that you can configure the browser to open Maple worksheets with Maple.)

      Show
      Go to a course and turn editing on. Upload a Maple file (say per drag+drop) - a test file is attached to this tracker item. Verify: File is shown with "Math" icon (Sigma symbol on gray-ish ground). (The Mimetype can not directly be verified on the user interface, but with Maple installed, you might want to check that you can configure the browser to open Maple worksheets with Maple.)
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull 2.6 Branch:
    • Pull Master Branch:

      Description

      Our users frequently work with Maple worksheets (http://www.maplesoft.com/products/maple/). This software is in widespread use in academia (in Mathematics and in Sciences).

      I wonder whether the corresponding mimetypes for Maple worksheets (.mw and .mws file extension) could be added? I will attach a patch.

        Gliffy Diagrams

        1. demo.mw
          20 kB
          Henning Bostelmann
        1. ss1.png
          8 kB
        2. ss2.png
          8 kB
        3. ss3.png
          9 kB
        4. ss4.png
          12 kB

          Activity

          Show
          CiBoT added a comment - Results for MDL-44502 Remote repository: https://github.com/bostelm/moodle.git Remote branch MDL-44502 to be integrated into upstream master Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/1962 Details: http://integration.moodle.org/job/Precheck%20remote%20branch/1962/artifact/work/smurf.html
          Hide
          Henning Bostelmann added a comment -
          Show
          Henning Bostelmann added a comment - Mimetypes recommended by the vendor: http://www.maplesoft.com/support/faqs/detail.aspx?sid=35267
          Hide
          Andrew Davis added a comment -

          This probably wants to be backported to 2.6 and 2.5. Otherwise, it looks good. Submit for integration when you are ready.

          Show
          Andrew Davis added a comment - This probably wants to be backported to 2.6 and 2.5. Otherwise, it looks good. Submit for integration when you are ready.
          Hide
          Andrew Davis added a comment -

          For the tester you can get a free Maple player from http://www.maplesoft.com/products/maple/mapleplayer/

          Show
          Andrew Davis added a comment - For the tester you can get a free Maple player from http://www.maplesoft.com/products/maple/mapleplayer/
          Hide
          Henning Bostelmann added a comment -

          Thanks for reviewing, Andrew.

          I have rebased the branch, and added backport branches against MOODLE_25_STABLE and MOODLE_26_STABLE as requested.

          Unfortunately it seems I can't send it to integration directly, you'll need to press the button instead.

          Show
          Henning Bostelmann added a comment - Thanks for reviewing, Andrew. I have rebased the branch, and added backport branches against MOODLE_25_STABLE and MOODLE_26_STABLE as requested. Unfortunately it seems I can't send it to integration directly, you'll need to press the button instead.
          Show
          CiBoT added a comment - Results for MDL-44502 Remote repository: https://github.com/bostelm/moodle.git Remote branch MDL-44502 -25 to be integrated into upstream MOODLE_25_STABLE Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/2100 Details: http://integration.moodle.org/job/Precheck%20remote%20branch/2100/artifact/work/smurf.html Remote branch MDL-44502 -26 to be integrated into upstream MOODLE_26_STABLE Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/2101 Details: http://integration.moodle.org/job/Precheck%20remote%20branch/2101/artifact/work/smurf.html Remote branch MDL-44502 to be integrated into upstream master Executed job http://integration.moodle.org/job/Precheck%20remote%20branch/2102 Details: http://integration.moodle.org/job/Precheck%20remote%20branch/2102/artifact/work/smurf.html
          Hide
          Andrew Davis added a comment -

          Putting this up for consideration by the integrators.

          Show
          Andrew Davis added a comment - Putting this up for consideration by the integrators.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          CiBoT added a comment -

          Moving this issue to current integration cycle, will be reviewed soon. Thanks for the hard work!

          Show
          CiBoT added a comment - Moving this issue to current integration cycle, will be reviewed soon. Thanks for the hard work!
          Hide
          Sam Hemelryk added a comment -

          Thanks Henning, after discussing this with other integrators we've decided this is fine to land and I've integrated it.

          Just noting http://www.scriptjunkie.us/2010/05/maple-exploit/ was raised during discussion.

          Show
          Sam Hemelryk added a comment - Thanks Henning, after discussing this with other integrators we've decided this is fine to land and I've integrated it. Just noting http://www.scriptjunkie.us/2010/05/maple-exploit/ was raised during discussion.
          Hide
          Dan Poltawski added a comment -

          This passes on all branches.

          However, in the past when we've added mime types we've added an upgrade step to upgrade existing files, e.g. MDL-40226

          The problem with the situation now is that one file added before this patch and one after will be displayed in different ways.

          Show
          Dan Poltawski added a comment - This passes on all branches. However, in the past when we've added mime types we've added an upgrade step to upgrade existing files, e.g. MDL-40226 The problem with the situation now is that one file added before this patch and one after will be displayed in different ways.
          Hide
          Henning Bostelmann added a comment -

          Thanks Dan; I see the point about the existing files.
          Would you like me to add the upgrade step in a different step for next week?

          Show
          Henning Bostelmann added a comment - Thanks Dan; I see the point about the existing files. Would you like me to add the upgrade step in a different step for next week?
          Hide
          Dan Poltawski added a comment -

          Hi Henning,

          Thats up for you/Sam to decide how to proceed. It can safely be done in a new issue I think.

          I'm setting this issue to failed to consider this issue. But integrator, if you defer this to a new issue, please feel free to pass it.

          Show
          Dan Poltawski added a comment - Hi Henning, Thats up for you/Sam to decide how to proceed. It can safely be done in a new issue I think. I'm setting this issue to failed to consider this issue. But integrator, if you defer this to a new issue, please feel free to pass it.
          Hide
          Marina Glancy added a comment -

          Dan, I'm not quite sure why upgrade step is needed at all. Do you have a specific example of how to reproduce "ne file added before this patch and one after will be displayed in different ways."

          I have just tried to upload mws file (found in internet) as file resource and as folder resource. First it shows as text:

          After pulling the commit:

          After resetting the course cache (file description is cached in modinfo)

          When editing resource:

          Show
          Marina Glancy added a comment - Dan, I'm not quite sure why upgrade step is needed at all. Do you have a specific example of how to reproduce "ne file added before this patch and one after will be displayed in different ways." I have just tried to upload mws file (found in internet) as file resource and as folder resource. First it shows as text: After pulling the commit: After resetting the course cache (file description is cached in modinfo) When editing resource:
          Hide
          Marina Glancy added a comment -

          at the same time it might be useful to add a string with the mimetype, so it is displayed nicely instead of "application/mapple". But this definitely can be done in a separate issue

          Show
          Marina Glancy added a comment - at the same time it might be useful to add a string with the mimetype, so it is displayed nicely instead of "application/mapple". But this definitely can be done in a separate issue
          Hide
          Marina Glancy added a comment -

          hehe, actually it's "maple" and not "mapple" or "apple"...

          Show
          Marina Glancy added a comment - hehe, actually it's "maple" and not "mapple" or "apple"...
          Hide
          Dan Poltawski added a comment -

          Doh, I forgot about the cm cache. I agree then its not that important in that case).

          (My instructions were, drag and drop a file before the patch, add upgrade. Drag and drop another file there - and I got two different icons. Hmm, should adding a new module in the same section not do that though??)

          Show
          Dan Poltawski added a comment - Doh, I forgot about the cm cache. I agree then its not that important in that case). (My instructions were, drag and drop a file before the patch, add upgrade. Drag and drop another file there - and I got two different icons. Hmm, should adding a new module in the same section not do that though??)
          Hide
          Marina Glancy added a comment -

          drag&drop is an ajax request, it does not refresh the page. Are you sure the icons are different after page refresh?
          P.S. Any change of content in the course triggers cache reset/rebuild

          Show
          Marina Glancy added a comment - drag&drop is an ajax request, it does not refresh the page. Are you sure the icons are different after page refresh? P.S. Any change of content in the course triggers cache reset/rebuild
          Hide
          Marina Glancy added a comment -

          Thanks for your awesome code, it is now part of Moodle. Don't forget to submit another issue next week (and peer review two).

          Show
          Marina Glancy added a comment - Thanks for your awesome code, it is now part of Moodle. Don't forget to submit another issue next week (and peer review two).
          Hide
          Paul Holden added a comment -

          Hi Marina Glancy,

          Isn't the upgrade step necessary to fix the mimetype of existing Maple files, added before this fix (otherwise the returned HTTP headers will be incorrect)?

          (It was you who pointed this out in a previous issue.)

          Show
          Paul Holden added a comment - Hi Marina Glancy , Isn't the upgrade step necessary to fix the mimetype of existing Maple files, added before this fix (otherwise the returned HTTP headers will be incorrect)? (It was you who pointed this out in a previous issue.)
          Hide
          Marina Glancy added a comment -

          Hi Paul, on current versions I can't reproduce the mimetype conflict any more so I could not really find any urge for upgrade script. But if you want you can create it in a separate issue.

          Show
          Marina Glancy added a comment - Hi Paul, on current versions I can't reproduce the mimetype conflict any more so I could not really find any urge for upgrade script. But if you want you can create it in a separate issue.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: