Moodle
  1. Moodle
  2. MDL-26041

Labels has broken html in resources view (resources.php)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.0.2
    • Component/s: Resource
    • Labels:
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      16001

      Description

      Label html is broken in resources view (resources.php). See attached image and html below. Label html seem to go inside a-tag in name (second) column (line 3 below).

      <tr class="r1">
      <td class="cell c0" style="text-align:center;">Aihe 2</td>
      <td class="cell c1" style="text-align:left;"><a <div class="no-overflow"><p><span style="color: #0000cc; font-weight: bold;">Viikkokeskustelu</span></p></div> href="http://www.jobcafeturku.net/moodle/mod/label/view.php?id=7593"><img src="http://www.jobcafeturku.net/moodle/theme/image.php?theme=jc&image=icon&rev=153&component=label" class="activityicon" alt="Otsikko" /> Viikkokeskustelu</a></td>
      <td class="cell c2 lastcol" style="text-align:left;"><div class="no-overflow"><p><span style="color: #0000cc; font-weight: bold;">Viikkokeskustelu</span></p></div></td>
      </tr>

        Activity

        Hide
        Petr Škoda added a comment -

        Hello,

        labels work fine for me, I am unable to reproduce this problem. There should not be any html table markup any more in Moodle generated course page html unless you put it there yourself. Please verify that the text of the label itself is valid xhtml.

        Petr

        Show
        Petr Škoda added a comment - Hello, labels work fine for me, I am unable to reproduce this problem. There should not be any html table markup any more in Moodle generated course page html unless you put it there yourself. Please verify that the text of the label itself is valid xhtml. Petr
        Hide
        Mika Ståhlberg added a comment -

        Hi,

        Page in question is /course/resources.php. We use our own theme but i reproduced it with Formal white theme. Tried switching to english (we use finnish) with same result.

        Label source is <p>Test</p>, in course frontpage in shows ok but in resources page (straight copy, stripped out irrelevant html) it shows in name column:

        <a <div class="no-overflow"><p>Test</p></div> href="http://www.jobcafeturku.net/moodle/mod/label/view.php?id=7875"><img src="http://www.jobcafeturku.net/moodle/theme/image.php?theme=jc&image=icon&rev=153&component=label" class="activityicon" alt="Label" /> Test</a>

        Our Moodle was updated from 1.9.8+ last week, I can make a fresh install on our development server and see what happens.

        br,
        mika

        Show
        Mika Ståhlberg added a comment - Hi, Page in question is /course/resources.php. We use our own theme but i reproduced it with Formal white theme. Tried switching to english (we use finnish) with same result. Label source is <p>Test</p>, in course frontpage in shows ok but in resources page (straight copy, stripped out irrelevant html) it shows in name column: <a <div class="no-overflow"><p>Test</p></div> href="http://www.jobcafeturku.net/moodle/mod/label/view.php?id=7875"><img src="http://www.jobcafeturku.net/moodle/theme/image.php?theme=jc&image=icon&rev=153&component=label" class="activityicon" alt="Label" /> Test</a> Our Moodle was updated from 1.9.8+ last week, I can make a fresh install on our development server and see what happens. br, mika
        Hide
        Mika Ståhlberg added a comment -

        Hi,

        Installed a fresh copy of Moodle 2.0.1. Made a course, weekly format. Made a label and added Activities block. For some reason activities block did not show Resources until i made another resource (a wiki). Clicked Resources link in Activities block. Html is still broken in Name column.

        Label source is:
        <p>Test</a>

        Broken html in Name column is (stripped irrelevant off):

        <a <div class="no-overflow"><p>Test</p></div> href="x"><img src="x" class="activityicon" alt="Label" /> Test</a>

        As You can see, this:
        <div class="no-overflow"><p>Test</p></div>
        is somehow in middle of a-tag

        Show
        Mika Ståhlberg added a comment - Hi, Installed a fresh copy of Moodle 2.0.1. Made a course, weekly format. Made a label and added Activities block. For some reason activities block did not show Resources until i made another resource (a wiki). Clicked Resources link in Activities block. Html is still broken in Name column. Label source is: <p>Test</a> Broken html in Name column is (stripped irrelevant off): <a <div class="no-overflow"><p>Test</p></div> href="x"><img src="x" class="activityicon" alt="Label" /> Test</a> As You can see, this: <div class="no-overflow"><p>Test</p></div> is somehow in middle of a-tag
        Hide
        Petr Škoda added a comment -

        Aah, the labels should not be printed at all in that page.

        Thanks a lot for the clarification.

        Show
        Petr Škoda added a comment - Aah, the labels should not be printed at all in that page. Thanks a lot for the clarification.
        Hide
        Mika Ståhlberg added a comment -

        No problem, glad to help!

        Made a grude fix now that i know label should not be printed on that page. Waiting for 2.0.2.

        ty

        br,
        mika

        Show
        Mika Ståhlberg added a comment - No problem, glad to help! Made a grude fix now that i know label should not be printed on that page. Waiting for 2.0.2. ty br, mika
        Hide
        Helen Foster added a comment -

        Mika, thanks for reporting this issue. The fix of labels not being listed in course/resources.php will be included in the next Moodle 2.0.1+ weekly version.

        Show
        Helen Foster added a comment - Mika, thanks for reporting this issue. The fix of labels not being listed in course/resources.php will be included in the next Moodle 2.0.1+ weekly version.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: