Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-6056

Dataform: creating entries with some of the content predefined

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.0
    • Fix Version/s: None
    • Component/s: Set: Dataform
    • Labels:
      None
    • Affected Branches:
      MOODLE_30_STABLE

      Description

      It would be beneficial to be able to create new entries in a database with some of the fields set to predefined values - defined at time of calling the DATAFORM PHP scripts from within a course. This would allow creation of a new database row with less typing by students, because the course developer could predefine some of the fields needed in the database row. As an example, if the instructor is using a DATAFORM to capture answers to questions embedded in the course, the instructor could predefine index fields such as Lesson # and Question # so that the student doesn't need to remember and enter those values.

      There are probably multiple ways this could be implemented, and I'm not well-acquainted enough with the DATAFORM plugin to understand them all. One option is to allow passing parameters in the URL that calls the DATAFORM edit PHP script, so as to pass the contents of database fields - for example: ../dataform/edit.php?d=32&view=36&editentries=-1&field1="xxxx"&field2="yyyyy"&field3="zzzzz", where field1-3 are actual fieldnames from the database being populated. There would need to be format-checking to ensure passed parameters matched the format required for the field. Any fields not predefined would default to blank, to be entered by the user into the DATAFORM.

      Let me know if there are other questions and further details needed for this.

      Stan

        Attachments

          Activity

            People

            Assignee:
            itamart Itamar Tzadok
            Reporter:
            klapauszak Stan Klapauszak
            Participants:
            Component watchers:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: