Hi,
I am trying to create a link between two databases as I need a one to many relationship.
As an example, "database 1" will consist of student names, contact info etc. Whereas "database 2" will consist of teachers interactions with students, i.e. meetings, telephone calls, email etc.
What I am trying to achieve is to allow teachers to add a new “interaction activity” in database 2 from the single view page of the database 1 record by clicking on a link on the single view page.
When clicking on the link the teacher should be taken to the “Add entry” page in database 2. Additionally, the student name from the database 1 record should automatically be pre-populated into the new record. The purpose of this is to establish a link between the two records in database 1 and 2.
What I have done so far is to create one link in the html template for the single view in in database 1 that will take them to the “add entry” page in database 2. However I am not able to pass the student name over, thus the teacher has to manually enter it every time, and if they make a spelling mistake the “link” between the two databases are broken. I have tried to pass the student name to the database 2 using url parameters. i.e. (http://ims.jsc.no/moodle/mod/data/edit.php?d=99&FirstName=Thomas&LastName=Brown)
But this does not workL
Any advice on how to pass field data from one database to another (using url parameters or by other means) would be very much appreciated.
PS! I am using Moodle 1.9.5+,
Thanks
Tobias