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

Course page: Text greyed when conditional activity available

    Details

    • Testing Instructions:
      Hide
      1. In advanced features, turn on completion and conditional availability.
      2. Create new course with default settings except turn on completion.
      3. Create a new Page in the course with default settings, manual completion.
      4. Create a new Label with default settings except under 'Restrict access' set it to require the Page to be complete. (Leave it as 'show greyed out' when not available.)
      5. Log in as an enrolled student
      6. Make sure the label is greyed out and there is text that says it isn't available until you complete the page.
      7. Mark Page as completed
      8. Make sure the label is no longer greyed out and the 'not available yet' text disappears.
      Show
      In advanced features, turn on completion and conditional availability. Create new course with default settings except turn on completion. Create a new Page in the course with default settings, manual completion. Create a new Label with default settings except under 'Restrict access' set it to require the Page to be complete. (Leave it as 'show greyed out' when not available.) Log in as an enrolled student Make sure the label is greyed out and there is text that says it isn't available until you complete the page. Mark Page as completed Make sure the label is no longer greyed out and the 'not available yet' text disappears.
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull Master Branch:
      MDL-40320-master

      Description

      Clearer steps to reproduce (from clean MOODLE_25_STABLE install):

      0. In advanced features, turn on completion and conditional availability.
      1. Create new course with default settings except turn on completion.
      2. Create a new Page in the course with default settings.
      3. Create a new Label with default settings except under 'Restrict access' set it to require the Page to be complete. (Leave it as 'show greyed out' when not available.)
      4. Enrol a test account as student in course.
      5. Log out.
      6. Log in using the username/password of the test account.

      EXPECTED:

      The label is greyed out and there is text that says it isn't available until you complete the page.

      7. Click the button next to the Page.

      EXPECTED:

      The label is no longer greyed out and the 'not available yet' text disappears.

      BEFORE FIX:

      The text disappears as expected, but the label remains greyed out.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            asads Andrew Sadler added a comment -
            Show
            asads Andrew Sadler added a comment - https://tracker.moodle.org/browse/MDLQA-5412 this issue is also discussed here. and here https://moodle.org/mod/forum/discuss.php?d=226274
            Hide
            lazydaisy Mary Evans added a comment -

            Hi Andrew,

            Thank you for reporting this. I am just about to try and replicate the issue so that I have a better understanding of the problem.

            Thanks
            Mary

            Show
            lazydaisy Mary Evans added a comment - Hi Andrew, Thank you for reporting this. I am just about to try and replicate the issue so that I have a better understanding of the problem. Thanks Mary
            Hide
            lazydaisy Mary Evans added a comment -

            In answer to how to add a Link, you will find the link option in the "More actions" drop-down menu list.

            Show
            lazydaisy Mary Evans added a comment - In answer to how to add a Link, you will find the link option in the "More actions" drop-down menu list.
            Hide
            asads Andrew Sadler added a comment - - edited

            I'm assuming this issue will be resolved according to the discussion linked, I'm not sure what is meant by 2.5beta? Will this be released second Monday of July?

            Nicolas Martignoni added a comment - 19/Apr/13 4:01 PM

            Confirming that this works on a fresh updated to last 2.5beta.

            Marking as passed.

            Show
            asads Andrew Sadler added a comment - - edited I'm assuming this issue will be resolved according to the discussion linked, I'm not sure what is meant by 2.5beta? Will this be released second Monday of July? Nicolas Martignoni added a comment - 19/Apr/13 4:01 PM Confirming that this works on a fresh updated to last 2.5beta. Marking as passed.
            Hide
            lazydaisy Mary Evans added a comment -

            Well I am testing this on 2.6 and all theme are failing. I need to check that QA discussion.

            Show
            lazydaisy Mary Evans added a comment - Well I am testing this on 2.6 and all theme are failing. I need to check that QA discussion.
            Hide
            lynn.harvey Lynn Harvey added a comment -

            This also effects images which I am using in a label like a badge. They appear when the conditions are met but display greyed-out.

            Show
            lynn.harvey Lynn Harvey added a comment - This also effects images which I am using in a label like a badge. They appear when the conditions are met but display greyed-out.
            Hide
            shirl shirley crawford added a comment -

            I am not sure if my problem is related, but I have a 2.5 course. If I set up a label to appear at the end of the course when a percentage score in a quiz has been met, this label is completely hidden and cannot be seen by the learner, but when the get the required score the label does not appear, however if I set the label to be greyed out with restricted information it does appear when the score is reached.

            I have also tested this out with an image and a Moodle webpage and it all works fine, it just seems to be a problem with labels.

            Show
            shirl shirley crawford added a comment - I am not sure if my problem is related, but I have a 2.5 course. If I set up a label to appear at the end of the course when a percentage score in a quiz has been met, this label is completely hidden and cannot be seen by the learner, but when the get the required score the label does not appear, however if I set the label to be greyed out with restricted information it does appear when the score is reached. I have also tested this out with an image and a Moodle webpage and it all works fine, it just seems to be a problem with labels.
            Hide
            lazydaisy Mary Evans added a comment -

            @Sam Marshall, I have just added you as a watcher, and wondering if you could comment here as there appears to be a problem with labels still being greyed out when conditional activities have been met.

            I'm beginning to wonder if the logic of the argument is wrong.

            Show
            lazydaisy Mary Evans added a comment - @Sam Marshall, I have just added you as a watcher, and wondering if you could comment here as there appears to be a problem with labels still being greyed out when conditional activities have been met. I'm beginning to wonder if the logic of the argument is wrong.
            Hide
            roelmann Richard Oelmann added a comment -

            Using Moodle 2.5+ (Build: 20130627)and I can't replicate this on Standard, Clean (or Krystle)
            I set up a label that the student could mark as complete. I then set up a file resource to be hidden until the label was marked complete and a second file to be greyed out until the label was marked complete
            Logged in as a student, one file hidden, one greyed out (as expected). Marked the label as complete, both activities released in all themes (none greyed out)
            Then set up a simple quiz with the same file resources (changed the restrict access conditions to depend on the quiz) Again both were hidden intially and both were released as expected when the quiz was complete.
            This is as it was when tested during the 2.5 QA round.
            Seems to work on my 2.6 (2.6dev Build 20130704) too
            Is there something more specific than i am doing which is causing this fault?
            Richard

            Show
            roelmann Richard Oelmann added a comment - Using Moodle 2.5+ (Build: 20130627)and I can't replicate this on Standard, Clean (or Krystle) I set up a label that the student could mark as complete. I then set up a file resource to be hidden until the label was marked complete and a second file to be greyed out until the label was marked complete Logged in as a student, one file hidden, one greyed out (as expected). Marked the label as complete, both activities released in all themes (none greyed out) Then set up a simple quiz with the same file resources (changed the restrict access conditions to depend on the quiz) Again both were hidden intially and both were released as expected when the quiz was complete. This is as it was when tested during the 2.5 QA round. Seems to work on my 2.6 (2.6dev Build 20130704) too Is there something more specific than i am doing which is causing this fault? Richard
            Hide
            physiart George Panagiotakopoulos added a comment -

            I am using Boxxie theme and I am facing the same problem. I have set up some labels working like badges which are assigned to my students when they successfully complete a series of quizzes. The labels are completely hidden for my students at the beginning but after they successfully complete the series of quizzes the labels appear being greyed out to them.

            Show
            physiart George Panagiotakopoulos added a comment - I am using Boxxie theme and I am facing the same problem. I have set up some labels working like badges which are assigned to my students when they successfully complete a series of quizzes. The labels are completely hidden for my students at the beginning but after they successfully complete the series of quizzes the labels appear being greyed out to them.
            Hide
            physiart George Panagiotakopoulos added a comment -

            Using Moodle 2.5+ (Build: 20130524)

            Show
            physiart George Panagiotakopoulos added a comment - Using Moodle 2.5+ (Build: 20130524)
            Hide
            andreabix Andrea Bicciolo added a comment -

            Hello, the issue is also present in version Moodle 2.5.1 (Build: 20130708)

            Show
            andreabix Andrea Bicciolo added a comment - Hello, the issue is also present in version Moodle 2.5.1 (Build: 20130708)
            Hide
            asads Andrew Sadler added a comment -

            @Richard Oelmann The issue is with labels or descriptions not with activity names. Add a description to the activity and set to display on course page. Confirmed this remains an issue in 2.5.1.

            Show
            asads Andrew Sadler added a comment - @Richard Oelmann The issue is with labels or descriptions not with activity names. Add a description to the activity and set to display on course page. Confirmed this remains an issue in 2.5.1.
            Hide
            quen Sam Marshall added a comment -

            I've updated the description with a clearer set of reproduce instructions. Now taking a look at this issue.

            Show
            quen Sam Marshall added a comment - I've updated the description with a clearer set of reproduce instructions. Now taking a look at this issue.
            Hide
            quen Sam Marshall added a comment -

            Requesting peer review for this fix (same change for 2.5 and master branches).

            The logic was wrong in the function I have changed; there is code to ensure that things are greyed out when editing to indicate that it may be unavailable for some users, but this was also being used when not editing! When not editing, you should see the result for yourself, not for theoretical other users.

            I also added comments to make clearer why the function actually does this.

            Show
            quen Sam Marshall added a comment - Requesting peer review for this fix (same change for 2.5 and master branches). The logic was wrong in the function I have changed; there is code to ensure that things are greyed out when editing to indicate that it may be unavailable for some users, but this was also being used when not editing! When not editing, you should see the result for yourself, not for theoretical other users. I also added comments to make clearer why the function actually does this.
            Hide
            lazydaisy Mary Evans added a comment -

            Just about to take this for a whirl! as I can't be any more dizzy than I am.

            Show
            lazydaisy Mary Evans added a comment - Just about to take this for a whirl! as I can't be any more dizzy than I am.
            Hide
            lazydaisy Mary Evans added a comment -

            I'll try another resource.

            Show
            lazydaisy Mary Evans added a comment - I'll try another resource.
            Hide
            lazydaisy Mary Evans added a comment - - edited

            Got the page to work eventually...

            Label's crook now!

            Looks to have no Restrict access available. (see uploaded image of my page view)

            Show
            lazydaisy Mary Evans added a comment - - edited Got the page to work eventually... Label's crook now! Looks to have no Restrict access available. (see uploaded image of my page view)
            Hide
            lazydaisy Mary Evans added a comment -

            I forgot to enable Conditional Access setting.

            All works as expected. See images proofs posted at top of page.

            Thanks Sam.

            Show
            lazydaisy Mary Evans added a comment - I forgot to enable Conditional Access setting. All works as expected. See images proofs posted at top of page. Thanks Sam.
            Hide
            lazydaisy Mary Evans added a comment -

            Just pushed this for Integration Review. Hope that's OK with you Sam?

            Show
            lazydaisy Mary Evans added a comment - Just pushed this for Integration Review. Hope that's OK with you Sam?
            Hide
            quen Sam Marshall added a comment -

            Thank you Mary!

            Show
            quen Sam Marshall added a comment - Thank you Mary!
            Hide
            lazydaisy Mary Evans added a comment -

            You are most welcome!
            It will probably need to be rebased if Moodle has been updated.

            Cheers
            Mary

            Show
            lazydaisy Mary Evans added a comment - You are most welcome! It will probably need to be rebased if Moodle has been updated. Cheers Mary
            Hide
            marina Marina Glancy added a comment -

            Thanks a lot guys, this was integrated in 2.5 and master

            Show
            marina Marina Glancy added a comment - Thanks a lot guys, this was integrated in 2.5 and master
            Hide
            rajeshtaneja Rajesh Taneja added a comment -

            Thanks for fixing this Sam,

            Works as mentioned.

            Show
            rajeshtaneja Rajesh Taneja added a comment - Thanks for fixing this Sam, Works as mentioned.
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Huzzah, your code made it into Moodle. Perhaps now things are ever so slightly better!

            "The ship can't take this much pressure. Sometimes it falls apart just sitting in the hangar."
            ~ Professor Farnsworth

            Show
            samhemelryk Sam Hemelryk added a comment - Huzzah, your code made it into Moodle. Perhaps now things are ever so slightly better! "The ship can't take this much pressure. Sometimes it falls apart just sitting in the hangar." ~ Professor Farnsworth
            Hide
            chuang Wen Hao Chuang added a comment - - edited

            Any chance this fix might be backporting to Moodle 2.3 and 2.4? Thanks!

            Show
            chuang Wen Hao Chuang added a comment - - edited Any chance this fix might be backporting to Moodle 2.3 and 2.4? Thanks!
            Hide
            marina Marina Glancy added a comment -

            Hi Wen, these versions are not supported any more. Currently supported versions are 2.6 and 2.7. Also we accept security bug fixes in 2.5. See http://docs.moodle.org/dev/Releases
            You can try to cherry-pick commit https://github.com/moodle/moodle/commit/c358c8a2c0a362a0c14863bced0ce44560916f0e by yourself

            Show
            marina Marina Glancy added a comment - Hi Wen, these versions are not supported any more. Currently supported versions are 2.6 and 2.7. Also we accept security bug fixes in 2.5. See http://docs.moodle.org/dev/Releases You can try to cherry-pick commit https://github.com/moodle/moodle/commit/c358c8a2c0a362a0c14863bced0ce44560916f0e by yourself
            Hide
            chuang Wen Hao Chuang added a comment -

            Hi Marina, thanks for the information!

            Show
            chuang Wen Hao Chuang added a comment - Hi Marina, thanks for the information!

              People

              • Votes:
                12 Vote for this issue
                Watchers:
                19 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/Sep/13