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

Hidden courses appear normally in user profile pages

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.4, 2.7.1
    • Fix Version/s: 2.6.5, 2.7.2
    • Component/s: Course
    • Labels:
    • Testing Instructions:
      Hide

      This test requires the following.

      1. Two courses
      2. A teacher enrolled in both courses
      3. At least one student enrolled in both courses

      Test as follows.

      1. Log in as the teacher
      2. Navigate to one of the courses
      3. Edit the course configuration and set Visible to Hide
      4. Return to the course page
      5. VERIFY the link to the course in the Navigation block is dimmed
      6. Navigate to Navigation > My profile > View profile
      7. VERIFY the link to the course in the user's list of courses labelled "Course profiles" is dimmed (as it was in navigation)
      8. Navigate to the second course
      9. Click the Participants link in the Navigation block
      10. Click on the name or image of a student enrolled in both the current and hidden course
      11. VERIFY that the link to the hidden course in the list of courses labelled "Course profiles" is dimmed
      Show
      This test requires the following. Two courses A teacher enrolled in both courses At least one student enrolled in both courses Test as follows. Log in as the teacher Navigate to one of the courses Edit the course configuration and set Visible to Hide Return to the course page VERIFY the link to the course in the Navigation block is dimmed Navigate to Navigation > My profile > View profile VERIFY the link to the course in the user's list of courses labelled "Course profiles" is dimmed (as it was in navigation) Navigate to the second course Click the Participants link in the Navigation block Click on the name or image of a student enrolled in both the current and hidden course VERIFY that the link to the hidden course in the list of courses labelled "Course profiles" is dimmed
    • Affected Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      mdl-46427-master

      Description

      Hello.

      The course list on user profiles, adds the wrong class to link elements. When printing the class in a dimmed course, the link class is formed incorrectly...

      <a class="class="dimmed"" .......
      

      This is because the class is incorrectly set on the profile page...

      user/profile.php on line 383

      $class = 'class="dimmed"';
      

      ..and then when printing the hyperlink (line 391), it is assigned wrongly...

      $courselisting .= html_writer::link($url, $ccontext->get_context_name(false), array('class' => $class));
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  8/Sep/14