Moodle
  1. Moodle
  2. MDL-24349

Database Activity Presets not working

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Labels:
      None
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      27354

      Description

      Whenever trying to select a preset I get a message saying var/www/moodle2/mod/data/preset/Test Database is not a preset or whatever the name of the preset (tried a couple of times with different names). Let me know if any more information is required.

        Issue Links

          Activity

          Hide
          Ashley Blakeston added a comment -

          Linking issues

          Show
          Ashley Blakeston added a comment - Linking issues
          Hide
          Andrew Davis added a comment -

          Hi. I've committed a fix for this. I'm not sure how this made it through the first round of QA. You'll need to re-export any database activity presets you've produced as the problem was with the code producing the zip files.

          Show
          Andrew Davis added a comment - Hi. I've committed a fix for this. I'm not sure how this made it through the first round of QA. You'll need to re-export any database activity presets you've produced as the problem was with the code producing the zip files.
          Hide
          Ashley Blakeston added a comment -

          Have tried this and found a couple of issues, I was able to export and import via a zip file however it was only after I removed a textarea field from it, when a textarea field was included it didn't import the textarea field. Also when importing with a textarea there's no message displayed on the screen. A successful import without text area displays :

          "The preset has been successfully applied. Add entries to this database."

          Including a textarea just displayed no message.

          I also found that regardless of what I did it wouldn't accept any saved preset presenting me with the message /var/www/moodle2/mod/data/preset/<name> is not a preset name replaced.

          As an experiment I took the zip file and extracted it within /mod/data/preset and then tried the preset menu again and it recognised it as a folder entry (like the image gallery at the top) but selecting the option of the same name lower down (assuming those ones come from the database) now that the data was in the folder it progressed without a hitch.

          Hope this information helps and again let me know if you need to know anything more.

          Show
          Ashley Blakeston added a comment - Have tried this and found a couple of issues, I was able to export and import via a zip file however it was only after I removed a textarea field from it, when a textarea field was included it didn't import the textarea field. Also when importing with a textarea there's no message displayed on the screen. A successful import without text area displays : "The preset has been successfully applied. Add entries to this database." Including a textarea just displayed no message. I also found that regardless of what I did it wouldn't accept any saved preset presenting me with the message /var/www/moodle2/mod/data/preset/<name> is not a preset name replaced. As an experiment I took the zip file and extracted it within /mod/data/preset and then tried the preset menu again and it recognised it as a folder entry (like the image gallery at the top) but selecting the option of the same name lower down (assuming those ones come from the database) now that the data was in the folder it progressed without a hitch. Hope this information helps and again let me know if you need to know anything more.
          Hide
          Helen Foster added a comment -

          Ashley, thanks for your comments. Assigning to Andrew for further investigation.

          Show
          Helen Foster added a comment - Ashley, thanks for your comments. Assigning to Andrew for further investigation.
          Hide
          Andrew Davis added a comment - - edited

          I've committed a fix for the textarea problem. That should be fine now.

          I can reproduce the error when trying to use a saved preset rather than one that was exported to a zip file. Investigating further now...

          update: I think I've got this fixed. I'll do some more testing and commit it tomorrow.

          Show
          Andrew Davis added a comment - - edited I've committed a fix for the textarea problem. That should be fine now. I can reproduce the error when trying to use a saved preset rather than one that was exported to a zip file. Investigating further now... update: I think I've got this fixed. I'll do some more testing and commit it tomorrow.
          Hide
          Andrew Davis added a comment -

          I've committed the fix. The image gallery preset is stored in a conventional directory. Presets you save yourself are stored in the new Moodle 2.0 file storage system. The database activity hadn't yet been updated to fully support the storage system. It was writing presets to it but couldn't yet read presets from it. Should be all working now.

          Show
          Andrew Davis added a comment - I've committed the fix. The image gallery preset is stored in a conventional directory. Presets you save yourself are stored in the new Moodle 2.0 file storage system. The database activity hadn't yet been updated to fully support the storage system. It was writing presets to it but couldn't yet read presets from it. Should be all working now.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: