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

Models output directory full path set up during installation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.6.5, 3.8.5, 3.9.2, 3.10, 4.0
    • Fix Version/s: 3.8.6, 3.9.3
    • Component/s: Analytics
    • Labels:
    • Testing Instructions:
      Hide

      Upgrade

      1. Install a new site (before patch!)
      2. Navigate to Analytics > Analytics settings in site administration
      3. Confirm Models output directory field points to a directory named "models" inside your $CFG->dataroot.
      4. Upgrade the site (to after patch).
      5. Navigate to Analytics > Analytics settings in site administration
      6. Confirm Models output directory field default value is empty
      7. Confirm the default path is shown in the field description, it must match, in general ($CFG->dataroot/models, aka, a models subdirectory under your site dataroot.

      Use

      1. Install new site
      2. Login as admin
      3. Navigate to Analytics > Analytics settings in site administration
      4. Confirm Models output directory field default value is empty
      5. Confirm the default path is shown in the field description, it must match, in general ($CFG->dataroot/models, aka, a models subdirectory under your site dataroot.
      6. Create a user
      7. Create a course
      8. Enrol user on course as a student
      9. Navigate to Server > Tasks > Scheduled tasks in site administration
      10. Run the \tool_analytics\task\predict_models task
      11. Confirm that the path from step 5. is now populated with new content
      12. Navigate to Analytics > Analytics settings in site administration
      13. Change the Models output directory field to any other directory (e.g. your $CFG->dataroot/models-new)
      14. Run step 9. & 10. again
      15. Confirm that the path from step 13. is populated with new content
      Show
      Upgrade Install a new site (before patch!) Navigate to Analytics > Analytics settings in site administration Confirm Models output directory field points to a directory named "models" inside your $CFG->dataroot . Upgrade the site (to after patch). Navigate to Analytics > Analytics settings in site administration Confirm Models output directory field default value is empty Confirm the default path is shown in the field description, it must match, in general ( $CFG->dataroot/models , aka, a models subdirectory under your site dataroot. Use Install new site Login as admin Navigate to Analytics > Analytics settings in site administration Confirm Models output directory field default value is empty Confirm the default path is shown in the field description, it must match, in general ( $CFG->dataroot/models , aka, a models subdirectory under your site dataroot. Create a user Create a course Enrol user on course as a student Navigate to Server > Tasks > Scheduled tasks in site administration Run the \tool_analytics\task\predict_models task Confirm that the path from step 5. is now populated with new content Navigate to Analytics > Analytics settings in site administration Change the Models output directory field to any other directory (e.g. your $CFG->dataroot/models-new ) Run step 9. & 10. again Confirm that the path from step 13. is populated with new content
    • Affected Branches:
      MOODLE_310_STABLE, MOODLE_36_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • Fixed Branches:
      MOODLE_38_STABLE, MOODLE_39_STABLE
    • Pull 3.8 Branch:
    • Pull 3.9 Branch:
    • Pull 3.10 Branch:
      MDL-66392-310
    • Pull Master Branch:

      Description

      The setting "Models output directory | modeloutputdir " under
      admin/settings.php?section=analyticssettings

      is set up to full (expanded) path to $CFG->dataroot . '/models' during installation and is stored in DB config.

      When $CFG->dataroot changes, the path to models stays as it was - usually causing permission errors during cron run - like in MDLSITE-5247.

      Instead, the modeloutputdir should be empty by default.

        Attachments

          Activity

            People

            Assignee:
            pholden Paul Holden
            Reporter:
            tmuras Tomasz Muras
            Peer reviewer:
            Amaia Anabitarte
            Integrator:
            Eloy Lafuente (stronk7)
            Tester:
            Anna Carissa Sadia
            Participants:
            Component watchers:
            Elizabeth Dalton, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              9/Nov/20

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 40 minutes
                4h 40m