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

Password unmask checkbox is not displayed

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Go to any course
      2. Enable self enrolment
      3. Click to edit the self enrolment settings
      4. Enter a password
      5. Make sure you can tick/untick 'Unmask' to show/hide the password
      6. Save the password
      7. Login as a student that is not yet enrolled in the course
      8. Browse to the course and self enrol
      9. When the password is asked, make sure you can use 'Unmask' to hide/unhide the password in the input field
      Show
      Go to any course Enable self enrolment Click to edit the self enrolment settings Enter a password Make sure you can tick/untick 'Unmask' to show/hide the password Save the password Login as a student that is not yet enrolled in the course Browse to the course and self enrol When the password is asked, make sure you can use 'Unmask' to hide/unhide the password in the input field
    • Workaround:
      Hide

      I've found another fix for this by editing: lib/form/yui/passwordunmask/passwordunmask.js

      I've added a check, if the parent note actually exists (which is not the case when students enrol themselves (/enrol/index.php)).
      So far I can't see any negative side effects from these changes:

      original:

      //Insert unmask div in the same div as password input.
      node.get('parentNode').insert(unmaskdiv, node.get('lastNode'));

      changed:

      //Insert unmask div in the same div as password input.
      if (node) { node.get('parentNode').insert(unmaskdiv, node.get('lastNode')); }

      Show
      I've found another fix for this by editing: lib/form/yui/passwordunmask/passwordunmask.js I've added a check, if the parent note actually exists (which is not the case when students enrol themselves (/enrol/index.php)). So far I can't see any negative side effects from these changes: original: //Insert unmask div in the same div as password input. node.get('parentNode').insert(unmaskdiv, node.get('lastNode')); changed: //Insert unmask div in the same div as password input. if (node) { node.get('parentNode').insert(unmaskdiv, node.get('lastNode')); }
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-33560-master

      Description

      When a student wants to self-enrol in a course with an enrolment key, the "Unmask" checkbox is not displayed. I don't know if this is intentional, but it breaks the JavaScript on that page.

      Firefox's Error Console shows:

      Error: node is null
      Source: .../theme/yui_combo.php?moodle/308/form/passwordunmask/passwordunmask.js

      Due to this, the navigation block can't be used any more.

        Attachments

        1. screenshot-1.jpg
          5 kB
          Tobias Marx
        2. screenshot-2.jpg
          17 kB
          Tobias Marx
        3. screenshot-3.jpg
          25 kB
          Tobias Marx

          Activity

            People

            Assignee:
            fred Frédéric Massart
            Reporter:
            marxist Tobias Marx
            Peer reviewer:
            Andrew Davis
            Integrator:
            Sam Hemelryk
            Tester:
            Ankit Agarwal
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              10/Sep/12