I have a course named: "Math", with 3 topics inside it : (areas, functions and limits), then I created a small form (titled: Topics To Concentrate on) on a blank page that contains these topics names with drop-down box beside each topic's name, each drop-down box contains 0-100% percent values. Another drop-down box at the the bottom (labeled: Number of Questions To Generate; contains max number of questions on the question bank that belongs to this course) saved this form as form1.php.
I need to add a drop-down box (labeled: Question Belongs To Topic: ...) inside the question's page, this drop-down box contains the 3 topics (areas, functions and limits) to enable teacher to select the topic to which that question belongs.
The teacher then created 50 questions inside the question bank of that course, giving each question a value from "Question Belongs To Topic" drop-down box inside the question's settings page.
After that, the teacher enters her course, she will see a button (titled: Generate Quiz), once pressed, form1.php pops up to let that teacher to select which questions (that belongs to a particular topic) to generate more on the quiz, let's say that she selected : 10% for topic (areas) and 10% for topic (functions) and 80% for topic (limits), and (10) as the number of questions in that quiz, when she presses "DONE" on that form, "Editing Quiz" page loads with 8 questions (related to topic "limits"), 1 question (related to topic "functions") and 1 question (related to topic "areas") will be placed on the (questions in this quiz) column (the left column), each question has a default grade of (1), giving the teacher the ability to change these default grades and save changes to return back to course and see the quiz icon ready for her students.
quiz settings will be hard coded for this moodle site, so there will be no quiz settings page.
any ideas on how to:
1) connect form1.php to moodle database.
2) how to add (Question Belongs To Topic: ...) drop-down box chosen value to questions table in database.
3) and how to place questions on left column depending on chosen percentages from form1.php
would be highly appreciated.
thank you so much in advance.