Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 1.8
    • Component/s: Accessibility
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE

      Description

      patch following...

        Gliffy Diagrams

        1. formslibx.php
          13 kB
          Petr Skoda
        2. ft.php
          2 kB
          Petr Skoda
        3. ft2.php
          2 kB
          Petr Skoda

          Issue Links

            Activity

            Hide
            Petr Skoda added a comment -

            Pending:

            • File uploading and sesskey protection not implemented.
            • Method names could be improved.
            • Some dummy validation callback method could be added.

            Changes:

            • the outside API is not dependent on quickforms
            • non-post form type compatible with xxx_param() functions - both return the same data
            • easier to learn how to use - less methods in the wrapper
            • server-side Moodle specific cleaning
            • only form_definition() uses quickform methods, but only those related to form construction
            Show
            Petr Skoda added a comment - Pending: File uploading and sesskey protection not implemented. Method names could be improved. Some dummy validation callback method could be added. Changes: the outside API is not dependent on quickforms non-post form type compatible with xxx_param() functions - both return the same data easier to learn how to use - less methods in the wrapper server-side Moodle specific cleaning only form_definition() uses quickform methods, but only those related to form construction
            Hide
            Petr Skoda added a comment -
            • one more change - form name is constructed from the class name
            Show
            Petr Skoda added a comment - one more change - form name is constructed from the class name
            Hide
            Jamie Pratt added a comment -

            Following on from our skype chat I'm going to post a number of ideas here as they come up while examining your code Petr.

            We should consider removing the target parameter in :

            function moodleform_wrapper($action, $customdata=null, $method='post', $target='', $attributes=null) {

            as target is deprecated in xhtml strict.

            Show
            Jamie Pratt added a comment - Following on from our skype chat I'm going to post a number of ideas here as they come up while examining your code Petr. We should consider removing the target parameter in : function moodleform_wrapper($action, $customdata=null, $method='post', $target='', $attributes=null) { as target is deprecated in xhtml strict.
            Hide
            Jamie Pratt added a comment -

            use_values_as_defaults() method is redundant since the user input anyway always overrides qf's defaults.

            Show
            Jamie Pratt added a comment - use_values_as_defaults() method is redundant since the user input anyway always overrides qf's defaults.
            Hide
            Jamie Pratt added a comment -

            Hi Petr,

            I added this code to the end of your updateSubmission method and then use_values_as_defaults() really is redundant :

            //need to tell elements that they need to update their value attribute.
            foreach (array_keys($this->_elements) as $key)

            { $this->_elements[$key]->onQuickFormEvent('updateValue', null, $this); }

            Jamie

            Show
            Jamie Pratt added a comment - Hi Petr, I added this code to the end of your updateSubmission method and then use_values_as_defaults() really is redundant : //need to tell elements that they need to update their value attribute. foreach (array_keys($this->_elements) as $key) { $this->_elements[$key]->onQuickFormEvent('updateValue', null, $this); } Jamie
            Hide
            Petr Skoda added a comment -

            The new formslib.php in in HEAD, attaching new form test file
            I think the API should be stable now, but of course we can still rename the method names if needed.

            I am working on course/edit3.php and incline docs+comments. in formslib.php today.

            Show
            Petr Skoda added a comment - The new formslib.php in in HEAD, attaching new form test file I think the API should be stable now, but of course we can still rename the method names if needed. I am working on course/edit3.php and incline docs+comments. in formslib.php today.
            Hide
            Petr Skoda added a comment -

            all should be fixed in cvs, closing now

            Show
            Petr Skoda added a comment - all should be fixed in cvs, closing now

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: