Moodle

choosecoursefileorimsrepo form element doesn't allow attributes to be specified for text field

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.9.5
  • Fix Version/s: 1.9.6
  • Component/s: Forms Library
  • Labels:
    None
  • Difficulty:
    Easy
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

Identical in nature to MDL-19112 as noted by Eloy

It seems that the "choosecoursefileorimsrepo" formslib group element doesn't allow to specify any attribute in the $attributes parameter. They are set to the group element without effect in the text field. So things like size or maxlength cannot be specified.

As the group only has 2 elements (buttton and text), make it to forward any attribute received straight to the text element.

Issue Links

Activity

Hide
Sam Hemelryk added a comment -

I picked this up while looking into MDL-19112 as QA, identical code exists in another class that also inherits from MoodleQuickForm_group

Show
Sam Hemelryk added a comment - I picked this up while looking into MDL-19112 as QA, identical code exists in another class that also inherits from MoodleQuickForm_group
Hide
Sam Hemelryk added a comment -

Resolved in the exact same way as linked bug, big thank you to Eloy for the code

Show
Sam Hemelryk added a comment - Resolved in the exact same way as linked bug, big thank you to Eloy for the code
Hide
Eloy Lafuente (stronk7) added a comment -

Good job, Sam!

Closing this. Thanks!

(btw, you don't need to add as watchers to any of these: reporter, assignee, qa assignee, they are "automatically" subscribed to issue updates)

Show
Eloy Lafuente (stronk7) added a comment - Good job, Sam! Closing this. Thanks! (btw, you don't need to add as watchers to any of these: reporter, assignee, qa assignee, they are "automatically" subscribed to issue updates)

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: