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

Do not display "Add a block" if there is no block to add

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Trivial Trivial
    • None
    • 2.0.2
    • Blocks
    • MOODLE_20_STABLE
    • Easy

      'Add a block' block should not be displayed if there is no block to add.

      In blocklib.php::block_add_block_ui() we should return null if $missingblocks is empty.

      if (empty($missingblocks)) {
          $bc->content = get_string('noblockstoaddhere'); //remove the string from the lang file
          return $bc;
      }

      =>

      if (empty($missingblocks)) {
          return null;
      }

            Votes:
            3 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.