Is ther any way to use the database module before v1.6?

Is ther any way to use the database module before v1.6?

by marcelo vazquez -
Number of replies: 44
I want to ask the questions listed below on a daily basis to all the students in my course. I want to record the answers in a simple database or spread sheet, as they log in daily the info is updated and displayed.  None of the features that moodle offers seems to get me what I need to capture the information.  The database module seems to be what I need, but I can't wait for version 1.6.  Is there any way to get what I need now?

Thanks,

Marcelo

1) Name

2) Date

3) What time did you rise from bed this morning?
                            
4) At what time did you go to bed last night?
                           
5) How long did it take you to fall asleep (minutes)?
                           
6) How many times did you wake up during the night?
                           
7) How long were you awake during the night (in total)?
                           
8) About how long did you sleep altogether (hours/minutes)?
                           
9) How much alcohol did you take last night?   
                       
10) How many sleeping pills did you take to help you sleep?                           

MEASURING THE QUALITY OF YOUR SLEEP

11) How well do you feel this morning?

0          1          2          3          4
not at all       moderately           very
                           
12) How enjoyable was your sleep last night?
0          1          2          3          4
not at all       moderately           very                           
Average of ratings: -
In reply to marcelo vazquez

Re: Is ther any way to use the database module before v1.6?

by Teemu Sumi -
You can install my contrib database module for 1.5 version. There will be 1.6 version too.


Teemu 
In reply to Teemu Sumi

Re: Is ther any way to use the database module before v1.6?

by Chardelle Busch -
Picture of Core developers
Hi Marcelo,

I just saw this post, Teemu's db might work for what you want since it saves all attempts (whereas the feedback mod only saves the last attempt).

I have a question for you Teemu.  Are you still going to have your version of the db mod available in addition to the core db mod?  If so, are there going to be problems using both of them? 
In reply to Chardelle Busch

Re: Is ther any way to use the database module before v1.6?

by marcelo vazquez -
THis might be just the solution I am looking for, where can I find information about what Teemu's db is capable of, and where to download it?  Just to restate what I am after:
The users to be able to log into the site every day for 5 weeks and answer the same 10 questions each day.  It would be ideal for then to see all the answers that they had entered in prior visits as they progress through the course.  It would be fine if the data they entered was just like filling out a sheet/log form.  Like a table with seven columns for the days of the week, and then there answers on rows going down the page.The other requirement is I  would like their answers to be available to be reviewed by the teachers.

Thanks

Marcelo

In reply to marcelo vazquez

Re: Is ther any way to use the database module before v1.6?

by Chardelle Busch -
Picture of Core developers
Hi Marcelo,

I just sent you a zip of this mod--this is the latest version from CVS--I haven't tested it myself.  See if it can do what you want.  Similar to the feedback mod, you can create a form that your users can fill in by adding items (text fields, radio buttons, etc.) to it.  If you set it up so that users can re-submit, then they will only be able to see their last attempt when they update the form.  One way to get around this would be to have a separate section for each day of the week in one form, and then maybe have a separate form for each week. The teachers, however, can see all attempts, can download the data to Excel, and could even create individual reports from that for users, and they can add feedback to their forms.  Also, you might want be able to contract with Teemu, who coded this, to do some changes for you.
In reply to Chardelle Busch

Re: Is ther any way to use the database module before v1.6?

by marcelo vazquez -
I did not get the zip.  What address are you sending this to?
In reply to Chardelle Busch

Re: Is ther any way to use the database module before v1.6?

by Teemu Sumi -
I will change the name of the module, so you can use it with standard 1.6 version. Have you any ideas what the new name should be?


Teemu  
In reply to Teemu Sumi

Re: Is ther any way to use the database module before v1.6?

by Chardelle Busch -
Picture of Core developers
Hi Teemu,

Good to talk to you again.  Yeah! I'm glad you will keep this mod going.  You know that my suggestion from the beginning was the Form Module, since you are really creating a form for students to fill out.  I really don't have anything else.
In reply to Chardelle Busch

Re: Is ther any way to use the database module before v1.6?

by Teemu Sumi -
Nice to see you again smile

It was originally called form module. I like that name too! I will change the name and after one week there should be new 1.5 version in CVS contrib. Now you can arrange the fields to one or two columns and you can change the order of the fields afterwards. There will be automated updating process but you should remove old contrib database module manually from mod folder.

I'll contact Martin and ask if he can change the name of the CVS folder.


Teemu
In reply to Teemu Sumi

Re: Is ther any way to use the database module before v1.6?

by marcelo vazquez -
This sounds like it is going to work for my student Diary/Journal, but it sounds like I need to wait until you make your changes.  Please send me a link to the download when you are finished so I can get it installed.

Thanks,
Marcelo
In reply to marcelo vazquez

Re: Is ther any way to use the database module before v1.6?

by Teemu Sumi -
You don't have to wait. You can install the version in contrib CVS. When the new version of my contrib module is ready, you can update it but you have to remove the old version. New version is in mod/form folder and the old version in mod/data folder. All the changes in database are done automatically.


Teemu
In reply to Teemu Sumi

Re: Is ther any way to use the database module before v1.6?

by Chardelle Busch -
Picture of Core developers
Great Teemu,

Let us know when its in contrib.  I look forward to testing the new version.  Do you have any plans for templates?
In reply to Chardelle Busch

Re: Is ther any way to use the database module before v1.6?

by Teemu Sumi -
I will send you the address and password. You can test in my test server. I haven't thought about templates yet. I have started new moodle project also. I'm planning a module which reads Excel/calc documents. So there's not much time for this form module.


Teemu
In reply to Teemu Sumi

Re: Is ther any way to use the database module before v1.6?

by Chardelle Busch -
Picture of Core developers
Thanks Teemu,

I had a look -- this is great for forms that need to be filled out repeatedly. For example a weekly action plan, or to do list. This is what differentiates it from Andreas Feedback mod. It would be even better if the students could see all of their past answers!  It could then become a great reflective tool for students.
In reply to Chardelle Busch

Re: Is ther any way to use the database module before v1.6?

by Teemu Sumi -
I must think about that. It should be possible to modify the module so that the students could see all of their answers when "Allow multiple records" is selected. Templates need more work than this modification.


Teemu
In reply to Teemu Sumi

Re: Is ther any way to use the database module before v1.6?

by Chardelle Busch -
Picture of Core developers
That would be great Teemu, I would rather have that than templatessmile. I was thinking it could even become a better type of journal than the old journal was.

And Marcelo, I recommend you try Teemu's data mod for what you need. I don't think new database mod that's coming in 1.6 will keep past attempts.
In reply to Chardelle Busch

Re: Is ther any way to use the database module before v1.6?

by Teemu Sumi -
You can test new feature (show past attempts to a student) in my test server. The address is same as before and the student account is:

mickey

Teacher account is:

donald

Both have same password, which I emailed to you before.

If anyone wants to TEST IT, I can send the passwords.wink


Teemu
In reply to Teemu Sumi

Re: Is ther any way to use the database module before v1.6?

by marcelo vazquez -
What address are you sending the address and password to?  I have not recieved that email.
In reply to marcelo vazquez

Re: Is ther any way to use the database module before v1.6?

by Teemu Sumi -
I send them by email.


Teemu
In reply to Teemu Sumi

Re: Is ther any way to use the database module before v1.6?

by Teemu Sumi -
Sourceforge will change the name of the folder. I have tested the newest version of my contrib module. It's now called form module. I will upload it to the CVS  probably in this week.


Teemu 
In reply to Teemu Sumi

Re: Is ther any way to use the database module before v1.6?

by Chardelle Busch -
Picture of Core developers
Thanks Teemu,

I look forward to trying it.
In reply to Chardelle Busch

Re: Is ther any way to use the database module before v1.6?

by Darren Smith -
Likewise and thank you very much in advance. Time is the most valuable thing we have and I very much appreciate your work on this module for the community.

Darren
In reply to Darren Smith

Re: Is ther any way to use the database module before v1.6?

by Teemu Sumi -
My boss ordered me to do this module in june 2004. Now it's just a hobby.smile I don't have much time for this module anymore, because my boss told me to do another module.


