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

Password unmask checkbox is not displayed

    XMLWordPrintable

Details

    • MOODLE_22_STABLE, MOODLE_23_STABLE
    • MOODLE_22_STABLE, MOODLE_23_STABLE
    • MDL-33560-master
    • 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')); }
    • 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

    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
          screenshot-1.jpg
          5 kB
        2. screenshot-2.jpg
          screenshot-2.jpg
          17 kB
        3. screenshot-3.jpg
          screenshot-3.jpg
          25 kB

        Activity

          People

            fred Frédéric Massart
            marxist Tobias Marx
            Andrew Davis Andrew Davis
            Sam Hemelryk Sam Hemelryk
            Ankit Agarwal Ankit Agarwal
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona), Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              10/Sep/12