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

Remove chat and survey analytics indicators in models for sites that are not using chat and survey modules

XMLWordPrintable

    • MOODLE_500_STABLE
    • MOODLE_500_STABLE
    • MDL-84131-main
    • Hide

      Test 1 - No error after upgrading from main

      1. In a Moodle site without the patch (for instance, you can run git checkout 89d76fdc25ead41d29253972c45268a21dae7633), copy the addoldindicators.phpin your current installation.
      2. Run :

        php addoldindicators.php

      3. Login as admin.
      4. Go to Site administration > Advanced feature, enable Analytics and Save changes.
      5. Go to Site administration > Analytics > Analytics models (admin/tool/analytics/index.php)
      6. Check that there is a debug message
      7. Change your site to use this patch.
      8. Update the site (php admin/cli/upgrade.php)
      9. Check the page again and ensure there is no warning related to missing indicators for chat and survey

      Test 2 - Upgrading from a version with core chat and survey

      1. Create a new 4.4 Moodle version
      2. Import the model attached to this ticket twice 
      3. Edit one of the imported model so to add an indicator that is not related to chat and survey
      4. Log in as admin and activate DEVELOPER debugging level in Site administration > Development > Debugging
      5. Navigate to Site administration > Analytics > Analytics models
      6. Confirm there are no debug messages.
      7. Change your site to use this patch.
      8. Navigate to Site administration > Analytics > Analytics models
      9. Confirm there are no debug messages.
      10. Confirm: on the two imported indicator, one has one indicator left and the other one 0 (because it was all chat and survey related)


       

      Show
      Test 1 - No error after upgrading from main In a Moodle site without the patch (for instance, you can run git checkout 89d76fdc25ead41d29253972c45268a21dae7633), copy the addoldindicators.php in your current installation. Run : php addoldindicators.php Login as admin. Go to Site administration > Advanced feature, enable Analytics and Save changes. Go to Site administration > Analytics > Analytics models (admin/tool/analytics/index.php) Check that there is a debug message Change your site to use this patch. Update the site (php admin/cli/upgrade.php) Check the page again and ensure there is no warning related to missing indicators for chat and survey Test 2 - Upgrading from a version with core chat and survey Create a new 4.4 Moodle version Import the model attached to this ticket twice  Edit one of the imported model so to add an indicator that is not related to chat and survey Log in as admin and activate DEVELOPER debugging level in Site administration > Development > Debugging Navigate to Site administration > Analytics > Analytics models Confirm there are no debug messages. Change your site to use this patch. Navigate to Site administration > Analytics > Analytics models Confirm there are no debug messages. Confirm : on the two imported indicator, one has one indicator left and the other one 0 (because it was all chat and survey related)  
    • Hide

      Code verified against automated checks.

      Checked MDL-84131 using repository: https://github.com/laurentdavid/moodle.git

      More information about this report

      Built on: Mon Mar 24 15:51:16 UTC 2025

      Show
      Code verified against automated checks. Checked MDL-84131 using repository: https://github.com/laurentdavid/moodle.git main (0 errors / 0 warnings) [branch: MDL-84131-main | CI Job ] More information about this report Built on: Mon Mar 24 15:51:16 UTC 2025
    • Show
      Launching automatic jobs for branch MDL-84131 -main https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/18723/ PHPUnit (sqlsrv) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/64142/ Behat (NonJS - boost and classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/64144/ Behat (Firefox - boost) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/64146/ Behat (Firefox - classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/64147/ App tests (stable app version) Built on: Thu Mar 20 12:31:59 UTC 2025
    • 2
    • HQ 2025 Sprint I1.1 Moppies

      Students at risk of dropping out is using by default Chat cognitive, Chat social, Survey cognitive and Survey social indicators. 

      But as we are removing chat and survey modules from core in MDL-82457, analytics throws a warning or an error.

       

      We should remove this indicators by default in sites were we removed chat and/or survey.

       

      Steps to reproduce:  This happens when the site has been upgraded from a version that contains mod_chat and/or mod_survey

        1. addoldindicators.php
          0.9 kB
        2. image-2025-01-09-10-08-32-941.png
          image-2025-01-09-10-08-32-941.png
          175 kB
        3. image-2025-02-12-17-54-02-200.png
          image-2025-02-12-17-54-02-200.png
          83 kB
        4. MDL-84131- upgrading main.png
          MDL-84131- upgrading main.png
          479 kB
        5. MDL-84131 - version with core chat.png
          MDL-84131 - version with core chat.png
          460 kB
        6. model-chatsurvey.zip
          0.3 kB
        7. screenshot-1.png
          screenshot-1.png
          32 kB
        8. screenshot-2.png
          screenshot-2.png
          32 kB

            laurent.david@moodle.com Laurent David
            amaia Amaia Anabitarte
            Amaia Anabitarte Amaia Anabitarte
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 1 hour, 35 minutes
                1d 1h 35m

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