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

Include additional name fields in the user object

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.6.3
    • Component/s: Feedback
    • Labels:
    • Testing Instructions:
      Hide
      1. Activate the activity feedback in Site administration.
      2. Create a course with one or more students.
      3. Add an instance of the "Recent activity" block.
      4. Create a non anonymous feedback in this course.
      5. Login as one of the students and submit the feedback.
      6. Go to the "Recent activity" page by clicking on the link "Full report of recent ativity..."
      Show
      Activate the activity feedback in Site administration. Create a course with one or more students. Add an instance of the "Recent activity" block. Create a non anonymous feedback in this course. Login as one of the students and submit the feedback. Go to the "Recent activity" page by clicking on the link "Full report of recent ativity..."
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-44653_master

      Description

      On Recent Activity page, I am getting this error message:
      You need to update your sql to include additional name fields in the user object.
      line 3570 of \lib\moodlelib.php: call to debugging()
      line 475 of \mod\feedback\lib.php: call to fullname()
      line 171 of \course\recent.php: call to feedback_get_recent_mod_activity()

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            grabs Andreas Grabs added a comment -

            Hi Joseph,
            thank you for reporting this. I have fixed it and hope it will be integrated soon.
            Best regards
            Andreas

            Show
            grabs Andreas Grabs added a comment - Hi Joseph, thank you for reporting this. I have fixed it and hope it will be integrated soon. Best regards Andreas
            Hide
            abgreeve Adrian Greeve added a comment -

            Hello Andreas,

            May I possibly suggest perhaps a solution like the following:

            $userfields = user_picture::fields('u');
            $sql = " SELECT fk . * , fc . * , $userfields
                                           FROM {feedback_completed} fc
                                           JOIN {feedback} fk ON fk.id = fc.feedback
                                           JOIN {user} u ON u.id = fc.userid ";

            Just so that if any further changes are made with addition fields, this section of code will not have to be updated again.

            Show
            abgreeve Adrian Greeve added a comment - Hello Andreas, May I possibly suggest perhaps a solution like the following: $userfields = user_picture::fields('u'); $sql = " SELECT fk . * , fc . * , $userfields FROM {feedback_completed} fc JOIN {feedback} fk ON fk.id = fc.feedback JOIN {user} u ON u.id = fc.userid "; Just so that if any further changes are made with addition fields, this section of code will not have to be updated again.
            Hide
            cibot CiBoT added a comment -

            Moving this issue to current integration cycle, will be reviewed soon. Thanks for the hard work!

            Show
            cibot CiBoT added a comment - Moving this issue to current integration cycle, will be reviewed soon. Thanks for the hard work!
            Hide
            grabs Andreas Grabs added a comment -

            Hi Adrian,
            thank you for this hint! I wasn't aware of that.
            I now have changed it in the way you mentioned.
            Best regards
            Andreas

            Show
            grabs Andreas Grabs added a comment - Hi Adrian, thank you for this hint! I wasn't aware of that. I now have changed it in the way you mentioned. Best regards Andreas
            Hide
            marina Marina Glancy added a comment -

            Thanks Andreas but I have to reopen it.
            In this line
            https://github.com/grabs/moodle/blob/6da923f834407d3f3361f2e980c8d79bf2a2963c/mod/feedback/lib.php#L459

            you will use user id instead of feedback id.

            Show
            marina Marina Glancy added a comment - Thanks Andreas but I have to reopen it. In this line https://github.com/grabs/moodle/blob/6da923f834407d3f3361f2e980c8d79bf2a2963c/mod/feedback/lib.php#L459 you will use user id instead of feedback id.
            Hide
            grabs Andreas Grabs added a comment -

            Hi Marina,
            thank you so much for keeping your eyes on my code .
            I have fixed it.
            Best regards
            Andreas

            Show
            grabs Andreas Grabs added a comment - Hi Marina, thank you so much for keeping your eyes on my code . I have fixed it. Best regards Andreas
            Hide
            marina Marina Glancy added a comment -

            Thanks Andreas, integrated in 2.6 and master

            Show
            marina Marina Glancy added a comment - Thanks Andreas, integrated in 2.6 and master
            Hide
            salvetore Michael de Raadt added a comment -

            Test result: Passed.

            Tested in 2.6 and master.

            Show
            salvetore Michael de Raadt added a comment - Test result: Passed. Tested in 2.6 and master.
            Hide
            marina Marina Glancy added a comment -

            Thanks for your awesome code, it is now part of Moodle. Don't forget to submit another issue next week (and peer review two).

            Show
            marina Marina Glancy added a comment - Thanks for your awesome code, it is now part of Moodle. Don't forget to submit another issue next week (and peer review two).

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/May/14