Moodle
  1. Moodle
  2. MDL-26190

Completion status block shouldn't ever be blank

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.0.3
    • Component/s: Course completion
    • Labels:
    • Testing Instructions:
      Hide

      Reproduce problem:

      • All users (inc students) see warnings when completion not enabled, or criteria not being set for both Course Completion Status and Self Completion blocks
      • A user can still view a Course Completion Status block details page if completion was enabled for the course, but was then turned off site wide (accessible via the block and clicking the "More Details" link).
      • If viewing the Course Completion Status block details page for a user not in a graded role in the course, shows the "You are not enroled as a student in this course" error message even for other users.

      Reproduce fix:

      • Only users with the course:edit capability should see warnings about completion not being enabled, or criteria not being set for both Course Completion Status and Self Completion blocks
      • If course completion is enabled for a course, but disabled sitewide show an error when viewing a Course Completion Status block details page
      • If viewing the Course Completion Status block details page for another user not in a graded role in the course, show the "User is not enroled as a student in this course" error message rather than "You are not enroled as a student in this course".
      • Show message in the Self Completion block if the users is already complete in the course, or has already self completed themselves.
      Show
      Reproduce problem: All users (inc students) see warnings when completion not enabled, or criteria not being set for both Course Completion Status and Self Completion blocks A user can still view a Course Completion Status block details page if completion was enabled for the course, but was then turned off site wide (accessible via the block and clicking the "More Details" link). If viewing the Course Completion Status block details page for a user not in a graded role in the course, shows the "You are not enroled as a student in this course" error message even for other users. Reproduce fix: Only users with the course:edit capability should see warnings about completion not being enabled, or criteria not being set for both Course Completion Status and Self Completion blocks If course completion is enabled for a course, but disabled sitewide show an error when viewing a Course Completion Status block details page If viewing the Course Completion Status block details page for another user not in a graded role in the course, show the "User is not enroled as a student in this course" error message rather than "You are not enroled as a student in this course". Show message in the Self Completion block if the users is already complete in the course, or has already self completed themselves.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      15907

      Description

      If you add the completionstatus block to a course but fail to set a completion type in the Completion Tracking Settings then the block simply returns empty content and is not displayed.

      This is confusing and unhelpful. I can't think of any reason why it shouldn't say (perhaps just to those with relevant capabilities) - "You need to set a type in the Completion Tracking Settings".

        Issue Links

          Activity

          Hide
          Helen Foster added a comment -

          Howard, thanks for your report. How about it displaying the message "Completion tracking criteria not yet set."

          Assigning to Aaron as course completion component lead.

          Show
          Helen Foster added a comment - Howard, thanks for your report. How about it displaying the message "Completion tracking criteria not yet set." Assigning to Aaron as course completion component lead.
          Hide
          Howard Miller added a comment -

          Oh yeh, not critical... should have said "something like". The main thing is that it doesn't mysteriously not appear and you're sat there wondering why

          Show
          Howard Miller added a comment - Oh yeh, not critical... should have said "something like". The main thing is that it doesn't mysteriously not appear and you're sat there wondering why
          Hide
          Helen Foster added a comment -

          Yes, I agree with you Howard. As an interim measure I've added a note to http://docs.moodle.org/en/Course_completion_status_block

          Show
          Helen Foster added a comment - Yes, I agree with you Howard. As an interim measure I've added a note to http://docs.moodle.org/en/Course_completion_status_block
          Hide
          Aaron Barnes added a comment -

          Fix, will update with pull request tomorrow morning. Thanks for the bug report Howard.

          I also fixed similar issues with the selfcompletion block.

          Show
          Aaron Barnes added a comment - Fix, will update with pull request tomorrow morning. Thanks for the bug report Howard. I also fixed similar issues with the selfcompletion block.
          Hide
          Aaron Barnes added a comment -
          Show
          Aaron Barnes added a comment - https://github.com/srynot4sale/moodle/commit/0b15b43b3ed2f05aa7c84b6551d67255e1faff9c Here is the fix for the PULL request
          Hide
          Helen Foster added a comment -

          Aaron, thanks for your fix. Please could you create a pull request for it and include brief instructions for testing the fix.

          Show
          Helen Foster added a comment - Aaron, thanks for your fix. Please could you create a pull request for it and include brief instructions for testing the fix.
          Hide
          Aaron Barnes added a comment -
          Show
          Aaron Barnes added a comment - http://tracker.moodle.org/browse/PULL-373 done
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Hi PULL-373 has been integrated... just one thought about strings like 'completionnotenabled' perhaps being better if placed in lang/en/completion.php (centrally, only once), instead of repeated in all the blocks using it.

          Obviously if the meaning is 100% the same, like seems to be in this case.

          For your consideration...ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Hi PULL-373 has been integrated... just one thought about strings like 'completionnotenabled' perhaps being better if placed in lang/en/completion.php (centrally, only once), instead of repeated in all the blocks using it. Obviously if the meaning is 100% the same, like seems to be in this case. For your consideration...ciao
          Hide
          Helen Foster added a comment -

          This issue is fixed in the latest 2.0.2+. Thanks everyone.

          Show
          Helen Foster added a comment - This issue is fixed in the latest 2.0.2+. Thanks everyone.
          Hide
          Aaron Barnes added a comment -

          I would like to reopen this issue as I have some further improvements on the original patch

          Show
          Aaron Barnes added a comment - I would like to reopen this issue as I have some further improvements on the original patch
          Hide
          Aaron Barnes added a comment -

          Reproduce problem:

          • All users (inc students) see warnings when completion not enabled, or criteria not being set for both Course Completion Status and Self Completion blocks
          • A user can still view a Course Completion Status block details page if completion was enabled for the course, but was then turned off site wide (accessible via the block and clicking the "More Details" link).
          • If viewing the Course Completion Status block details page for a user not in a graded role in the course, shows the "You are not enroled as a student in this course" error message even for other users.

          Reproduce fix:

          • Only users with the course:edit capability should see warnings about completion not being enabled, or criteria not being set for both Course Completion Status and Self Completion blocks
          • If course completion is enabled for a course, but disabled sitewide show an error when viewing a Course Completion Status block details page
          • If viewing the Course Completion Status block details page for another user not in a graded role in the course, show the "User is not enroled as a student in this course" error message rather than "You are not enroled as a student in this course".
          • Show message in the Self Completion block if the users is already complete in the course, or has already self completed themselves.
          Show
          Aaron Barnes added a comment - Reproduce problem: All users (inc students) see warnings when completion not enabled, or criteria not being set for both Course Completion Status and Self Completion blocks A user can still view a Course Completion Status block details page if completion was enabled for the course, but was then turned off site wide (accessible via the block and clicking the "More Details" link). If viewing the Course Completion Status block details page for a user not in a graded role in the course, shows the "You are not enroled as a student in this course" error message even for other users. Reproduce fix: Only users with the course:edit capability should see warnings about completion not being enabled, or criteria not being set for both Course Completion Status and Self Completion blocks If course completion is enabled for a course, but disabled sitewide show an error when viewing a Course Completion Status block details page If viewing the Course Completion Status block details page for another user not in a graded role in the course, show the "User is not enroled as a student in this course" error message rather than "You are not enroled as a student in this course". Show message in the Self Completion block if the users is already complete in the course, or has already self completed themselves.
          Hide
          Martin Dougiamas added a comment -

          Aaron, thanks for working on this, but can you please not re-open issues once they have been integrated and closed?

          Any further improvements should be done in a new tracker issue. You can link back to this one for context, of course.

          Closing this for now, under the assumption you'll create a new one.

          Show
          Martin Dougiamas added a comment - Aaron, thanks for working on this, but can you please not re-open issues once they have been integrated and closed? Any further improvements should be done in a new tracker issue. You can link back to this one for context, of course. Closing this for now, under the assumption you'll create a new one.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: