Skip to content
  • David Mudrák's avatar
    MDL-52873 forms: Generate unique id attributes for modgrade elements · d84c64b7
    David Mudrák authored
    The previous method of generating the id attribute of the elements
    within the modgrade group did not take the name of the modgrade field
    into account. So if there were multiple fields of the modgrade type
    added into a form (not a common case yet still valid), elements created
    within the group were assigned same id attributes.
    
    The patch introduces a new method for generating the id attribute of
    modgrade elements. The new method takes the name of the modgrade group
    into account and returns the id in the format similar to the default one
    returned by HTML_QuickForm_element::_generateId().
    
    The patch changes the generated id attribute. Apart from the
    block_activity_results' behat feature files, not other places seem to
    rely on the exact value.
    d84c64b7