Forums
Hi,
How is the "Browse for Questions to Add" report created?
Could you tell me what feeds the “Browse for questions to add” results? I thought it was a View, but I looked all through the Views and couldn’t find a View that fed it. I’ve been look all through the various menus and Admin views. I must be overlooking it somewhere. The other question that goes along with the first is, where do I go to change the fields that are used in the results? Currently, the fields are Title, Type, Changed, and Username.
Changing the Fields
I want to change some of the fields and perhaps had some different ones. I also want to experiment adding a category field. Where do I go to change the fields? I realize that I would probably have to add some fields to the various Question content types as well. I'd have to do some experimenting to see what would be possible. At this point I dont' know exactly what all the fields that I'd like to add are, but here is a possible sample.
An Example
An explanation: When I create a course it will have a number of lessons. Those lessons may correspond to various chapters or subsections in a textbook (or divisions of an online course). Some chapters, or subchapters, may have 5 or 10 lessons in it. Then the lessons in a textbook or course may be grouped into sections, which (sometimes) 3 to 8 chapters might be contained into one section, like this:
SectionChapterLesson - with review questions at endLesson - with review questions at endLesson - with review questions at endLesson - with review questions at endChapter Quiz - randomly taken from review questions of this chapterChapterLesson - with review questions at endLesson - with review questions at endLesson - with review questions at endChapter Quiz - randomly taken from review questions of this chapterChapterLesson - with review questions at endLesson - with review questions at endLesson - with review questions at endLesson - with review questions at endChapter Quiz - randomly taken from review questions of this chapterChapterLesson - with review questions at endLesson - with review questions at endLesson - with review questions at endLesson - with review questions at endLesson - with review questions at endChapter Quiz - randomly taken from review questions of this chapterSection Review - taken from pool of all review questions from this SectionSection Exam - randomly taken from pool of all review questions of this sectionSection
What I'd Like to Do
What I'd like to be able to do is this. Each lesson would contain review questions at the end. Then each chapter would have a quiz at the end. The quiz questions would come from thpse review questions. Then there would be a test at the end of each Section. Those questions would also come from the review questions that were given at the end of each lesson. Then, at the end of the course an exam would be given. Again, the questions would come from pool of those review questions.
This would only work if the questions could be filtered by course, by sections, and by chapters.
Creating Additional Filters
Since you've already design the questions to be attached to each lesson, that would not need to be filtered. It would be great if the questions could be filtered by Course, by Section, and by Chapter, (and also by keywords). The keywords would allow questions to be grouped by topic for a topic exam. Unless you know of a better way, I imagine that could be done by creating additional vocabularies, one for course, one for course section, and one for chapter (or maybe better yet, using one hierarchical taxonomy for those three)? . Then, of course, as you already have the questions filtered by title and by question type, both of which might also be useful.
Could You Give Me Some Guidance?
So, could you give me some guidance about how to modify the existing question filter, or maybe how to make a new filter that could be used instead of the existing one. Separately, I also have another idea or thought below.
Brainstorming Out Loud
Here, I'm just throwing out some ideas. I wonder, for this to work effeciently, perhaps creating a hierarchy Taxonomy vocabulary for Courses, Sections, etc.. Then, whenever a Course is created, (perhaps using Tokens) a vocabulary term for the course name is automatically inserted into the vocabulary. Then, if desired, the course could be divided into sections, and those sections divided into subsections, or chapters. Again (presumably using tokens, unless there is a better way) vocabulary terms would be added to added from sections and subsections into the hierarchy of the vocabulary.
When the lessons would be created, they would take on the same hierarchy (using a child term) as the Courses, subsections, and chapters. When the questions would be created, they also would take on the same taxonomy hierarchy, only down one more level.
So, theoretically, the hierarchy tree of the vocabulary terms would flow down from parent to child all the way from Courses, to sections, to chapters, to lessons, to questions. I only have a little experience with Tokens, so I don't know how or if all this would work together as explained, but at least it is kind of a plan (or desire).
So, do you understand my above thoughts. If so, do you think this is a possibility?
Thanks,
Best Wishes
Stephen
Hi Stephanw,
Hi Stephanw,
I would start by adding a taxonomy vocabolary "Question Category" and adding a entity reference field to all the question types.
The quiz module for this interface does not use views. So to add your custom filters you can look at the function _quiz_question_browser_form inside the file quiz.admin.inc
Best regards
James Aparicio
Found it, but now what?
I finally found that file. I don't know what to do with it. I'm not a programmer.
For future reference, that "quiz.admin.inc" file is found at "profiles/opigno_lms/modules/contrib/quiz/quiz.admin.inc". I had to search all over to try to find it. I also found the "function _quiz_question_browser_form inside the file quiz.admin.inc" I looked through the code, but I'm not a programmer. I can't write code, but I can kind of look through it and make a little sense out of it here and there. From time to time I copy and replace sections of code (after I've had a problem and searched the Internet and found code that someone else had already written.) One thing that I did do was change the search limit from 10 results to 50 results. I like to look at more results than 10. So that was useful.
One of the beauties of using Drupal is that it is so configurable. However, having the functions only in code is hard for a guy like me to know what to do with. Is there some way that the "Browse for Questions to Add" form could be converted to a View? That would make it much more configurable, and we could choose which fields to use and how they are displayed. If that isn't possible, can you resign that form to allow the user to configure the fields that he wants to search by? Thanks.
Best Wishes,
Stephen
In reply to Hi Stephanw, by James Aparicio
Hi James,
Hi James,
In Response to Your Reply, this is what I can do
Thanks for responding. Now that I'm thinking clearly (than my first response below), let me see what I can do. I can add the taxonomy vocabulary, I've never used the entity reference field, so I'm going to have to study how it works so I know what to do with it. I'll start by experimenting with that and see what I can do. I've done that type of stuff before. However, for the second part of your suggestions I may need a little more help. I don't know what to do about writing or changing the code. So, I'm stopped there. Here are some other things I've been thinking.
Here's Another Thought (Doing the following is what I'm familiar with, would Entity Reference work better than what is below here?)
1. Setting up The Vocabulary (This this case called "Course Offering")
Another thought. Before you replied, I had installed the Taxonomy Manager and then created some sample hierarchy terms, as shown below. Would any of this be useful in creating and using a taxonomy course/section/manager hierarchy structure that I described in my first message?
2. Adding the Question to the Vocabulary
Then, after adding that vocabulary field to one of my question content types, I tried it out on the Question page. it creates this menu list box below (i.e. Course Offering) on that Question page
And this is what is looks like (below) when that menu box is clicked upon.
Is any of this useful in my objective? From just looking at how the questions can be connected to the vocabulary hierarchy, it almost seemed like it might work similar to what I want, if I could somehow get it connected to the Question Browser page.
3. Is it possible to connect this to the Question Browser?
It would be fairly simple and straightforward for me to connect this if the browser was using a View. But I don't know how to do the coding if that is what is required.
Is any of this useful, or should I start over again?
Thanks,
Best Wishes,
Stephen
Hi Stepen,
Hi Stephen,
I would say that transforming the "Browse for Questions to Add" into a view would give you the same or more work than reading the code and adapting it. Because when you submit the view, you perform actions (add the question to the quiz). This is not something that views does out of the box, you would still have to reuse the code inside the quiz file.
BTW, when adding the vocabolary to your content type, you should use the entity reference field type instead of term reference if you want better views integration.
Best regards
James Aparicio