1.6-question: Questions in left menu

1.6-question: Questions in left menu

av Erich Nielsen -
Antal svar: 19
Hi,

some time ago, someone asked if it was possible to have the questions in the lesson visible in the left menu. I recall that someone said that it could be a nice feature. Was that implemented in 1.6, if not are there plans to implement it in a later version?

All the best from a sunny Stockholm,

Erich N
Medeltalet av utvärderingarna: -
Som svar till Erich Nielsen

Re: 1.6-question: Questions in left menu

av Mark Nielsen -
Hi Erich,

As 1.6 has already been released, which means no new features can be added that could potentially create new bugs, we have to implement this in a later version of Moodle.  So it does not get lost again, I created a bug report: Bug #5911

Cheers,
Mark
Medeltalet av utvärderingarna: -
Som svar till Mark Nielsen

Re: 1.6-question: Questions in left menu

av Erich Nielsen -
it would be perfect to have that implemented.

I want the users to have the possibility to use the left menu as a guidance undependantly if it is a question or a branch.

All the best from a sunny Stockholm,

Erich N
Medeltalet av utvärderingarna: -
Som svar till Mark Nielsen

Re: 1.6-question: Questions in left menu

av Sergio Yazyi -
Hi Mark,
Although this post is a rather old one leende I've come up with the same idea, and I found some old discussions regarding this feature request, but I see it as still pending.

The help states that if you want to see the question (lesson page) in the left menu you can set this at the question level. So I had a look to the tables and code and figure out how to allow this. I tweaked my code in this way:

  • As the field required is already in the lesson_pages table (display) but is only used by the branch tables. I modified the lesson_print_menu_block function in mod/lesson/locallib.php to process all pages that have the display attribute On (not only the branch tables).
  • Then modified the mod/lesson/editpage.php and addpage.php scripts to show the input box and allow to turn it on/off as desired.
It works very well, this can be a good feature to add officially, specially because is already suggested in the help pages. leende
As I'm new to Moodle, from your experience, do you see any side effects of this changes?
Thank you in advance!
Sergio

PS: here I've attached the suggested patch. any comments and suggestions are welcome.
Medeltalet av utvärderingarna:Useful (1)
Som svar till Sergio Yazyi

Re: 1.6-question: Questions in left menu

av Steve Bilton -
Hi Sergio,

I have a heavily customised 1.6 moodle.

Your patch does breaks my lessons. addpage.php & editpage.php code changes both work no problem, but the changes to localib.php break lessons.

In my locallib.php there are not enough lines of code as defined in your patch.

I have manually edited all the files and applied the changes (firstly finding the relevant code as my locallib.php does not contain as many lines as defined in your patch..

I have tried a few different code changes myself but it keeps breaking lessons, or not taking affect.

I hope that you may be able to help point out where I might edit my localib.php to allow for question types to be displayed in the left menu.

NOTE: In my locallib.php i have also disabled the linking feature by commenting out the url linking code.

My localib.php is attached if you might be so kind as to have a look.??

Thank you in advance for any help.

Cheers
Steve
Medeltalet av utvärderingarna: -
Som svar till Steve Bilton

Re: 1.6-question: Questions in left menu

av Sergio Yazyi -
Hi Steve,
Unfortunately I made the patch only for 1.9 version.
But I had a look at the locallib.php you attached, I guess the change for that version should be to this function:

function lesson_print_tree_link_menu($page, $id, $showpages=false) {
if ($page->qtype == LESSON_BRANCHTABLE && !$page->display) {
return false;
} elseif ($page->qtype != LESSON_BRANCHTABLE) {
return false;
}
Try changing to something like:
function lesson_print_tree_link_menu($page, $id, $showpages=false) {
if (!$page->display) {
return false;
}
Because that if is considering the display attribute only for the branch tables.
Hope this helps.
Sergio









Medeltalet av utvärderingarna:Useful (1)
Som svar till Sergio Yazyi

Re: 1.6-question: Questions in left menu

av Steve Bilton -
Hi Sergio,

ah yes I see that will most likely work. Thank you for your reply, most kind leende

Medeltalet av utvärderingarna: -
Som svar till Sergio Yazyi

Re: 1.6-question: Questions in left menu

av Steve Bilton -
Hi Sergi,

Can you tell me if your 1.9 patch will work on a 1.8 moodle?

ta.

Steve
Medeltalet av utvärderingarna: -
Som svar till Steve Bilton

Re: 1.6-question: Questions in left menu

av Pavan Kota -
It will be great if this can be added as an offical feature.

Best regards,
Pavan Kota
Medeltalet av utvärderingarna: -
Som svar till Pavan Kota

Re: 1.6-question: Questions in left menu

av Steve Bilton -
I have tested the code changes in a 1.8.4 & 1.8.8 moodle for this feature and both worked perfectly.

Thanks again Sergio!! Top notch!
Medeltalet av utvärderingarna: -
Som svar till Sergio Yazyi

Re: 1.6-question: Questions in left menu

av Jack Neary -

Hi Sergio,

I came arcoss this post, as I would also like to include question pages in the left menu.

However I am running Moodle 2.0 and they have significantly changed the locallib, and specifically the function for the left menu and I can't seem to figure it out. there no longer appears to be any reference to question types within the function.

I was wondering if you, or anyone else for that matter had managed to get questions into the left menu in Moodle 2.0?

Thanks for your time,

Jack

Medeltalet av utvärderingarna: -
Som svar till Jack Neary

Re: 1.6-question: Questions in left menu

av Dhanabalan c -

I am new to moodle. can u tell "How to show the question pages in lesson left menu" ? i am not able to see any option in question page ..

Please help me!

Medeltalet av utvärderingarna: -
Som svar till Dhanabalan c

Re: 1.6-question: Questions in left menu

av Joseph Rézeau -
Bild av Core developers Bild av Particularly helpful Moodlers Bild av Plugin developers Bild av Testers Bild av Translators
Som svar till Joseph Rézeau

Re: 1.6-question: Questions in left menu

av Dhanabalan c -

By using those link .. i am not able to show the "question page" in lesson menu?

Medeltalet av utvärderingarna: -
Som svar till Dhanabalan c

Re: 1.6-question: Questions in left menu

av Joseph Rézeau -
Bild av Core developers Bild av Particularly helpful Moodlers Bild av Plugin developers Bild av Testers Bild av Translators

Which version of moodle are you using?

Medeltalet av utvärderingarna: -
Som svar till Joseph Rézeau

Re: 1.6-question: Questions in left menu

av Dhanabalan c -

I have another question...

1. i wanted to create a lesson in below structure .. is it possible?

chapter 1

        chapter 1.1

        chapter 1.2 

       Glossary 1

       Assesment Exercise 1

chapter 2

        chapter 2.1

        chapter 2.2 

       Glossary 2

       Assesment Exercise 2

End of Lesson part

Exercise .

         1.  Set of 10 Questions in a single page (True / false)

         2. Set of 10 Questions in a single page (Multiple Choice)

         3. Set of 10 Questions in a single page (Matching question)

Medeltalet av utvärderingarna: -
Som svar till Dhanabalan c

Re: 1.6-question: Questions in left menu

av Joseph Rézeau -
Bild av Core developers Bild av Particularly helpful Moodlers Bild av Plugin developers Bild av Testers Bild av Translators

I'm afraid you are not using the word "Lesson" in the meaning that this word has in Moodle. In Moodle, Lesson is a type of activity that can be part of a Course.

What you call a "lesson" in your message is in fact a moodle "Course". Please read carefully the Moodle documentation to understand better how Moodle works.

Joseph

Medeltalet av utvärderingarna: -
Som svar till Joseph Rézeau

Re: 1.6-question: Questions in left menu

av Dhanabalan c -

Sir, i have gone through the moodle docs.

Actually my lesson parts splits like below [Book index Format]

Section 1

Section 2

Section 3

Glossary

Exercise Works

I have done in above format...

BUT My question is :

1. Whether Moodle supports Ten or more quiz questions in a single page [Exercise Works]

2. How to display question pages in Lesson menu?

3. Whether Moodle supports Book like index format?

Advance Thanks  for UR Response!

Medeltalet av utvärderingarna: -
Som svar till Erich Nielsen

Re: 1.6-question: Questions in left menu

av Jean-Michel Védrine -

Just an update on this feature.

I think it could be interesting to be able to diplay some/all questions in the left block menu.

So I made a patch for recent Moodle version in the MDL-5911 tracker issue.

But it seems that this issue has no more watcher or vote so maybe I am wrong in thinking this could be an interesting new feature.

So if you are interested, please vote for this issue or comment.

I will not send it to peer review if nobody is interested leende

Medeltalet av utvärderingarna: -