Where are lesson questions in database?

Where are lesson questions in database?

by ben reynolds -
Number of replies: 7
Hi,
I never realized that questions imported into Lesson cannot be exported.

So, the question is, given I have access to the database, where are the questions? Name the table, please.

If I know that, I can export them, right?

Thanks!


Average of ratings: -
In reply to ben reynolds

Re: Where are lesson questions in database?

by Kristina Spurgin -
Hi Ben,

I was trying to figure this out recently and gave up because it seemed too complicated for my low-to-middling db skills. The different parts of the lessons are stored in at least 3 different tables.

mdl_lesson has the overall info about the lesson (the options available when you click "update lesson.")

mdl_lesson_pages has each page's layout including whatever question is asked on each page.

mdl_answers has the different answer options you provide, with the associated feedback, points, and "next steps" in response to each answer.

I tried exporting these tables to a spreadsheet and editing there, but moodle didn't recognize the new lesson info I imported directly into mdl_lesson, and wouldn't associate it with the questions I imported to the mdl_lesson_pages table. It seems there are other things tied into making a lesson actually show up.

So it isn't just as simple as exporting the questions with their answers.

I played around a bit with the Excel2Gift file ( http://moodle.org/mod/forum/discuss.php?d=66660 ) for creating questions to import into lessons, but it seemed almost as cumbersome as editing in the Moodle GUI.

I find it is very slow to develop materials because of waiting for the pages to load and reload, and navigating through all the various text entry boxes and buttons. I hoped to find some way I could just develop/code a whole lesson in plain text or a spreadsheet and upload it, but haven't figured it out yet. Let me know if you figure something out.

Good luck,
Kristina


In reply to Kristina Spurgin

Re: Where are lesson questions in database?

by Chris Collman -
Picture of Documentation writers
Hi Kristina,
Quick comments, because I have to proctor a Moodle Quiz this morning. I will reply again with links to MoodleDocs.

Slow loading. My complaint as well back in 2006. Solution, compile your course or lesson on a localhost. Back it up and then restore it on your production Moodle. It is really easy to have your own Moodle on your computer. Really cuts down on the page loading. Strongly recommended for any online learning software program as a teacher. Moodle on a stick?

Eventually, Lesson will be able to draw upon question bank. No exporting quesstions for sure from Lesson out. So that suggests that maybe you want to compose them in another format. Excel or Word to Gift, or perhaps in a question category in question bank, then export them as a gift file, then import those into lesson.

Moving pages is easier now, but consider breaking the gift file of 20 questions into smaller pieces with a text processor. Then importing those.

Must run. Best Chris
In reply to Kristina Spurgin

Re: Where are lesson questions in database?

by ben reynolds -
Thanks, Kristina. That's good help.

I'm actually so disenchanted with questions in Lesson that I'm going to move them all to Quiz. Two big problems:
  1. Students can't see the results of their work until they complete the whole lesson. And the percentage score isn't particularly helpful.
  2. If a student leaves a lesson and returns, they can't see that the questions they've already answered have been saved. So, they start all over, wiping out their previous work. This is particularly harsh on my primary school kids.
Had I known the above before I started, I would have made all quizzes and just linked to them from inside the lesson.

So, that's my plan. BTW, a co-worker has worked out a script that grabs questions from our coldfusion application and puts them into Quiz quite nicely, including associated images. Thus, I'm hoping if I can get the lesson questions out that he can figure a way to get them into Quiz.

I've been following Chris's trumpeting of the millenial question bank for quite a while. Hope springs eternal!
In reply to ben reynolds

Re: Where are lesson questions in database?

by Chris Collman -
Picture of Documentation writers
Hey Ben,
In Lesson setting: Display ongoing score, the help says "With this turned on, each page will display the student's current points earned out of the total possible thus far. Example: a student has answered four 5 point questions and answered one incorrectly. The ongoing score would print that s/he has currently earned 15/20 points." Not a feature we use.

Does sound like you should be using quiz, if reviewing is important. I have played around with text pages in a Quiz to present content in between questions. The only issue with Quiz is that I lose the adaptive jumps of Lesson. But if that does not have value for what you are doing it is no loss.

You and Kristina have seemed to dive into the back end of Lesson. Phpmyadmin sort of scares me smile I get the idea that there is no database for a student's answers. Sort of a bucket for a student to record number of correct answers, another for possible answers. Same thing for each question. It records how many students selected an answer but not which students.


Hope always springs eternal smile Like import OOimpress or import a series of branch tables in somesort of GIFT format....the list goes on.

Chris





In reply to Chris Collman

Re: Where are lesson questions in database?

by ben reynolds -
Quoting Chris:
>I get the idea that there is no database for a student's answers. Sort of a bucket for a student to record number
>of correct answers, another for possible answers. Same thing for each question. It records how many students
>selected an answer but not which students.

I thought so, too, but one of my teachers took me painfully through the report.

If you click Reports > (for example)
Ben Reynolds Not completed Monday, 22 September 2008, 09:29 PM
You actually get an item by item for just Ben Reynolds, including errors. It is, however, couched in the same language as the group item analysis you get if you click Reports > Detailed Statistics:
84.62% checked this one.
No one checked this.
15.38% checked this one.
So, there's both an individual and a group report. It has taken me three months to realize this. The kids can't see it, of course. All they see is a percentage.
In reply to Chris Collman

Re: Where are lesson questions in database?

by Kristina Spurgin -
I get the idea that there is no database for a student's answers. Sort of a bucket for a student to record number of correct answers, another for possible answers. Same thing for each question. It records how many students selected an answer but not which students.

Edit: ((( I ferreted this out because I wanted to see the wrong answers my students were giving before they figured out the right ones. My questions are primarily short-answer format with 5 tries allowed before students are sent ahead.

With this, you can see every response given by every student every time they attempted a lesson. I didn't think I saw this info in the individual student report Ben explained above, which is much more convenient if it suffices. smile )))


Actually you can get that info. It is in the useranswer field of the mdl_lesson_attempts table.

But to make any sense of it, you've got to cobble together info from a few other tables. smile

If you want to see the answers a particular student gave, you have to know the numeric id given to each student (mdl_user).

Then you need to know the ids corresponding to the page/questions (mdl_lesson_pages) and the lesson to which pages belong (mdl_lesson).

If you just want to look at what students have entered, and the answers to the different questions of the lesson are pretty easy to tell apart, you can get an idea from glancing over just the mdl_lesson_attempts table.

I export the info from these tables from phpmyadmin (For each table, click the Export tab at the top, choose Excel, make sure labels will be in top line, and save) and then play with them in a big spreadsheet so I don't have to worry about messing up something in the real database inadvertently. cheers, Kristina

In reply to Kristina Spurgin

Re: Where are lesson questions in database?

by ben reynolds -
Hey Kristin,
Check this out! Exporting questions from Lessons!

If you use http://moodle.org/mod/forum/discuss.php?d=56084#p414534 Greg's print.css, you can pull the questions out of the lessons, along with the content of the whole lesson.

And, if you have Acrobat (not reader) 9.0, you can export to Word, XML, etc.

This allows you (I haven't gotten this far yet) to put the questions into whatever format. Though you have to pick out the questions from the "reading" content.

Acrobat 9 allows you to export to (at least) Word or XML 1.0 (a la Moodle XML questions).

More news as I figure this out. Thanks to Greg!