Moodle
  1. Moodle
  2. MDL-18426

Last access time does not display on activity report of courses at any time, by everybody ($coursecontext -> $context)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.9.4
    • Fix Version/s: None
    • Component/s: Course
    • Labels:
    • Testing Instructions:
      Hide
      1. Set the "lastaccess" user field to be a hidden field.
      2. Access the course outline report as a user who can view hidden fields.
      3. Verify that without the fix, the "lastaccess" field is missing. With the fix it is not missing from the report.
      Show
      Set the "lastaccess" user field to be a hidden field. Access the course outline report as a user who can view hidden fields. Verify that without the fix, the "lastaccess" field is missing. With the fix it is not missing from the report.
    • Workaround:
      1. Don't set the "lastaccess" field to be a hidden user field.
    • Affected Branches:
      MOODLE_19_STABLE
    • Rank:
      5065

      Description

      The cause of this bug is a just little mistake.

      in course/report/outline/index.php, line 23

      if (array_search('lastaccess', $hiddenfields) and !has_capability('moodle/user:viewhiddendetails', $coursecontext)) {

      $coursecontext -> $context

        Activity

        Hide
        Wen Hao Chuang added a comment -

        Just curious, is this still an issue in the latest 1.9.7+? Thanks!

        Show
        Wen Hao Chuang added a comment - Just curious, is this still an issue in the latest 1.9.7+? Thanks!
        Hide
        Michael de Raadt added a comment -

        Thanks for reporting this issue.

        We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.

        If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

        Michael d;

        lqjjLKA0p6

        Show
        Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d; lqjjLKA0p6
        Hide
        Michael de Raadt added a comment -

        I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

        Show
        Michael de Raadt added a comment - I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.
        Hide
        Mike Churchward added a comment -

        The only thing that needs to be fixed here to allow this report to work in the correct way is to change line 23 to:

        if (array_search('lastaccess', $hiddenfields) and !has_capability('moodle/user:viewhiddendetails', $context)) {

        Show
        Mike Churchward added a comment - The only thing that needs to be fixed here to allow this report to work in the correct way is to change line 23 to: if (array_search('lastaccess', $hiddenfields) and !has_capability('moodle/user:viewhiddendetails', $context)) {

          People

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

            Dates

            • Created:
              Updated:
              Resolved: