Moodle
  1. Moodle
  2. MDL-35077

Navigation block do not display link to stats

    Details

    • Testing Instructions:
      Hide
      1. Log in as admin
      2. Navigate to Settings > Site admin > Advanced features
      3. Set Enable statistics (enablestats) to unchecked (set to no)
      4. Save settings
      5. VERIFY that Statistics DOES NOT appear under Navigation > Site pages > Reports
      6. VERIFY that Statistics DOES NOT appear under Navigation > Courses > CourseXXX > Reports
      7. Log in as a teacher
      8. Navigate to a course
      9. VERIFY that Statistics DOES NOT appear under Navigation > Courses > CourseXXX > Reports
      10. Log in as an admin
      11. Navigate to Settings > Site admin > Advanced features
      12. Set Enable statistics (enablestats) to checked (set to yes)
      13. Save settings
      14. VERIFY that Statistics DOES appear under Navigation > Site pages > Reports
      15. VERIFY that Statistics DOES appear under Navigation > Courses > CourseXXX > Reports
      16. Log in as a teacher
      17. Navigate to a course
      18. VERIFY that Statistics DOES appear under Navigation > Courses > CourseXXX > Reports
      19. Log in as admin
      20. Navigate to Settings > Site admin > Users > Permissions > Define roles
      21. Click the edit icon in the Teacher row
      22. Search for report/stats:view
      23. Uncheck Allow
      24. Click Save changes
      25. Log in as a teacher
      26. Navigate to a course
      27. VERIFY that Statistics DOES NOT appear under Navigation > Courses > CourseXXX > Reports
      28. Log in as admin
      29. Navigate to Settings > Site admin > Users > Permissions > Define roles
      30. Click the edit icon in the Teacher row
      31. Search for report/stats:view
      32. Check Allow
      33. Click Save changes
      34. Navigate to Settings > Site admin > Advanced features
      35. Set Enable statistics (enablestats) to unchecked (set to no)
      36. Save settings
      Show
      Log in as admin Navigate to Settings > Site admin > Advanced features Set Enable statistics (enablestats) to unchecked (set to no) Save settings VERIFY that Statistics DOES NOT appear under Navigation > Site pages > Reports VERIFY that Statistics DOES NOT appear under Navigation > Courses > CourseXXX > Reports Log in as a teacher Navigate to a course VERIFY that Statistics DOES NOT appear under Navigation > Courses > CourseXXX > Reports Log in as an admin Navigate to Settings > Site admin > Advanced features Set Enable statistics (enablestats) to checked (set to yes) Save settings VERIFY that Statistics DOES appear under Navigation > Site pages > Reports VERIFY that Statistics DOES appear under Navigation > Courses > CourseXXX > Reports Log in as a teacher Navigate to a course VERIFY that Statistics DOES appear under Navigation > Courses > CourseXXX > Reports Log in as admin Navigate to Settings > Site admin > Users > Permissions > Define roles Click the edit icon in the Teacher row Search for report/stats:view Uncheck Allow Click Save changes Log in as a teacher Navigate to a course VERIFY that Statistics DOES NOT appear under Navigation > Courses > CourseXXX > Reports Log in as admin Navigate to Settings > Site admin > Users > Permissions > Define roles Click the edit icon in the Teacher row Search for report/stats:view Check Allow Click Save changes Navigate to Settings > Site admin > Advanced features Set Enable statistics (enablestats) to unchecked (set to no) Save settings
    • Workaround:
      Hide

      Ensure that stats are enabled in the Advanced settings.

      The stats reports can be accessed via their URLs...

      http://yoursite/report/stats/index.php?course=XXX

      ...where yoursite is the URL of your Moodle site and XXX is the course id of the course you are interested in (1 for the whole site).

      Show
      Ensure that stats are enabled in the Advanced settings. The stats reports can be accessed via their URLs... http://yoursite/report/stats/index.php?course=XXX ...where yoursite is the URL of your Moodle site and XXX is the course id of the course you are interested in (1 for the whole site).
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w36_MDL-35077_m24_stats
    • Rank:
      43698

      Description

      Navigation block do not display MyCourses-Reports-Statistics for the teacher even if the statistics are enabled on the server and the editingteacher role has the capability report/stats:view allowed. When I am logged as admin, I can see the statistics graphs in Site Administration - Reports - Statistics.

        Issue Links

          Activity

          Hide
          Michael de Raadt added a comment - - edited

          This seems to have come about due to changes made in MDL-29030.

          When the Advanced setting for stats is disabled, the links to the stats reports appear and when the setting is enabled, the links disappear.

          I will attach a patch.

          Show
          Michael de Raadt added a comment - - edited This seems to have come about due to changes made in MDL-29030 . When the Advanced setting for stats is disabled, the links to the stats reports appear and when the setting is enabled, the links disappear. I will attach a patch.
          Hide
          Michael de Raadt added a comment -

          Note that this problem occurs regardless of roles or permissions.

          Show
          Michael de Raadt added a comment - Note that this problem occurs regardless of roles or permissions.
          Hide
          Michael de Raadt added a comment -

          This problem does not depend on whether stats have been set up properly or gathered by the cron process.

          Show
          Michael de Raadt added a comment - This problem does not depend on whether stats have been set up properly or gathered by the cron process.
          Hide
          Petr Škoda added a comment -

          thanks for the report and sorry for the trouble

          Show
          Petr Škoda added a comment - thanks for the report and sorry for the trouble
          Hide
          Peter Svec added a comment -

          Thanks for the patch. Now, the statistics link works as expected.

          Show
          Peter Svec added a comment - Thanks for the patch. Now, the statistics link works as expected.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Integrated (22, 23 & master), thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Integrated (22, 23 & master), thanks!
          Hide
          Ankit Agarwal added a comment - - edited

          This is failing at step 5
          VERIFY that Statistics DOES NOT appear under Navigation > Site pages > Reports

          Irrespective of the setting, I was able to see statistics there all the time as admin

          Rest of things works as expected.

          Show
          Ankit Agarwal added a comment - - edited This is failing at step 5 VERIFY that Statistics DOES NOT appear under Navigation > Site pages > Reports Irrespective of the setting, I was able to see statistics there all the time as admin Rest of things works as expected.
          Hide
          Petr Škoda added a comment -

          Antkit - I can see it only under "Site administration / Reports / ", not in the Navigation block.

          Anyway I have fixed it too and pushed 3 extra commits, thanks a lot for spotting it!

          Show
          Petr Škoda added a comment - Antkit - I can see it only under "Site administration / Reports / ", not in the Navigation block. Anyway I have fixed it too and pushed 3 extra commits, thanks a lot for spotting it!
          Hide
          Eloy Lafuente (stronk7) added a comment -

          re-integrated with extra commit fixing the reports thing.

          setting for testing again. Ankit, if you can confirm it works ok for you, TIA!

          (22, 23 & master), ciao

          Show
          Eloy Lafuente (stronk7) added a comment - re-integrated with extra commit fixing the reports thing. setting for testing again. Ankit, if you can confirm it works ok for you, TIA! (22, 23 & master), ciao
          Hide
          Ankit Agarwal added a comment -

          Works great now.
          Thanks

          Show
          Ankit Agarwal added a comment - Works great now. Thanks
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Many thanks for the hard work.

          These changes have been spread upstream and are already available in the git and cvs repositories.

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Many thanks for the hard work. These changes have been spread upstream and are already available in the git and cvs repositories. Ciao

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: