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

Insights about upcoming activities due should be generated from time()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.7
    • Fix Version/s: 3.7
    • Component/s: Analytics
    • Labels:
    • Testing Instructions:
      Hide

      For this test you need to use an existing site with existing users. (This is required to make it easy to check that the predictions are generated from the first time the prediction is generated instead of from the moment when the user was created)

      1. Log in as admin
      2. Set up a course with at least 1 student enrolled and an assigment with due date in 2 days
      3. Go to site admin > analytics > analytics settings and untick onlycli setting
      4. Go to site admin > analytics > analytics models
      5. Click on "Actions > Edit" for the model "Upcoming activities due"
      6. Tick "Enabled", select "Upcoming 3 days" as "Time-splitting method" and save changes
      7. Click on "Actions > Get predictions" for the model "Upcoming activities due". Click on "Continue" once finished
      8. Select a user from the menu in the "Insights" column for the "Upcoming activities due" model
      9. The time displayed in the "Time predicted" row, in the "Prediction details" table SHOULD be just a few seconds ago.
      10. The time displayed in the "Time range" row, in the "Prediction details" table SHOULD be the same time than in "Time predicted" and the to ... part SHOULD be the same time but with +3 days
      Show
      For this test you need to use an existing site with existing users. (This is required to make it easy to check that the predictions are generated from the first time the prediction is generated instead of from the moment when the user was created) Log in as admin Set up a course with at least 1 student enrolled and an assigment with due date in 2 days Go to site admin > analytics > analytics settings and untick onlycli setting Go to site admin > analytics > analytics models Click on "Actions > Edit" for the model "Upcoming activities due" Tick "Enabled", select "Upcoming 3 days" as "Time-splitting method" and save changes Click on "Actions > Get predictions" for the model "Upcoming activities due". Click on "Continue" once finished Select a user from the menu in the "Insights" column for the "Upcoming activities due" model The time displayed in the "Time predicted" row, in the "Prediction details" table SHOULD be just a few seconds ago. The time displayed in the "Time range" row, in the "Prediction details" table SHOULD be the same time than in "Time predicted" and the to ... part SHOULD be the same time but with +3 days
    • Affected Branches:
      MOODLE_37_STABLE
    • Fixed Branches:
      MOODLE_37_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-65348_master

      Description

      This is a bug in the upcoming_periodic time-splitting method. The class starts generating time ranges from the analysable element start, which is the user timecreated. This is a problem, I will better illustrate it with an example:

      1. user1 was created on the 1st of March 2019, which was a Friday
      2. The Moodle site where user1 was created is upgraded to 3.7 (which includes the upcoming activities due insight) on Wednesday 3rd of March 2019
      3. That same day the cron runs and the first insights for upcoming activities due are generated. The time range used to search for upcoming activities due goes from Friday 1st of March to Friday 8th of March instead of going from Wednesday 3rd of March to next Wednesday

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dmonllao David Monllaó
              Reporter:
              dmonllao David Monllaó
              Peer reviewer:
              Víctor Déniz Falcón
              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:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                20/May/19

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days, 4 hours, 30 minutes
                  2d 4h 30m