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

Wiki summary field in the wiki index should use the <div> tag instead of the <span> tag

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.3
    • Fix Version/s: 1.9.4
    • Component/s: Accessibility
    • Labels:
      None

      Description

      In the wiki index, there is a table with a list of wikis. An example can be found at: http://demo.moodle.org/mod/wiki/index.php?id=5

      Here is a row example of this list
      <tr>
      <td style=" text-align:CENTER;" class="cell c0">12</td><td style=" text-align:LEFT;" class="cell c1"><a href="view.php?id=245">Course summary wiki</a></td>
      <td style=" text-align:LEFT;" class="cell c2"><span class="smallinfo"><p>For summarizing topics covered in this course as a revision exercise.</p></span></td>
      <td style=" text-align:LEFT;" class="cell c3"><span class="smallinfo">Group</span></td>
      <td style=" text-align:LEFT;" class="cell c4 lastcol"><span class="smallinfo">Wednesday, 27 August 2008, 03:20 AM</span></td>
      </tr>

      As it can be seen, for most of the columns, it is used the tag <span class="smallinfo">. The problem is that for wiki summaries, people tend to use the <p> tag because they usually want to use several paragraphs. But the <p> tag can not be inside a <span> tag. More info on this issue can be found at: MDL-17699

      So the must comprehensive solution is to change the <span> tag for a <div> tag. This can be accomplished by changing the code in: /moodle/mod/wiki/index.php
      $timmod = '<span class="smallinfo">'.userdate($wiki->timemodified).'</span>';
      $summary = '<span class="smallinfo">'.format_text($wiki->summary).'</span>';
      for
      $timmod = '<span class="smallinfo">'.userdate($wiki->timemodified).'</span>';
      $summary = '<div class="smallinfo">'.format_text($wiki->summary).'</div>';

      I have tested it and it works seamlessly.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                28/Jan/09