transfering data from moodle lessons to quizports

transfering data from moodle lessons to quizports

by Katie Fraser -
Number of replies: 2

Hello,

Could anyone tell me what the best way to transfer Moodle lesson activities (question pages, in particular) to quizports?  Is there a shorter way of doing it than manually cutting and pasting all those fields (content of question page, answers, grade, etc) into Quizport fields? I have 6 lessons and about 20 question pages per lesson (some have lots of images). Any advice would be much appreciated. Thanks,

Katie

PS- Can a large amount of text be put into a quizport question field, or should I be looking at a different module?

Average of ratings: -
In reply to Katie Fraser

Re: transfering data from moodle lessons to quizports

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

As is often the case in Moodle, the "best" way, depends how familiar you are with the tools you have at your disposal.

For me, the quickest way would be to extract the information from the Moodle database. If you have access to a database administration program, such as phpMyAdmin, you could extract the lesson pages with something like the following SQL:

SELECT title,contents
FROM mdl_lesson_pages
WHERE lessonid IN (SELECT id FROM mdl_lesson WHERE course=99)

You may need to change "mdl_" to whatever prefix database table prefix your Moodle site is using ("mdl_" is the default). Also, you need to change the "99" to whatever the id is for the course where the lessons are.

You could take the above idea a stage further and have the database server create the html too. The following code works on a MySQL server:

SELECT CONCAT(
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"',
' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
'<html><head>',
'<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />',
'<title>',title,'</title>',
'</head><body>',contents,'</body></html>'
) AS copy_and_paste_to_an_html_file
FROM mdl_lesson_pages
WHERE lessonid IN (SELECT id FROM mdl_lesson WHERE course=99)

As before, you will need to change "99", and maybe "mdl_", to suitable values for your Moodle course and database.

regards
Gordon

Average of ratings: Useful (1)
In reply to Gordon Bateson

Re: transfering data from moodle lessons to quizports

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

> Can a large amount of text be put into a quizport question field,
> or should I be looking at a different module?

QuizPort expects the content and questions to be in files, not fields. The files may be static html files, or they may be interactive quiz files, e.g. Hot Potatoes quizzes.

Looked at this way, you question becomes, "Can a large amount of text be put into a file", to which the answer is "Yes".

However, of course you need to bear in mind how much you think the students can digest in one page at a time, when they access the information using their favorite browser on their favorite viewing device.

regards
Gordon