Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-76305

Cannot import database preset on Windows

    XMLWordPrintable

Details

    • MOODLE_401_STABLE
    • MOODLE_401_STABLE
    • MDL-76305-master
    • Hide
      Setup
      1. You'll need a 64-bit Windows machine here with no existing web server or MySQL/MariaDB server running or occupying ports 80 and 3306.
      2. Download the Moodle 4.1 Windows package
      3. Extract it anywhere
      4. Install git
      5. Open file explorer and go to [your MoodleWindows folder]/server
      6. Right-click the moodle folder and select "Git bash here"
      7. Run the following

        git init
        git remote add origin git://git.moodle.org/integration.git
        git fetch origin
        git reset --hard origin/master
        

      8. On the file explorer, go to [your MoodleWindows folder]
      9. Double-click "Start Moodle.exe"
      10. Once it says "APACHE and MYSQL are running...", open your browser and go to http://localhost
      11. Go through the installation process
      Test
      1. Create a course
      2. Create a database activity in the course
      3. Import a preset
      4. Open a file explorer and go to [your MoodleWindows folder]/server/moodle/mod/data/tests/fixtures
      5. Upload behat_preset.zip
      6. Confirm that you can import the preset file.
      Show
      Setup You'll need a 64-bit Windows machine here with no existing web server or MySQL/MariaDB server running or occupying ports 80 and 3306. Download the Moodle 4.1 Windows package Extract it anywhere Install git Open file explorer and go to [your MoodleWindows folder] /server Right-click the moodle folder and select "Git bash here" Run the following git init git remote add origin git: //git .moodle.org /integration .git git fetch origin git reset --hard origin /master On the file explorer, go to [your MoodleWindows folder] Double-click "Start Moodle.exe" Once it says "APACHE and MYSQL are running...", open your browser and go to http://localhost Go through the installation process Test Create a course Create a database activity in the course Import a preset Open a file explorer and go to [your MoodleWindows folder] /server/moodle/mod/data/tests/fixtures Upload behat_preset.zip Confirm that you can import the preset file.

    Description

      Got the following Behat failure when running on Windows:

      009 Scenario: Teacher can import from preset page on an empty database # C:\Users\jpata\Work\MoodleWindows\server\moodle\mod\data\tests\behat\import_presets.feature:25
            Then I should not see "Field mappings"                           # C:\Users\jpata\Work\MoodleWindows\server\moodle\mod\data\tests\behat\import_presets.feature:32
              Moodle exception: [tempdir]C/Users/jpata/Work/MoodleWindows/server/moodledata_behat/behatrun3/temp/forms/temEE6B.tmp is not a preset. More information about this error
              
              [tempdir]C/Users/jpata/Work/MoodleWindows/server/moodledata_behat/behatrun3/temp/forms/temEE6B.tmp is not a preset.
              More information about this error
              
              
                  
              Debug info: 
               
              Error code: invalidpreset
                  
                      
              ×
                      
              Dismiss this notification
                  
               
              	* line 141 of \mod\data\classes\local\importer\preset_importer.php:
              moodle_exception thrown
              	* line 218 of \mod\data\classes\local\importer\preset_importer.php: call
              to mod_data\local\importer\preset_importer->get_preset_settings()
              	* line 127 of \mod\data\preset.php: call to
              mod_data\local\importer\preset_importer->import()
               (Exception)
      

      I was able to reproduce this locally as well.

      Attachments

        Activity

          People

            jpataleta Jun Pataleta
            jpataleta Jun Pataleta
            Simey Lameze Simey Lameze
            Ilya Tregubov Ilya Tregubov
            Angelia Dela Cruz Angelia Dela Cruz
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 38 minutes
                3h 38m

                Clockify

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.