Details

    • Type: Improvement
    • Status: Closed
    • Priority: 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

          Attachments

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

            Issue Links

              Activity

              Hide
              skodak 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
              skodak 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
              skodak Petr Skoda added a comment -
              • one more change - form name is constructed from the class name
              Show
              skodak Petr Skoda added a comment - one more change - form name is constructed from the class name
              Hide
              jamiesensei 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
              jamiesensei 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
              jamiesensei Jamie Pratt added a comment -

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

              Show
              jamiesensei Jamie Pratt added a comment - use_values_as_defaults() method is redundant since the user input anyway always overrides qf's defaults.
              Hide
              jamiesensei 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
              jamiesensei 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
              skodak 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
              skodak 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
              skodak Petr Skoda added a comment -

              all should be fixed in cvs, closing now

              Show
              skodak 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:
                    Fix Release Date:
                    31/Mar/07