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

Please fix some issues in mod/data and blocks/navigation

    XMLWordPrintable

Details

    • MOODLE_21_STABLE, MOODLE_22_STABLE

    Description

      Please fix some issues in mod/data and blocks/navigation.

      The module /mod/data doesn't support multilanguage tags <span lang="XX">...</span>. For fix the issue the module needs to improve. And the first step is to add multilanguage support for templates:

      /mod/data/lip.php

      // actual replacement of the tags
      $newtext = str_ireplace($patterns, $replacement, format_text($data->{$template}));

      /mod/data/edit.php

      $newtext = str_ireplace($patterns, $replacements, format_text($data->{$mode}));

      Fix navigation block. When the site enters for the first time, the navigation block does not contain the course $SITE. When I go to any of the courses, it appears. And this category is always collapsed. It has to be present initially in the expanded state then main page opened. It should be collapsed only when there is insufficient space. The primitive way of solving this problem is given below.

      /blocks/navigation/renderer.php

      $liclasses = array($item->get_css_type(), 'depth_'.$depth);
      if ($item->has_children() && (!$item->forceopen || $item->collapse) &&
          !($item->type == navigation_node::TYPE_COURSE && $depth == 2)) {
          $liclasses[] = 'collapsed';
      }

      ...or...

      /lib/navigationlib.php

      $this->rootnodes['site']  = $this->add_course($SITE);

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              p.e.timoshenko Pavel Evgenjevich Timoshenko
              Amaia Anabitarte, Bas Brands, Carlos Escobedo, Laurent David, Raquel Ortega, Sabina Abellan, Sara Arjona (@sarjona), David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo, David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: