Moodle
  1. Moodle
  2. MDL-31812

Items in manifest rendered as link, even though they don't refer to a resource

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.2.1
    • Fix Version/s: None
    • Component/s: IMS-CP resource type
    • Labels:
    • Environment:
      Debian
    • Testing Instructions:
      Hide

      Load a IMS-CP package which includes items with no resource ("identifierref" attribute). View it.

      If the following are true, the fix worked:
      1. The first item with a resource is displayed when the IMSCP is viewed.
      2. Items without resources are non-linked plain text.
      3. Clicking on an item without resources displays a list of child node titles in the content area.
      4. Clicking one of child nodes listed loads the corresponding item (with or without resource) in the in the content area.

      Show
      Load a IMS-CP package which includes items with no resource ("identifierref" attribute). View it. If the following are true, the fix worked: 1. The first item with a resource is displayed when the IMSCP is viewed. 2. Items without resources are non-linked plain text. 3. Clicking on an item without resources displays a list of child node titles in the content area. 4. Clicking one of child nodes listed loads the corresponding item (with or without resource) in the in the content area.
    • Workaround:
      Hide

      Apply attached patch.

      Show
      Apply attached patch.
    • Affected Branches:
      MOODLE_22_STABLE
    • Rank:
      38442

      Description

      View a IM-CP which includes items with no resource ("identifierref" attribute).

      When rendered, every branch and leaf is output as a link - even when there is no resource to link to specified in the manifest.

      Expected results: items without resources are rendered as non-linked plain text.

      Actual results: items without resources are rendered as links.

      Patch to fix this attached.

      1. imscp_only-link-resources.patch
        1 kB
        David Balch
      2. ims-navigation.patch
        5 kB
        David Balch

        Activity

        Hide
        David Balch added a comment -

        I've just realised that my patch isn't sufficient, as:
        1. The non-links are still made clickable by YUI TreeView
        2. Default content displayed is still the first item - even if there isn't any resource.

        More investigation to be done...

        Show
        David Balch added a comment - I've just realised that my patch isn't sufficient, as: 1. The non-links are still made clickable by YUI TreeView 2. Default content displayed is still the first item - even if there isn't any resource. More investigation to be done...
        Hide
        Michael de Raadt added a comment -

        Thanks for working on this and providing a patch. Please keep working on it.

        Show
        Michael de Raadt added a comment - Thanks for working on this and providing a patch. Please keep working on it.
        Hide
        David Balch added a comment - - edited

        Revised fix "ims-navigation.patch".
        This:
        1. Avoids generation of HTML links where the item doesn't have a resource (same as the first patch).
        2. Sets the item displayed by default to the first item with a resource.
        3. For items without resources, shows a list of any children, and makes clicking on them load that resource.

        NB: This fix requires javascript, but I figured it'd do for the moment, as a) the rest of the IMSCP module seems to need JS, and b)I don't want to spend any more time trying to figure out YUI.

        Show
        David Balch added a comment - - edited Revised fix "ims-navigation.patch". This: 1. Avoids generation of HTML links where the item doesn't have a resource (same as the first patch). 2. Sets the item displayed by default to the first item with a resource. 3. For items without resources, shows a list of any children, and makes clicking on them load that resource. NB: This fix requires javascript, but I figured it'd do for the moment, as a) the rest of the IMSCP module seems to need JS, and b)I don't want to spend any more time trying to figure out YUI.
        Hide
        Michael de Raadt added a comment -

        Thanks for reporting this issue.

        We have detected that this issue has been inactive for over a year. It was reported as affecting versions that are no longer supported.

        If you believe that this issue is still relevant to current versions (2.5 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

        Michael d.

        TW9vZGxlDQo=

        Show
        Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year. It was reported as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.5 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d. TW9vZGxlDQo=
        Hide
        Michael de Raadt added a comment -

        I'm closing this issue as it has been inactive for over a year has been recorded as affecting versions that are no longer supported.

        This is being done as part of a bulk annual clean-up of issues.

        If you still believe this is an issue in supported versions, please create a new issue.

        Show
        Michael de Raadt added a comment - I'm closing this issue as it has been inactive for over a year has been recorded as affecting versions that are no longer supported. This is being done as part of a bulk annual clean-up of issues. If you still believe this is an issue in supported versions, please create a new issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: