Import questions function

Import questions function

by Youssef Alamrousy -
Number of replies: 2

Hello,

I'm new to moodle. I'm doing a project for university using moodle. I have a .xml file that contains questions and I want to import these questions when I click on a specific button. I've found import.php file which is used to import questions into question bank and I actually didn't understand how can I send the xml file I have to import.php so I can save these questions. I don't want to upload this file, it's auto generated when I click on a button so I want to import it after it's generated.

Average of ratings: -
In reply to Youssef Alamrousy

Re: Import questions function

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
What does the code inside import.php do, to cause the file that the user has uploaded to be imported?
In reply to Tim Hunt

Re: Import questions function

by Youssef Alamrousy -
It includes the form which is displayed to the user to upload the file and contains the logic to process this file (importprocess() function).