Teemu
In reply to Teemu Sumi

Re: Is ther any way to use the database module before v1.6?

by Teemu Sumi -
I uploaded the latest version. It takes some time before you can see the new version.


Teemu
In reply to Teemu Sumi

Re: Is ther any way to use the database module before v1.6?

by Teemu Sumi -
I can add the new files but I can't remove those files which are not needed anymore. Maybe I can't use CVS.


Teemu
In reply to Teemu Sumi

Re: Is ther any way to use the database module before v1.6?

by Teemu Sumi -
You can now install the contrib form module and even upgrade my contrib database module to form module. Please read README.txt. If you have standard database module installed, YOU SHOULD NOT DO ANY CHANGES IN FORM MODULE'S CODE.

In README.txt there are instructions for those, who want to upgrade my contrib database module to the contrib form module. You can't upgrade my contrib database module to the standard database module.

If you don't know what is a comment in PHP code, please don't try the changes explained in README.txt.

If you don't want to do any upgrades, then just install it like any other module.

Don't install it in producton servers yet. I will inform when it's tested. Testing takes probably two weeks. My contrib database module were already well tested, so I think form module is soon bug free.


Cheers
Teemu
In reply to Teemu Sumi

Re: Is ther any way to use the database module before v1.6?

by Chardelle Busch -
Picture of Core developers
Okay Teemu,

I just got the new form mod and will give it a test drive on a 1.6 install--I'll let you know.

Thanks

Chardelle
In reply to Chardelle Busch

Re: Is ther any way to use the database module before v1.6?

by Chardelle Busch -
Picture of Core developers
Hi Teemu,

I'm not sure what is going on, but here is what happened.  I create a form, then arrange the fields and save.  When I click on the start button from view.php, it tries to go to edit.php but then bounces back to view.php--so, I can't get to the form to fill it out.   Also, the fields do not show up on the presentation page if this option is set to yes.  And, the form does not show up on the form/index.php page.  This was a fresh install (not an upgrade) in 1.6.
In reply to Chardelle Busch

Re: Is ther any way to use the database module before v1.6?

by Teemu Sumi -
It works here. What is your system? Is that latest 1.6 from CVS? It goes like that if you don't have updatedby field in mdl_form table.


Teemu
In reply to Teemu Sumi

Re: Is ther any way to use the database module before v1.6?

by Chardelle Busch -
Picture of Core developers
It's the 2/24 version of 1.6.  And yes, I do have the updatedby field.  I will try again the next time I update 1.6.
In reply to Chardelle Busch

Re: Is ther any way to use the database module before v1.6?

by Teemu Sumi -
I think I found the problem. I will test it soon. I will inform you soon.


Teemu
In reply to Chardelle Busch

Re: Is ther any way to use the database module before v1.6?

by Teemu Sumi -
Is that public server? I can't reproduce this bug.


Teemu
In reply to Teemu Sumi

Re: Is ther any way to use the database module before v1.6?

