Moodle
  1. Moodle
  2. MDL-26960

Admins see too many sources when editing other users messaging preferences

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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
            峰张 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
            峰张 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
            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
            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
            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
            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
            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
            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
            Dan Poltawski added a comment -

            Makes sense, should've thought of that..

            Show
            Dan Poltawski added a comment - Makes sense, should've thought of that..
            Hide
            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
            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
            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
            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
            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
            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
            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
            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
            Eloy Lafuente (stronk7) added a comment -

            (setting this back to test failed)

            Show
            Eloy Lafuente (stronk7) added a comment - (setting this back to test failed)
            Hide
            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
            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
            Eloy Lafuente (stronk7) added a comment -

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

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

            title and description updated as agreed.

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

            passing tests, thanks!

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

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

            Closing.

            Show
            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: