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 2.5 Branch:
      MDL-40320-m25
    • Pull Master Branch:
      MDL-40320-master
    • Rank:
      51097

      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.

        Issue Links

          Activity

          Hide
          Andrew Sadler added a comment -
          Show
          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
          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
          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
          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
          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
          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
          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
          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
          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 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 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
          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
          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
          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
          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
          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
          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
          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
          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
          George Panagiotakopoulos added a comment -

          Using Moodle 2.5+ (Build: 20130524)

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

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

          Show
          Andrea Bicciolo added a comment - Hello, the issue is also present in version Moodle 2.5.1 (Build: 20130708)
          Hide
          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
          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
          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
          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
          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
          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
          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
          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
          Mary Evans added a comment -

          I'll try another resource.

          Show
          Mary Evans added a comment - I'll try another resource.
          Hide
          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
          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
          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
          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
          Mary Evans added a comment -

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

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

          Thank you Mary!

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

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

          Cheers
          Mary

          Show
          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 Glancy added a comment -

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

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

          Thanks for fixing this Sam,

          Works as mentioned.

          Show
          Rajesh Taneja added a comment - Thanks for fixing this Sam, Works as mentioned.
          Hide
          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
          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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: