-
New Feature
-
Resolution: Unresolved
-
Minor
-
None
-
3.0
-
None
-
MOODLE_30_STABLE
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