Moodle

Password submision in Workshop module

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Duplicate
  • Affects Version/s: 1.9.2, 1.9.3
  • Fix Version/s: 1.9.5
  • Component/s: Workshop
  • Labels:
    None
  • Environment:
    Environment should not be important. However it was found on Debian Linux.
  • Database:
    Any
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

Reproducing the bug:

Tested in browsers: Opera 9.6 and FF3 (not tested in IE)

STEPS TO REPRODUCE THE PROBLEM:

1. As Teacher create new workshop activitiy
2. Set password for it and enable password
3. Login as Student and try to access this workshop
4. Password box appears. We type in the password.
5. CLICK (do not submit data pressing enter key, click!) on 'Continue' button.

WHAT WAS EXPECTED:
6.1 Form is submited.

WHAT ACTUALLY HAPPENS:
6.2 Nothing happens. Browser does not submit form. It generates JavaScript error.

PROPOSED SOLUTION:
After reviewing the code I realized that the 'Continue' button has onclick event:

<input type="button" value="Continue" onclick="document.password.submit();" />

that should submit form named 'password'. This does not happen since form is defiend only with id tag:

<form id="password" method="post" action="view.php">

Proposed and working solution to a problem would be to add 'name' attribute to this form:

<form id="password" name="password" method="post" action="view.php">

This solution works in both browsers listed above.

Greetings to all moodlers,
Robert Ravnik

Issue Links

Activity

Hide
David Mudrak added a comment -

Robert, thanks for a very good bug report. This should be now fixed by MDL-19092

Show
David Mudrak added a comment - Robert, thanks for a very good bug report. This should be now fixed by MDL-19092
Hide
Sam Hemelryk added a comment -

Confirmed. Thanks guys

Show
Sam Hemelryk added a comment - Confirmed. Thanks guys

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: