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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 3.7
    • 3.7
    • Analytics
    • MOODLE_37_STABLE
    • MOODLE_37_STABLE
    • MDL-65348_master
    • 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

      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

            dmonllao David Monllaó
            dmonllao David Monllaó
            Victor Déniz Falcón Victor Déniz Falcón
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                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

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