Moodle
  1. Moodle
  2. MDL-24939

Add a debugging mesage in mnet_hosts block if required capability is not set

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.1
    • Component/s: MNet
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      1134

      Description

      If the required (role) capability is not set then the block simply returns with no content (and the block does not show). If debugging is enabled, consider printing a message to that effect. There's lots to get wrong setting up MNet and I would like to to null returns like this being avoided.

        Activity

        Hide
        David Mudrak added a comment -

        Good idea Howard! I just committed a patch that displays the error message within the block in the following situations:

        • if the current user is remote user
        • if the MNet authentication plugin is not enabled
        • if the current user does not have moodle/site:mnetlogintoremote capability

        The site must be switched at least to DEBUG_NORMAL level and $CFG->debugdisplay must be turned on. Otherwise, the block is just not displayed (which is ok for production mode).

        Show
        David Mudrak added a comment - Good idea Howard! I just committed a patch that displays the error message within the block in the following situations: if the current user is remote user if the MNet authentication plugin is not enabled if the current user does not have moodle/site:mnetlogintoremote capability The site must be switched at least to DEBUG_NORMAL level and $CFG->debugdisplay must be turned on. Otherwise, the block is just not displayed (which is ok for production mode).

          People

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

            Dates

            • Created:
              Updated:
              Resolved: