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

Admins see too many sources when editing other users messaging preferences

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.2, 2.1
    • Fix Version/s: 2.0.4
    • Component/s: Messages
    • Labels:

      Description

      When an admin edits a user's messaging settings message/edit.php several incorrect incoming messages sources are listed e.g. 'Important errors with the site' (when the user only has the role of student).

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            arthurbryant 峰张 added a comment -

            I login as admin. But I did not find a place where I can edit a user's messaging settings. It seems like I can only edit my own message settings. Can you tell me exactly how you did it?

            Show
            arthurbryant 峰张 added a comment - I login as admin. But I did not find a place where I can edit a user's messaging settings. It seems like I can only edit my own message settings. Can you tell me exactly how you did it?
            Hide
            andyjdavis Andrew Davis added a comment -

            If you go to a user's profile in the settings block there will be "Profile settings for (user name)". Click on messaging under that. That will take you to their message preferences.

            Show
            andyjdavis Andrew Davis added a comment - If you go to a user's profile in the settings block there will be "Profile settings for (user name)". Click on messaging under that. That will take you to their message preferences.
            Hide
            poltawski Dan Poltawski added a comment -

            Pushed a fix as specified. Not sure if we would want to do something differnt for the stable branch, since i'm changing a lib function name?

            Show
            poltawski Dan Poltawski added a comment - Pushed a fix as specified. Not sure if we would want to do something differnt for the stable branch, since i'm changing a lib function name?
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Thanks Dan - this has been integrated now.
            I did however add the message_get_my_providers function back , made it call message_get_providers_for_user and marked it deprecated (with a todo to remove it in 2.2) just in case someone out there is already using it.

            Cheers
            Sam

            Show
            samhemelryk Sam Hemelryk added a comment - Thanks Dan - this has been integrated now. I did however add the message_get_my_providers function back , made it call message_get_providers_for_user and marked it deprecated (with a todo to remove it in 2.2) just in case someone out there is already using it. Cheers Sam
            Hide
            poltawski Dan Poltawski added a comment -

            Makes sense, should've thought of that..

            Show
            poltawski Dan Poltawski added a comment - Makes sense, should've thought of that..
            Hide
            tsala Helen Foster added a comment -

            Tested on local 2.0.3+ site, logged in as admin, browsed to student in course then Settings > Profile settings for Sam Student > Messaging.

            Obtained the following message:

            Invalid get_string() identifier: 'messageprovider:message' or component 'mod_feedback'

            • line 5891 of /lib/moodlelib.php: call to debugging()
            • line 6481 of /lib/moodlelib.php: call to core_string_manager->get_string()
            • line 222 of /message/edit.php: call to get_string()

            Also 'Course creation request approval notification','Course creation request rejection notification' and 'Feedback notification' settings were listed, even though course requests and the feedback module are not enabled for the site.

            Finally there was a setting listed as '[[messageprovider:message]]'.

            Show
            tsala Helen Foster added a comment - Tested on local 2.0.3+ site, logged in as admin, browsed to student in course then Settings > Profile settings for Sam Student > Messaging. Obtained the following message: Invalid get_string() identifier: 'messageprovider:message' or component 'mod_feedback' line 5891 of /lib/moodlelib.php: call to debugging() line 6481 of /lib/moodlelib.php: call to core_string_manager->get_string() line 222 of /message/edit.php: call to get_string() Also 'Course creation request approval notification','Course creation request rejection notification' and 'Feedback notification' settings were listed, even though course requests and the feedback module are not enabled for the site. Finally there was a setting listed as '[ [messageprovider:message] ]'.
            Hide
            poltawski Dan Poltawski added a comment -

            Ah, that bug has been spotted before in other bugs, and we never created the bug for it. I've just created: MDL-27853, I would fix it myself although i'm not sure wjhat the correct description is for that string

            Show
            poltawski Dan Poltawski added a comment - Ah, that bug has been spotted before in other bugs, and we never created the bug for it. I've just created: MDL-27853 , I would fix it myself although i'm not sure wjhat the correct description is for that string
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Thanks for "feedback" (LOL), Dan.

            I think it is perfect to have that missing lang addressed in separate issue so now we can safely pass this. I hope Andreas will take a look and fix it with the correct meaning.

            Thanks for testing, Helen!

            So passing... one less to go!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Thanks for "feedback" (LOL), Dan. I think it is perfect to have that missing lang addressed in separate issue so now we can safely pass this. I hope Andreas will take a look and fix it with the correct meaning. Thanks for testing, Helen! So passing... one less to go!
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Oh, I'm deleting my last comment there, I confused the issues and thought this was about messaging in general.

            Testing results by Helen cleary says that incorrect sources continue being listed and that was the primary goal for this issue. So no way it can be delegated to another issue (as I commented in my previous comment), must be fixed here!

            Sorry for the confusion, I really mixed issues in my mind! Also, testing instructions seem somehow limited. They should be about to enable/disable course requests, feedback... and check it causes no related messaging options to be shown.

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Oh, I'm deleting my last comment there, I confused the issues and thought this was about messaging in general. Testing results by Helen cleary says that incorrect sources continue being listed and that was the primary goal for this issue. So no way it can be delegated to another issue (as I commented in my previous comment), must be fixed here! Sorry for the confusion, I really mixed issues in my mind! Also, testing instructions seem somehow limited. They should be about to enable/disable course requests, feedback... and check it causes no related messaging options to be shown. Ciao
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            (setting this back to test failed)

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - (setting this back to test failed)
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            OKi, after chatting with Helen and Dan this is what we've agreed:

            1) This issue has fixed the problem with admins editing user profiles and viewing "too many" providers. Now works ok, so we are going to change the title and the description of it, to get it passed.

            2) This issue has NOT fixed the problem about providers being available no matter if underlying subsystems / plugins are enabled or no (course requests, feedback module). New issue is going to be created about that.

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - OKi, after chatting with Helen and Dan this is what we've agreed: 1) This issue has fixed the problem with admins editing user profiles and viewing "too many" providers. Now works ok, so we are going to change the title and the description of it, to get it passed. 2) This issue has NOT fixed the problem about providers being available no matter if underlying subsystems / plugins are enabled or no (course requests, feedback module). New issue is going to be created about that. Ciao
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            MDL-27870 created about to observe the subsystem/plugin status.

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - MDL-27870 created about to observe the subsystem/plugin status.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            title and description updated as agreed.

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - title and description updated as agreed.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            passing tests, thanks!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - passing tests, thanks!
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            And now this is part of the best Moodle weeklies ever, thanks!

            Closing.

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - And now this is part of the best Moodle weeklies ever, thanks! Closing.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  1/Aug/11