Moodle
  1. Moodle
  2. MDL-28292

Its possible to 'lose' a block by docking it (if it has no title)

    Details

    • Testing Instructions:
      Hide
      1. Go to a course page as teacher
      2. Turn editting on
      3. Create a html block on a moodle course page
      4. Edit the block. add some content but dont give it a title
      5. Turn editting off the site
      6. Click the dock icon
      Show
      Go to a course page as teacher Turn editting on Create a html block on a moodle course page Edit the block. add some content but dont give it a title Turn editting off the site Click the dock icon
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip-MDL-28292-master
    • Rank:
      17932

      Description

      1/ Go to course page as teacher
      2/ Turn editting on
      3/ Create a html block on a moodle course page
      4/ Edit the block. add some content but dont give it a title
      5/ Turn editting off the site
      6/ Click the dock icon

      Expected result:
      Block is docked

      Actual result:
      Block is lost from course page and can't be found again

      1. blocks_html_block_html.patch
        0.6 kB
        Chris Follin
      2. blocks_html_block_html.patch
        0.5 kB
        Jason Hardin

        Issue Links

          Activity

          Hide
          Michael de Raadt added a comment -

          Thanks for reporting this. It was only reported yesterday.

          Show
          Michael de Raadt added a comment - Thanks for reporting this. It was only reported yesterday.
          Hide
          Dan Poltawski added a comment -

          Hi Michael,

          I do not believe this is a duplicate of MDL-28267 because:

          1/ This issue affects block docking, this was not present in the <2.0 branches such as 1.9
          2/ This issue is with regards to an empty title, not empty content in general

          Show
          Dan Poltawski added a comment - Hi Michael, I do not believe this is a duplicate of MDL-28267 because: 1/ This issue affects block docking, this was not present in the <2.0 branches such as 1.9 2/ This issue is with regards to an empty title, not empty content in general
          Hide
          Michael de Raadt added a comment -

          OK. Thanks Dan.

          I went on a bit of a duplicate hunt yesterday, but you're right, this is not the same.

          I'll triage it and link it to the other issue. They can be worked on together.

          Michael;

          Show
          Michael de Raadt added a comment - OK. Thanks Dan. I went on a bit of a duplicate hunt yesterday, but you're right, this is not the same. I'll triage it and link it to the other issue. They can be worked on together. Michael;
          Hide
          Chris Follin added a comment - - edited

          This is not just 2.1. We're having this issue in 2.0, too.

          Also, you can get the block back by simply refreshing the page. The block will reappear in the column (not docked). Although it's not permanently lost, this is confusing to a user to have the block seem to just disappear and they may not think to refresh the page.

          Show
          Chris Follin added a comment - - edited This is not just 2.1. We're having this issue in 2.0, too. Also, you can get the block back by simply refreshing the page. The block will reappear in the column (not docked). Although it's not permanently lost, this is confusing to a user to have the block seem to just disappear and they may not think to refresh the page.
          Hide
          Jason Hardin added a comment -

          This patch fixes the issue. I made a duplicate ticket http://tracker.moodle.org/browse/MDL-29786

          Show
          Jason Hardin added a comment - This patch fixes the issue. I made a duplicate ticket http://tracker.moodle.org/browse/MDL-29786
          Hide
          Chris Follin added a comment -

          Please review attached patch.

          Show
          Chris Follin added a comment - Please review attached patch.
          Hide
          Jason Fowler added a comment -

          Code looks good to me

          Show
          Jason Fowler added a comment - Code looks good to me
          Hide
          Chris Follin added a comment -

          I can't push the ticket any farther. Please integrate. Thank you.

          Show
          Chris Follin added a comment - I can't push the ticket any farther. Please integrate. Thank you.
          Hide
          Chris Follin added a comment -

          We found a small problem with the first patch. If an HTML block had a title but the theme settings did not allow users to dock blocks, the block could still be docked. I'm attaching a new patch that both prevents an HTML block from being docked if it has no title and also respects the parent settings regarding whether blocks in general can be docked.

          Show
          Chris Follin added a comment - We found a small problem with the first patch. If an HTML block had a title but the theme settings did not allow users to dock blocks, the block could still be docked. I'm attaching a new patch that both prevents an HTML block from being docked if it has no title and also respects the parent settings regarding whether blocks in general can be docked.
          Hide
          Sam Hemelryk added a comment -

          Thanks for fixing that guys.

          Jason could you please add testing instructions for this issue ASAP.
          Also just noting to watch whitespace, I've made an additional commit on each branch to remove the white space introduced at the start of functions phpdoc.

          Cheers
          Sam

          Show
          Sam Hemelryk added a comment - Thanks for fixing that guys. Jason could you please add testing instructions for this issue ASAP. Also just noting to watch whitespace, I've made an additional commit on each branch to remove the white space introduced at the start of functions phpdoc. Cheers Sam
          Hide
          Mary Evans added a comment - - edited

          Hi,

          I have just found this as I added a tracker issue the other day for this same problem! I would strongly request that a HTML block should be able to be styled/and behave as any "normal" block should, as there are times when a title looks silly especially if used for Social Networking as many people are doing these days, where the social networking widgets have titles anyway.

          Also, and more importantly from a design perspective, the docking icon is shown on the left and not the right and neither is there a toggle switch to show/hide it. All this should be available with or without a title!

          Thanks
          Mary

          Show
          Mary Evans added a comment - - edited Hi, I have just found this as I added a tracker issue the other day for this same problem! I would strongly request that a HTML block should be able to be styled/and behave as any "normal" block should, as there are times when a title looks silly especially if used for Social Networking as many people are doing these days, where the social networking widgets have titles anyway. Also, and more importantly from a design perspective, the docking icon is shown on the left and not the right and neither is there a toggle switch to show/hide it. All this should be available with or without a title! Thanks Mary
          Hide
          Rajesh Taneja added a comment -

          I am passing this test as the behavior without block title can't match with one with title.
          As per moodle docs block title should not be an empty string. If user doesn't want title to be displayed he/she should use hide_header function. In this particular case user is not adhering to moodle docs and for docking or hiding block, title being the distinguish field, this solution seems correct.

          As mentioned by Mary, if title is empty then toggle switch to show/hide is not visible. This is intentionally done in code to avoid case when block is hidden and only title is supposed to be visible. Also, docking can't be performed in this case as there is no string to go in docked navigation. It can be quite confusing when we have multiple empty title blocks docked/hidden if they behave like blocks with title.

          Show
          Rajesh Taneja added a comment - I am passing this test as the behavior without block title can't match with one with title. As per moodle docs block title should not be an empty string. If user doesn't want title to be displayed he/she should use hide_header function. In this particular case user is not adhering to moodle docs and for docking or hiding block, title being the distinguish field, this solution seems correct. As mentioned by Mary, if title is empty then toggle switch to show/hide is not visible. This is intentionally done in code to avoid case when block is hidden and only title is supposed to be visible. Also, docking can't be performed in this case as there is no string to go in docked navigation. It can be quite confusing when we have multiple empty title blocks docked/hidden if they behave like blocks with title.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Yes, you got this finally upstream, just in time for Moodle 2.2beta. Congrats and thanks!

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Yes, you got this finally upstream, just in time for Moodle 2.2beta. Congrats and thanks! Ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved: