Moodle
  1. Moodle
  2. MDL-35056

Improve or remove message "Your settings have been altered due to unmet dependencies"

    Details

    • Testing Instructions:
      Hide
      1. Log on to Moodle 2 site as admin
      2. SET UP SOURCE COURSE: Site Administration > Courses > Add/Edit Courses > Add a new course > fill in name course id etc. + save. (Nothing to do with IMS whatsoever)
      3. Select and enter any course
      4. From the Course Administration block, select 'Import'
      5. Continue with the import and it will complete successfully

      Repeat again with Developer debugging on and check for the debug message on the Import page

      Show
      Log on to Moodle 2 site as admin SET UP SOURCE COURSE: Site Administration > Courses > Add/Edit Courses > Add a new course > fill in name course id etc. + save. (Nothing to do with IMS whatsoever) Select and enter any course From the Course Administration block, select 'Import' Continue with the import and it will complete successfully Repeat again with Developer debugging on and check for the debug message on the Import page
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull from Repository:
    • Pull 2.4 Branch:
      wip-MDL-35056-stable24
    • Pull Master Branch:
      wip-MDL-35056-master
    • Rank:
      43673

      Description

      The message appears regardless of whether the course has content or not, regardless of theme, course layout, or any other settings.
      The import completes successfully, however the message appears if any course import is initiated.
      The issue reported to us by clients, and tested by us is that the message appears for no apparent reason and is causing confusion EVEN THOUGH the import completes successfully.

      Steps to reproduce:

      1. Log on to Moodle 2 site as admin
      2. SET UP SOURCE COURSE: Site Administration > Courses > Add/Edit Courses > Add a new course > fill in name course id etc. + save. (Nothing to do with IMS whatsoever)
      3. Select and enter any course
      4. From the Course Administration block, select 'Import'
      5. The first import screen appears with a message in red block letters on top of the screen: Your settings have been altered due to unmet dependencies
      6. Continue with the import and it will complete successfully

        Issue Links

          Activity

          Hide
          Lesli Smith added a comment -

          Hi, Zey. Long time! I was getting this message back in March on a 2.1 site until I figured this out (see pertinent email excerpt to someone else working on the site with me at that time):

          "Because I didn't want user data getting backed up in the automated backups, I'd turned it off in system defaults figuring that I could always just turn it back on in an individual backup when I needed to do so. Apparently that is not the case. I just turned it back on in defaults and no longer get that message."

          Once I flipped the switch for user data in automated backups back on, the message disappeared and I was able to back up courses manually without user data in them. However, I hadn't yet had to deal with the implications of what would happen on a live site with a LOT of user data getting backed up in automated backup cycles. In any case, hope this gets you closer to what you need to solve and where to go next with what to ask for from dev. Best,

          Lesli

          Show
          Lesli Smith added a comment - Hi, Zey. Long time! I was getting this message back in March on a 2.1 site until I figured this out (see pertinent email excerpt to someone else working on the site with me at that time): "Because I didn't want user data getting backed up in the automated backups, I'd turned it off in system defaults figuring that I could always just turn it back on in an individual backup when I needed to do so. Apparently that is not the case. I just turned it back on in defaults and no longer get that message." Once I flipped the switch for user data in automated backups back on, the message disappeared and I was able to back up courses manually without user data in them. However, I hadn't yet had to deal with the implications of what would happen on a live site with a LOT of user data getting backed up in automated backup cycles. In any case, hope this gets you closer to what you need to solve and where to go next with what to ask for from dev. Best, Lesli
          Hide
          Michael de Raadt added a comment -

          Hi, Zey.

          Does Lesli's advice help resolve your problem? Check your setting for backup_general_users. I wasn't able to replicate that.

          Has there been some change to the modules of your site between setting up your old course and this new one? Why is "IMS Common Cartridge 1.1" deselected?

          Show
          Michael de Raadt added a comment - Hi, Zey. Does Lesli's advice help resolve your problem? Check your setting for backup_general_users. I wasn't able to replicate that. Has there been some change to the modules of your site between setting up your old course and this new one? Why is "IMS Common Cartridge 1.1" deselected?
          Hide
          Zey Onalp added a comment -

          Hi:

          So the problem is occurring on all sites, not just one. Even if Leslie's solution worked it is not a viable solution since we have a lot of production/live sites, and making changes to the client backup settings without their knowledge/consent will not work here.

          In addition on the test sites autobackups are not enabled so I can't test Leslie's theory. In other words, the message is seen across the board on all sites, regardless of autobackup settings and also has been tested in PURE Moodle 2, not just Moodlerooms sites.
          The screen shot I sent you is from a pure Moodle 2 site, so you should be able to replicate this.
          Selecting or deselecting IMS is not affecting the issue.

          While this is a minor issue, we are getting support tickets from clients so your help would be appreciated.

          Show
          Zey Onalp added a comment - Hi: So the problem is occurring on all sites, not just one. Even if Leslie's solution worked it is not a viable solution since we have a lot of production/live sites, and making changes to the client backup settings without their knowledge/consent will not work here. In addition on the test sites autobackups are not enabled so I can't test Leslie's theory. In other words, the message is seen across the board on all sites, regardless of autobackup settings and also has been tested in PURE Moodle 2, not just Moodlerooms sites. The screen shot I sent you is from a pure Moodle 2 site, so you should be able to replicate this. Selecting or deselecting IMS is not affecting the issue. While this is a minor issue, we are getting support tickets from clients so your help would be appreciated.
          Hide
          Michael de Raadt added a comment -

          Hi, Zey.

          You said...

          The screen shot I sent you is from a pure Moodle 2 site, so you should be able to replicate this.

          ...which may be true, but it would be good to know how to replicate the problem, and until we do, it will be difficult to resolve the problem.

          If you could provide more clues, that would help.

          Show
          Michael de Raadt added a comment - Hi, Zey. You said... The screen shot I sent you is from a pure Moodle 2 site, so you should be able to replicate this. ...which may be true, but it would be good to know how to replicate the problem, and until we do, it will be difficult to resolve the problem. If you could provide more clues, that would help.
          Hide
          Zey Onalp added a comment -

          Steps to reproduce have been included above, hope this helps.
          Thanks.

          Show
          Zey Onalp added a comment - Steps to reproduce have been included above, hope this helps. Thanks.
          Hide
          Michael de Raadt added a comment -

          Hi, Zey.

          Thanks for adding more information.

          I was not able to replicate the problem. There must be something particular about the course you are importing from or to.

          Show
          Michael de Raadt added a comment - Hi, Zey. Thanks for adding more information. I was not able to replicate the problem. There must be something particular about the course you are importing from or to.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Hi all, here there is:

          One explanation:

          Backup settings are highly "connected", so changing one of them, has an immediate effect on others. The most common one is "include users info" (commented by Lesli above). That setting has a lot of dependent setting, mainly all the sections and activities "include users info" ones.

          By definition, import operations are performed without users info, so the main "include users info" is set (internally) to "No". That fires automatically all the dependencies commented above, so all those dependent settings are also set to "No" and locked.

          And the message about "your settings have been altered due to unmet dependencies" is just telling that such automatic change of settings has happened. Just that. Each time the dependencies / rules / security permissions are evaluated and that lead to change one setting value, that message is displayed.

          One possible solution:

          Take rid of the message. Settings are already shown with their status and one "lock" icon bringing an explanation for the lock. Perhaps we could keep the message only under debug mode.

          Another possible solution:

          Try to modify import so initial settings are already set to "No" so nothing will be changed automatically, so the message won't be printed. Tricky to achieve.

          And another:

          Modify the message to be more explanatory. Complex too, because dependencies and security causes leading to automatic change of settings are a lot.

          So surely... the 1st solution is the simpler and best one. Comments?

          Show
          Eloy Lafuente (stronk7) added a comment - Hi all, here there is: One explanation: Backup settings are highly "connected", so changing one of them, has an immediate effect on others. The most common one is "include users info" (commented by Lesli above). That setting has a lot of dependent setting, mainly all the sections and activities "include users info" ones. By definition, import operations are performed without users info, so the main "include users info" is set (internally) to "No". That fires automatically all the dependencies commented above, so all those dependent settings are also set to "No" and locked. And the message about "your settings have been altered due to unmet dependencies" is just telling that such automatic change of settings has happened. Just that. Each time the dependencies / rules / security permissions are evaluated and that lead to change one setting value, that message is displayed. One possible solution: Take rid of the message. Settings are already shown with their status and one "lock" icon bringing an explanation for the lock. Perhaps we could keep the message only under debug mode. Another possible solution: Try to modify import so initial settings are already set to "No" so nothing will be changed automatically, so the message won't be printed. Tricky to achieve. And another: Modify the message to be more explanatory. Complex too, because dependencies and security causes leading to automatic change of settings are a lot. So surely... the 1st solution is the simpler and best one. Comments?
          Hide
          Chris Follin added a comment -

          Removing the message is fine with us. It doesn't impact the process and in practice only confuses users, so I say get rid of it.

          Show
          Chris Follin added a comment - Removing the message is fine with us. It doesn't impact the process and in practice only confuses users, so I say get rid of it.
          Hide
          Kris Stokking added a comment -

          There are two problems afoot - the source of Zey's specific problem appears to be the imscc11 setting that is added in backup_root_task::define_settings. We'll have that setting removed from the import screen in a separate ticket, as the format will always be Moodle2.

          The second issue is with the error message itself, which suffers from being too vague for end users. If the suggestion is to remove that error message from all screens (or display only under debug mode) because a user's selected settings will never change, then that's a fine suggestion. On the other hand, if a user is ever able to establish settings that are changed in a subsequent step in the process, then the message is useful and should not be removed, and I would instead suggest more detail (option #3). Ultimately, what we want to prevent is a case where users receive the error message and don't know what it means nor how to fix it.

          Show
          Kris Stokking added a comment - There are two problems afoot - the source of Zey's specific problem appears to be the imscc11 setting that is added in backup_root_task::define_settings. We'll have that setting removed from the import screen in a separate ticket, as the format will always be Moodle2. The second issue is with the error message itself, which suffers from being too vague for end users. If the suggestion is to remove that error message from all screens (or display only under debug mode) because a user's selected settings will never change, then that's a fine suggestion. On the other hand, if a user is ever able to establish settings that are changed in a subsequent step in the process, then the message is useful and should not be removed, and I would instead suggest more detail (option #3). Ultimately, what we want to prevent is a case where users receive the error message and don't know what it means nor how to fix it.
          Hide
          Michael de Raadt added a comment - - edited

          It looks like we have a specific cause, being IMS resources. If there are other things in a course that cause this message, it would be good to know.

          I've changed the title of this message. I suspect the most likely outcome will be removing this message if it's not helpful, unless we can gather enough information to make it meaningful.

          We have a link to Kris's issue that will attempt to deal with the underlying cause.

          Show
          Michael de Raadt added a comment - - edited It looks like we have a specific cause, being IMS resources. If there are other things in a course that cause this message, it would be good to know. I've changed the title of this message. I suspect the most likely outcome will be removing this message if it's not helpful, unless we can gather enough information to make it meaningful. We have a link to Kris's issue that will attempt to deal with the underlying cause.
          Hide
          Michael de Raadt added a comment -

          It would be good if we could clarify step 2 in the reproduction steps. This will be necessary to reproduce the issue and later to test the fix.

          Show
          Michael de Raadt added a comment - It would be good if we could clarify step 2 in the reproduction steps. This will be necessary to reproduce the issue and later to test the fix.
          Hide
          Michael de Raadt added a comment -

          Hi, Zey.

          I noted that you modified the replication steps stating that nothing special had to happen at set up. This cannot be correct otherwise we would be seeing this message with every course restore. It would be good if we can isolate one or more triggers for this.

          Show
          Michael de Raadt added a comment - Hi, Zey. I noted that you modified the replication steps stating that nothing special had to happen at set up. This cannot be correct otherwise we would be seeing this message with every course restore. It would be good if we can isolate one or more triggers for this.
          Hide
          Zey Onalp added a comment -

          Hi Michael:

          I have tested this on several sites including a pure Moodle 2 site, (without Joule or any extra features), and so have our developers. We DO see it in every course restore/import function which is why we opened this Tracker.
          This is happening in all courses regardless of whether they contain any data, users, etc.
          As indicated in my replication steps above, it occurs even when a new blank course is created on an empty site.
          I'm not sure what other information I can provide for you, but please let me know if you have any suggestions.

          Show
          Zey Onalp added a comment - Hi Michael: I have tested this on several sites including a pure Moodle 2 site, (without Joule or any extra features), and so have our developers. We DO see it in every course restore/import function which is why we opened this Tracker. This is happening in all courses regardless of whether they contain any data, users, etc. As indicated in my replication steps above, it occurs even when a new blank course is created on an empty site. I'm not sure what other information I can provide for you, but please let me know if you have any suggestions.
          Hide
          Michael de Raadt added a comment -

          Hi, Zey.

          I have seen this message, so I'm not denying its existence, however when I attempt to replicate this on my Moodle 2.2 or master test sites, or on demo.moodle.net, the warning does not appear. As I'm running default Moodle settings, I assume that either your code has been customised or your default settings are different.

          Show
          Michael de Raadt added a comment - Hi, Zey. I have seen this message, so I'm not denying its existence, however when I attempt to replicate this on my Moodle 2.2 or master test sites, or on demo.moodle.net, the warning does not appear. As I'm running default Moodle settings, I assume that either your code has been customised or your default settings are different.
          Hide
          Chris Follin added a comment -

          Michael and Zey,

          I can reproduce the problem easily on 2.2.3 but I cannot reproduce it on the latest 22_STABLE.

          Show
          Chris Follin added a comment - Michael and Zey, I can reproduce the problem easily on 2.2.3 but I cannot reproduce it on the latest 22_STABLE.
          Hide
          Jason Fowler added a comment -

          My plan for this issue is to make it a debug only message. At present though, I have been unable to reproduce the message. Will continue trying new strange ways, but without reproductions steps that work for me, I can't test the changes.

          Show
          Jason Fowler added a comment - My plan for this issue is to make it a debug only message. At present though, I have been unable to reproduce the message. Will continue trying new strange ways, but without reproductions steps that work for me, I can't test the changes.
          Hide
          Rossiani Wijaya added a comment -

          Hi Jason,

          The patch looks fine. You might also want to change it for /course/publish/backup.php.

          I think this should be backported to 2.2 and 2.3.

          [y] Syntax
          [-] Output
          [y] Whitespace
          [-] Language
          [-] Databases
          [-] Testing
          [-] Security
          [-] Documentation
          [y] Git
          [y] Sanity check

          Show
          Rossiani Wijaya added a comment - Hi Jason, The patch looks fine. You might also want to change it for /course/publish/backup.php. I think this should be backported to 2.2 and 2.3. [y] Syntax [-] Output [y] Whitespace [-] Language [-] Databases [-] Testing [-] Security [-] Documentation [y] Git [y] Sanity check
          Hide
          Jason Fowler added a comment -

          thanks Rossi, will make the change then backport and push

          Show
          Jason Fowler added a comment - thanks Rossi, will make the change then backport and push
          Hide
          Jason Fowler added a comment -

          Changes made, back ported, and now pushed

          Show
          Jason Fowler added a comment - Changes made, back ported, and now pushed
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Oh, sorry, I don't think the debugging(get_string(...)) is a good combination. IMO we should not be translating debugging messages at all. I don't think there are many uses of that right now in core and they should be zero some day.

          Also, once the phrase is out, for sure the master (not the stables) version of the patch should include the deletion of the phrase from the lang file.

          Note that, surely, this needs discussion and, once done, officially state it both in the debugging() phpdocs and in the Coding style Docs page. Surely the same applies to error_log() and or trigger_error().

          Please, discuss that there, I'm reopening this until it's decided.

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Oh, sorry, I don't think the debugging(get_string(...)) is a good combination. IMO we should not be translating debugging messages at all. I don't think there are many uses of that right now in core and they should be zero some day. Also, once the phrase is out, for sure the master (not the stables) version of the patch should include the deletion of the phrase from the lang file. Note that, surely, this needs discussion and, once done, officially state it both in the debugging() phpdocs and in the Coding style Docs page. Surely the same applies to error_log() and or trigger_error(). Please, discuss that there, I'm reopening this until it's decided. Ciao
          Hide
          Dan Poltawski added a comment -

          Sorry, the get_string thing is my fault for saying it could just be left there.

          Show
          Dan Poltawski added a comment - Sorry, the get_string thing is my fault for saying it could just be left there.
          Hide
          Jason Fowler added a comment -

          I don't think the string can be completely removed - it is used else where to notify users that they don't have access to the data in the blogs. Will definitely remove it from the debugging though.

          Show
          Jason Fowler added a comment - I don't think the string can be completely removed - it is used else where to notify users that they don't have access to the data in the blogs. Will definitely remove it from the debugging though.
          Hide
          Jason Fowler added a comment -

          I had this issue confused with another one, thinking it was me adding the blog error. will look into the usage of this string for removal in master.

          Show
          Jason Fowler added a comment - I had this issue confused with another one, thinking it was me adding the blog error. will look into the usage of this string for removal in master.
          Hide
          Jason Fowler added a comment -

          All the changes have now been made Eloy.

          Show
          Jason Fowler added a comment - All the changes have now been made Eloy.
          Hide
          Sam Hemelryk added a comment -

          Hi Jason, this has been integrated now.
          Noting that while we need to remove the string we also need to keep MOODLE_24_STABLE and master identical.
          Because of this I've cherry-picked just the commit for the debugging call and will open a new issue to remove the string from master once as are out of the sync period.

          Many thanks
          Sam

          Show
          Sam Hemelryk added a comment - Hi Jason, this has been integrated now. Noting that while we need to remove the string we also need to keep MOODLE_24_STABLE and master identical. Because of this I've cherry-picked just the commit for the debugging call and will open a new issue to remove the string from master once as are out of the sync period. Many thanks Sam
          Hide
          Sam Hemelryk added a comment -

          Have created MDL-37203 and produced a branch by cherry-picking the commit to remove the string.

          Show
          Sam Hemelryk added a comment - Have created MDL-37203 and produced a branch by cherry-picking the commit to remove the string.
          Hide
          Jason Fowler added a comment -

          Thanks Sam, completely forgot about the sync

          Show
          Jason Fowler added a comment - Thanks Sam, completely forgot about the sync
          Hide
          David Monllaó added a comment -

          Passing it after talking with Jason, I've been unable to reproduce the problem, the import finishes without any echo nor debugging message in 22, 23 and master sites with default configuration.

          Show
          David Monllaó added a comment - Passing it after talking with Jason, I've been unable to reproduce the problem, the import finishes without any echo nor debugging message in 22, 23 and master sites with default configuration.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Changes are now upstream, thanks for your collaboration!

          If you are going to have any celebration next days, enjoy with your gang, if not, too!

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Changes are now upstream, thanks for your collaboration! If you are going to have any celebration next days, enjoy with your gang, if not, too! Ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved: