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

Password unmask checkbox is not displayed

    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.

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

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