by Chardelle Busch -
Picture of Core developers
Hi Teemu,
This is on a windows installation with the latest 1.6 development. With debug on I get this error (and I still have the same problem, hitting start doesn't do anything--I can't get the form:

Error: Turn offdebugging to hide this error.

SELECT * FROM mdl_form_answers WHERE attempt='0' AND formid='1' AND userid='2'

Found more than onerecord in get_record_sql !

Array ( [1] => Array ( [id] => 1 [0] => 1 [formid] => 1 [1] => 2 [userid] => 2 [2] => 1142370288 [modified] => 1142370288 [3] => 0 [attempt] => 0 [4] => [feedback] => ) [2] => Array ( [id] => 2 [0] => 1 [formid] => 1 [1] => 2 [userid] => 2 [2] => 1142370294 [modified] => 1142370294 [3] => 0 [attempt] => 0 [4] => [feedback] => ) [3] => Array ( [id] => 3 [0] => 1 [formid] => 1 [1] => 2 [userid] => 2 [2] => 1142370301 [modified] => 1142370301 [3] => 0 [attempt] => 0 [4] => [feedback] => ) [4] => Array ( [id] => 4 [0] => 1 [formid] => 1 [1] => 2 [userid] => 2 [2] => 1142370415 [modified] => 1142370415 [3] => 0 [attempt] => 0 [4] => [feedback] => ) )

In reply to Chardelle Busch

Re: Is ther any way to use the database module before v1.6?

by Teemu Sumi -
Are you using MySQL 5? The module is not tested with it. I made many changes and I belive it should work now with MySQL 5. Please upgrade the whole module.


Teemu 
In reply to Teemu Sumi

Re: Is ther any way to use the database module before v1.6?

by Chardelle Busch -
Picture of Core developers
It's whatever version downloads with moodle for windows 1.6.  I'll try again.
In reply to Chardelle Busch

Re: Is ther any way to use the database module before v1.6?

by Chardelle Busch -
Picture of Core developers
Hi Teemu,

Since your mod is no longer the database mod, we should probably move this thread to the activity modules forum.

But, anyway, I just installed the latest form mod in 1.5.3+.

A couple of things:

An error in report.php:  Line 153, users should be user.

And with debug on, this shows up on the answer.php and edit.php pages:

Coding error: isteacher() should not be used without a valid course id as argument. Please notify the developer for this module.

But I don't see why, since  you do have $course->id with isteacher.  Do you have any idea why?

But it does work!!!!  Users can see all of their past attempts! 
In reply to Chardelle Busch

Re: Is ther any way to use the database module before v1.6?

by Teemu Sumi -
Thanks!

I fixed report.php and form.php (the problem was not in edit.php).

Do you still have problems with 1.6?

I will start a new discussion in activity modules right away.


Teemu
In reply to Teemu Sumi

Re: Is ther any way to use the database module before v1.6?

by Darren Smith -
Hello.

i tried to update the cotrib database module in 1.5 with form from CVS but struggled. I installed the module and it set up the tables. I then edited the files (I do not have the standard database module) and then the admin page just shows a blank white page. I deleted it all and tried again but still had no luck.

Am I doing anything wrong? Thoughts?

Darren
In reply to Darren Smith

Re: Is ther any way to use the database module before v1.6?

by Teemu Sumi -
There was ´ in wrong place in db/mysql.php. Please download that file again.


Teemu
In reply to Teemu Sumi

Re: Is ther any way to use the database module before v1.6?

by Darren Smith -

Hello.

I'm looking at this again in prep for a 1.6 upgrade and still getting nowhere.

I downloaded the latest zip from cvs and the date on the mysql.php file is after your post so it must be up to date.

I installed the forms module, went to the admin page (seemed fine), made the number and comment changes required.

Any thoughts? mixed

TIA

Darren

EDIT: Debug makes no difference

In reply to Chardelle Busch

Re: Is ther any way to use the database module before v1.6?

by marcelo vazquez -
I am excited about this as it really seems like the solution
In reply to marcelo vazquez

Re: Is ther any way to use the database module before v1.6?

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
The official database module for 1.6 is being designed so that it also works on Moodle 1.5.
In reply to Martin Dougiamas

Re: Is ther any way to use the database module before v1.6?

by marcelo vazquez -
THat is good news, how is the design of the official database module comeing along?  Should I be looking at it a solution for my problem?  I need to get something working in the next few weeks.

Thanks,

Marcedlo 
In reply to marcelo vazquez

Re: Is ther any way to use the database module before v1.6?

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
It's working and in CVS but I'm indulging in a little rewriting already because I want to make sure the API for its plugins (you can drop in new field types) is good and stable before we unleash it officially.
In reply to Martin Dougiamas

Re: Is ther any way to use the database module before v1.6?

by Chardelle Busch -
Picture of Core developers
Hi Martin,

I did try out the databse in the 2/24 1.6 version and it looks intriguingwink.  Although, I must admit I was extremely confused about the templates thing--I got error messages if I didn't create one.  And when I tried to make a template I was unsure about the tab titles, what they meant, what to do etc.  I figured it wasn't quite ready yet, so will try again when 1.6 beta comes out.