Front Page "Accordion" Course Menu (video inside)

Front Page "Accordion" Course Menu (video inside)

by Mark Schumann -
Number of replies: 73
I developed this front page modification to allow users to select their courses via a fluid "accordion-style" menu, and thought I would share it with others who may be interested in using it.

You'll need to make a minor adjustment to the root index.php file, but the rest won't need to be touched. The script assumes that you have a set of categories for the headers and subcategories for the "accordion" list. Courses within these subcategories will be linked under this list. Any additional subcategories will also be displayed within this list.

See a video demonstration here
Download the code here

I'd greatly appreciate any comments or feedback you may have.
Attachment accordion.jpg
Average of ratings: -
In reply to Mark Schumann

Re: Front Page "Accordion" Course Menu (video inside)

by Matt Gibson -
Looks good!

This would be super-amazing if it was a block and could replace/overlay the standard My courses block. It does seem quite large at the moment, perhaps collapse the accordions into three bars that would expand on mouseover, so that the course menu could be in the header, just above the breadcrumbs.

Interesting recent discussion about javascript here stuff, in case you didn't see it.

I'll give it a try when I've got some time next week.
In reply to Matt Gibson

"Accordion" Course Menu - Problem with links

by Barry Oosthuizen -
The video looks great!

When I click on the accordion it tries to link to

http://localhost/course/view.php?id=2

instead of

http://localhost/moodle/course/view.php?id=2

Please let me know how to fix it.

Thanks,

Barry

In reply to Barry Oosthuizen

Re: "Accordion" Course Menu - Problem with links

by Mark Schumann -
Hi Barry,

Thanks for the comments. I've updated the code to hopefully fix your issue, can you try downloading it again and let me know how you go?

Thanks,

Mark
In reply to Mark Schumann

Re: "Accordion" Course Menu - Not expanding etc

by Barry Oosthuizen -
Hi Mark,

thanks for the help, the links are not creating any errors now, but whenever I click on a subcategory they all take me to the same top category page (Miscellaneous) and all the courses are always visible and not collapsed. The menu doesn't expand or collapse at any time like in your video. I thought it was to do with my AJAX settings but I have enabled AJAX.

Is there another setting somewhere I need to change? I see Chen has the same problem.

Barry




In reply to Barry Oosthuizen

Re: "Accordion" Course Menu - Not expanding etc

by Mark Schumann -
Hi Barry,

Please see my reply to Chen (below) or give me a couple of days to update the archive. I forgot to include one important step.

Mark
In reply to Matt Gibson

Re: Front Page "Accordion" Course Menu (video inside)

by Mark Schumann -
Thanks Matt, I appreciate your suggestions. The My Courses block is definitely the next step, so i'll see if I get any time over the next couple of weeks to implement something.

For the moment it's just intended as a front page mod, but a header menu sounds like a great idea.

Thanks again,

Mark
In reply to Mark Schumann

Re: Front Page "Accordion" Course Menu worked in different way

by Chen ZhongWei -

thanks, Mark,

  I am also expecting a such style headermenu.  

I tried your great menu last night, it works well. But I can only see the header, no menu items was displayed in the list. Then I created some subcategories, and courses in the subcategory displayed in the list directly without mouse clicking .

   Can you help me ?Thanks.

Attachment accordion_menu_CZW.gif
In reply to Chen ZhongWei

Re: Front Page "Accordion" Course Menu worked in different way

by Mark Schumann -
Hi Chen,

It seems I missed one important step that I didn't include in the readme. I'll update the file in the next couple of days, but for the moment you'll need to do the following:

In your theme's header.html file, within the <head> tags, include the following code:

<script>
$(document).ready(function(){
$("dd").hide();
$("dt a").click(function(){
if ($(this).parent().next().is(':visible')) {
$(this).parent().next().slideUp("slow");
}
else {
$("dd:visible").slideUp("slow");
$(this).parent().next().slideDown("slow");
}
return false;
});
});
</script>

This should enable the menu animations.

Let me know how you go.

Mark
In reply to Mark Schumann

Re: Front Page "Accordion" Course Menu still not work

by Chen ZhongWei -
Hi, Mark,
I modified the code as you suggested, but it didn't work yet. I checked code in accordion_course_menu files and found that the file " jquery-1.2.6.min.js " is not referenced anywhere.Is that the problem?
Thanks.

Chen
Average of ratings: Useful (1)
In reply to Chen ZhongWei

Re: Front Page "Accordion" Course Menu still not work

by Mark Schumann -
Hi Chen,

Yes that should be referenced as well just above the previous entry in the header.html file, sorry I missed that line myself. Use the code below to replace the code I gave you in my last reply:

<script src="<?php echo $CFG->themewww .'/'. current_theme() ?>/accordion_course_menu/jquery-1.2.6.min.js"></script>
<script>
$(document).ready(function(){
$("dd").hide();
$("dt a").click(function(){
if ($(this).parent().next().is(':visible')) {
$(this).parent().next().slideUp("slow");
}
else {
$("dd:visible").slideUp("slow");
$(this).parent().next().slideDown("slow");
}
return false;
});
});
</script>


In reply to Mark Schumann

Re: Front Page "Accordion" Course Menu working now

by Barry Oosthuizen -
Hi Mark,

I just tried it with the new script added and it works beautifully!

Very cool. Thanks alot.

Barry
In reply to Mark Schumann

Re: Front Page "Accordion" Course Menu work well on FireFox

by Chen ZhongWei -

Thanks Mark,

    It works well on FireFox now. Good idea.Thanks.

    One more issue on IE7.0: course items are seperated with a blank block as high as the course item, where  should be a white line only.

 Chen 

In reply to Chen ZhongWei

Re: Front Page "Accordion" Course Menu work well on FireFox

by Mark Schumann -
That's interesting because it seems to look fine on my IE7. I haven't checked IE6 yet, so there may be issues there. I'll look into it.

I've also updated the archive to include all the latest instructions.

Mark
In reply to Mark Schumann

Re: Front Page "Accordion" Course Menu (video inside)

by Nigel Andrews -
Hi Mark,

Firstly..brilliant design.
I can't find anything on this in the forums so...go to the source.
I'm finding when I add more than 3 levels (eg. Induction/Officer Induction/Week 1/Day 1) the drop down effect doesn't work on the 4th level. Is there a limitation to the number of levels? Is there code I could add to enable the 4th level or am I just simply doing something wrong??

Thanks.
In reply to Nigel Andrews

Re: Front Page "Accordion" Course Menu (video inside)

by Mark Schumann -
Hi Nigel,

Thanks for the compliment. Right now it only works 3 levels deep. I tried to expand additional subcategories but I had issues with the parent category contracting as the subcategory expanded, which effectively hid everything. Given the way the Accordion format works, it only allows one menu item to be open at once, so it's quite difficult to open subcategories in the same way. I'm sure there's a solution, I just haven't had the time to work it out yet.

What I can do is provide you with some code that will change the method of expanding categories, so that more than one can be open at once. This will allow us to add an expandable menu within subcategories, but it means that other menus won't contract unless manually clicked.

How does that sound?

Mark
In reply to Mark Schumann

Re: Front Page "Accordion" Course Menu (video inside)

by Mark Schumann -
Ok i've created a custom version for you that should do the trick. it loses its Accordion-style functionality but provides an additional subcategory drop-down.

Simply replace your accordion_course_menu.php file with the one attached, and remove the code your previously added to your header.html file (we won't need to modify that again next time either).

Let me know how you go.

Mark
In reply to Mark Schumann

Ynt: Re: Front Page "Accordion" Course Menu (video inside)

by Oktay Dayıoğlu -
Hi Mark,
Great menu. I like to use it. But multilanguage support is not working in the menu.
Thanks
Oktay
In reply to Oktay Dayıoğlu

Re: Ynt: Re: Front Page "Accordion" Course Menu (video inside)

by Mark Schumann -
Hi Oktay,

I'm not sure why multilanguage would not be working. It's simply pulling course names directly from the database. It appears as if Chen's menu is working fine. This may be something beyond my knowledge unfortunately. Can I see an example?
In reply to Mark Schumann

Re: Front Page "Accordion" Course Menu (video inside)

by Rob Rashotte -

Mark,

This is a fantasic menu for what I am doing. The modification in the file attached here is exactly what I need. I did have an issue though in that the modified menu that allows sub-sub menus seemed to be viewing my courses as categories. I am not a developer, but I poked around a bit and saw the following line in the "//Expand sub-sub categories" section

<a style="color:#dddddd;" href="<?php print $CFG->wwwroot; ?>/course/category.php?id=<?php print $course_id5; ?>"><?php print $course_name5; ?></a>

When I changed this to read

<a style="color:#dddddd;" href="<?php print $CFG->wwwroot; ?>/course/view.php?id=<?php print $course_id5; ?>"><?php print $course_name5; ?></a>

It worked fine. Not sure if that is a bug or if it is just specific to how I am using it.

I am also seeing the issue where there is a big gap of white space between the courses. I noticed that someone else had mentioned this as well. Do you know what the issue would be ? I am seeing this on various versions of IE. I have not tried FireFox.

In reply to Rob Rashotte

Re: Front Page "Accordion" Course Menu (video inside)

by Mark Schumann -
Thanks Rob. I'm looking into the IE issue, and i'm not too sure what it is as it appears to work fine on IE7 for me. Would you be able to provide me a link so I can see what's going on?
In reply to Mark Schumann

Re: Front Page "Accordion" Course Menu (video inside)

by Nigel Andrews -
Works great Mark, exactly what I need . I really appreciate you going to the trouble.
Thanks and regards,
Nigel.

In reply to Mark Schumann

Re: Front Page "Accordion" Course Menu (video inside)

by James Powell -

Hello Mark,

Cracking piece of code. I'd like to use it through my moodle, I think the best way of doing this is to include it as an html block. Is it possible to help me with this?.

In reply to James Powell

Re: Front Page "Accordion" Course Menu (video inside)

by Mark Schumann -
Hi James,

Sorry for the delay in response. The issue with an html block is that it does not allow php code, which we need in this case to extract information from the database. The only other solution is to create a standalone block, but that may take some time. I'll certainly update this post when I get a chance to create a block.

Mark
In reply to Mark Schumann

Re: Front Page "Accordion" Course Menu (video inside)

by Zbysiu Rodak -
Thanks for all the effort you've put into this. And now my follow up question, I get the following errorand I can't figure out why.
Attachment accordian_menu.gif
In reply to Zbysiu Rodak

Re: Front Page "Accordion" Course Menu (video inside)

by Zbysiu Rodak -
Update: it appears that if I refresh the page before hitting any of the links I don't get the warning message, or, having just tried refreshing the page after hitting a link, it works without the warning again. I'm puzzled.
In reply to Zbysiu Rodak

Re: Front Page "Accordion" Course Menu (video inside)

by Mark Schumann -
Hi Zbysiu,

That seems like a very strange message. Is it possible that you are using any non-standard characters in your course names?
In reply to Mark Schumann

Re: Front Page "Accordion" Course Menu (video inside)

by Zbysiu Rodak -

Hi Mark

Nothing out of the ordinary. I'm just trying this out on a test site at the moment. I've also tried viewing it on several machines, both at home and at work. I've followed your instructions, cut and pasted what needs cutting and pasting, double checked that everything matches. I downloaded the latest version yesterday (9th December 2008) so it should be pretty much up to date. The version of Moodle is 1.9.2 (Build: 20080711). The theme I'm using is Chameleon. I suppose I could try another theme when I get into work, but I don't see what difference that could make.

In reply to Zbysiu Rodak

Re: Front Page "Accordion" Course Menu (video inside)

by Zbysiu Rodak -
Update: I had debugging turned on. blush
In reply to Zbysiu Rodak

Re: Front Page "Accordion" Course Menu (video inside)

by Zbysiu Rodak -
I notice that all the menu items are listed alphabetically, is there any way to rearrange them so that they reflect the order I feel they should be in?
In reply to Zbysiu Rodak

Re: Front Page "Accordion" Course Menu (video inside)

by Tieku Bortei-Doku -
Zbysiu, did you get an answer to your question? What determines the order the categories are displayed in? How can I change the order? Thanks. Tieku
In reply to Tieku Bortei-Doku

Re: Front Page "Accordion" Course Menu (video inside)

by Zak Fleming -
Hi,

I know Zbysiu personally. He got round it by putting a number in front of the category. For example.

1. English
2. Maths
3. Science

Hope this helps
In reply to Zak Fleming

Re: Front Page "Accordion" Course Menu (video inside)

by Rob Rashotte -

The order is controled by the SQL select statements.

You can modify the statements to sort either ascending or decending, based on any field in the course_categories table.

For example, the 'order by name ASC' part of the following select statement will cause the first level categories to be sorted in ascending order based on the course name.

$result = get_records_sql("SELECT * FROM {$CFG->prefix}course_categories WHERE parent = '0' AND visible = '1' order by name ASC");

Rob

In reply to Rob Rashotte

Re: Front Page "Accordion" Course Menu (video inside)

by Tieku Bortei-Doku -
Apart from being able to order in ascending or descending order, how can I get it to follow my ordering in Course Categories or the order in the Front Page Combo List view.

In actual fact I am noticing the categories show up in the order created, even when I use the reordering tools in Course Categories?
In reply to Mark Schumann

Re: Front Page "Accordion" Course Menu (video inside)

by alan murtagh -

This is a fantastic piece of work.

Soryry to be a pain but there's only one thing i want to do with it - can i stop the red boxes acting as hyperlinks?  Just people click into them and get the much less attractive old category menu

Thanks a million

alan

In reply to alan murtagh

Re: Front Page "Accordion" Course Menu (video inside)

by Mark Schumann -
Hi Alan,

Look for this line in the accordion_course_menu.php file:

<a style="color:#ffffff; display:block;" href="<?php print $CFG->wwwroot; ?>/course/category.php?id=<?php print $category_id; ?>"><?php print $category_name; ?></a>

Notice the "<a style=...", that's the link. What you can do is simply change that line to the following:

<?php print $category_name; ?>

Let me know if you have any trouble.
In reply to Mark Schumann

Re: Front Page "Accordion" Course Menu (video inside)

by Panagiotis Iliopoulos -
First of all I have to say that this is a great job.

It works fine with my installation locally but there is one problem and I was wondering if there is a way to solve it.

I've noticed that it only shows visible categories, sub-categories and courses. Even an administrator account can't see them in the menu.

In my site I have implemented some roles and hidden some courses and only one role can see them but no matter who is logged in, from admin to simple user, the menu cannot show these courses.

Is there a way around this or this is it and the menu only shows visible categories, sub-categories and courses when they are for everyone?

Thanks in advance,

Panos.
In reply to Panagiotis Iliopoulos

Re: Front Page "Accordion" Course Menu (video inside)

by Panagiotis Iliopoulos -
Well I am coming back with a second question as I can see the first one is a no go.

Is there any way that we can show this menu on some other page other than the first page of our moodle installation?

Thanks in advance,

Panos


In reply to Panagiotis Iliopoulos

Re: Front Page "Accordion" Course Menu (video inside)

by Mark Schumann -
Hi Panayiotis,

Your first question may be possible but relies on other hooks being in place that I'm not familiar with at this time. It should be possible to display all hidden courses with some sort of "is user admin" function as the roles database is confusing to me smile

As for your second question, the front page and course pages use a different backend template, but it will be hard to add it to a single course without adding it to all other courses at the same time. The only other solution would be to create a new course format with this in place, but I haven't looked into that part of Moodle at all.

As you may guess this is more of a hack than a complete mod, but I will look into some of these suggestions in the new year.
In reply to Mark Schumann

Re: Front Page "Accordion" Course Menu (video inside)

by Panagiotis Iliopoulos -
Thank you very much for your answers Mark.

They were exactly what I was expecting but I had to hear it from the creator smile



Non the less, great job. Keep it up.

Panos
In reply to Panagiotis Iliopoulos

Re: Front Page "Accordion" Course Menu (video inside)

by Zbysiu Rodak -
I use it in conjunction with the My Courses Block which allows user to see only the courses they are enrolled in.
In reply to Zbysiu Rodak

Re: Front Page "Accordion" Course Menu (video inside)

by ZEKRI Kais -

how a can integrate the course menu in moodle 1.9.3+

please step per step

In reply to ZEKRI Kais

Re: Front Page "Accordion" Course Menu (video inside)

by Harry McDowall -
Probably a obvious question but - how do I install this wonderful piece of code? Thanks Harry.
In reply to Mark Schumann

Re: Front Page "Accordion" Course Menu (video inside)

by Jayne Hepburn -
Thanks for this great piece of code however I am having problems getting it to display correctly in Safari and IE 6 and 7. It works fine in firefox. Please see the image below. Any help and advice would be appreciated. Thanks
Attachment course_displays_copy.jpg
In reply to Jayne Hepburn

Re: Front Page "Accordion" Course Menu (video inside)

by Alun Jones -

im interested in a fix for this myself, im getting similar gaps with IE, ill look in to it more tomorrow, if i find a solution myself ill post back, otherwise if someone finds how to eliminate the extra gaps please tell me

thanks

Alun

In reply to Alun Jones

Re: Front Page "Accordion" Course Menu (video inside)

by Rob Rashotte -

We have tested on this on several browsers and IE versions. The issues seems to be IE6 specific. We are just living with it on IE 6, since most of our users are using newer versions of FF.

Have you seen the "new and improved" version of this menu? It is much better for us and we will be updating to this new version - with some additional customization.

Rob

In reply to Rob Rashotte

Re: Front Page "Accordion" Course Menu (video inside)

by Alun Jones -

i fixed my problem, they now don't show the extra spaces i mentioned, also modified it to show courses that reside within the top category that don't have a sub-category drop-down menu to be in.

is the new and improved version the one from https://meine.tfh-bochum.de/lms/ or the modified one that can support sub-sub categories?

In reply to Alun Jones

Re: Front Page "Accordion" Course Menu (video inside)

by Domenic Fera -

Hi,

I really like the Modified Accordion Course Menu that Alun has attached here, but it displays all courses and categories in one single column. How do I make it so each 'Master' category has its own column?

Also, when I click on the Sub Category, it dosen't stay open. How do I resolve this issue?

Thanks for your help.

In reply to Mark Schumann

Re: Front Page "Accordion" Course Menu (video inside)

by José Ángel Polo -

I have installed Accordion Course Menu and I tried install Exabis e-portfolio 3.2.1 in mdl 1.9.3, and I have a problem.

When I "Add a View", "Your Items" can't incorporate to "View Design" (error: object don't allow this properties).

I think this is the problem. My header contains this lines:

<script src="<?php echo $CFG->themewww .'/'. current_theme() ?>/accordion_course_menu/jquery-1.2.6.min.js"></script>

This script is not campatible width exabis new view. Thanks for your help.

Regards.

In reply to Mark Schumann

Re: Front Page "Accordion" Course Menu (video inside)

by tan tan -

Hi Mark,

I am quite new to moodle. I had installed the accordion course menu according to the "readme.txt" from accordion_course_menu" file. On the first part, the readme.txt says:

Edit your root index.php file and look for the following lines:

        $frontpagelayout = $CFG->frontpage;
    }

    foreach (explode(',',$frontpagelayout) as $v) {
        switch ($v) {     /// Display the main part of the front page.


   Insert the following code snippet between the "}" and "foreach" lines:

   //Display Accordion Course Menu
   include('./theme/'. current_theme() .'/accordion_course_menu/accordion_course_menu.php');

I had inserted red statement into my root moodle=>index.php. The second part of "readme.txt" is:

Edit your theme's header.html file and insert the following code within the <head> tags:

     <script src="<?php echo $CFG->themewww .'/'. current_theme() ?>/accordion_course_menu/jquery-1.2.6.min.js"></script>
 <script>
 $(document).ready(function(){
  $("dd").hide();
  $("dt a").click(function(){ 
  if ($(this).parent().next().is(':visible')) {
  $(this).parent().next().slideUp("slow");
  }
  else {
   $("dd:visible").slideUp("slow");
   $(this).parent().next().slideDown("slow");
  }
   return false;
  });
 });
 </script>

I inserted this script in between <head>"script here" </head>... something like dat shown below:

<head>
    <?php echo $meta ?>
    <meta name="keywords" content="moodle, <?php echo $title ?> " />
    <title><?php echo $title ?></title>
    <link rel="shortcut icon" href="<?php echo $CFG->themewww .'/'. current_theme() ?>/favicon.ico" />
    <?php include("$CFG->javascript"); ?>
   
   
<script src="<?php echo $CFG->themewww .'/'. current_theme() ?>/accordion_course_menu/jquery-1.2.6.min.js"></script>
 <script>
 $(document).ready(function(){
  $("dd").hide();
  $("dt a").click(function(){ 
  if ($(this).parent().next().is(':visible')) {
  $(this).parent().next().slideUp("slow");
  }
  else {
   $("dd:visible").slideUp("slow");
   $(this).parent().next().slideDown("slow");
  }
   return false;
  });
 });
 </script>

  
</head>

Are there anymore script that i needed to edit or i had left out because it dont seems to work on my moodle site.

Thanks for reading this.

In reply to tan tan

Re: Front Page "Accordion" Course Menu (video inside)

by A B -
I have the same problem. What did we wrong?
I get this error: Module "accordion_course_menu" is not readable - check permissions
In reply to Mark Schumann

Re: Front Page "Accordion" Course Menu (video inside)

by Lynn Harvey -

I have been keen to use this format but previous versions wouldnt work with our "Custom_corners" theme. 

On my site each faculty is a Category, a few have subcategories, and all the subjects offered are courses within each categories.

Any chance you could tweak this so that instead of "a set of categories for the headers and subcategories for the accordion list"  its based on categories with courses all in a single column - an accordion version of the myCourses block?

In reply to Mark Schumann

Re: Front Page "Accordion" Course Menu (video inside)

by Zak Fleming -

Has anyone managed to get it to display properly in IE 8 yet?

Thanks

In reply to Zak Fleming

Re: Front Page "Accordion" Course Menu (video inside)

by Paul Hancock -

Hi Guys,

I have moodle 1.9.4 running on my site. I have followed through the instructions for setting up accordion, and it works well with both chameleon and custom corners, i haven't decided which theme i like best yet. I have also followed the instructions for setting up accordion menu, and it also works well with both themes.

The problem is that when I am running accordion menu, accordion no longer works in any of my courses. As soon as I remove the php code from the header.html file, accordion works perfectly again.

Here is the relevant section of the header.html file:

 <?php include('ui/chameleon.php'); ?>
    <?php include("$CFG->javascript"); ?>
    <?php if (strpos($bodytags, 'id="course-view"') !== false) include('acco/accordion.php'); ?>
    <script src="<?php echo $CFG->themewww .'/'. current_theme() ?>/accordion_course_menu/jquery-1.2.6.min.js"></script>
 <script>
 $(document).ready(function(){
  $("dd").hide();
  $("dt a").click(function(){ 
  if ($(this).parent().next().is(':visible')) {
  $(this).parent().next().slideUp("slow");
  }
  else {
   $("dd:visible").slideUp("slow");
   $(this).parent().next().slideDown("slow");
  }
   return false;
  });
 });
</script>

Any help getting both up and running will be most appreciated.

Average of ratings: Useful (1)
In reply to Paul Hancock

Re: Front Page "Accordion" Course Menu (video inside)

by Paul Hancock -
Further information. I have narrowed the problem down to when jquery-1.2.6.min.js is called. As soon as it is called accordion stops working in all my courses. I'm not up to scratch with javascript, so am kind of stuck beyond here.
In reply to Paul Hancock

Re: Front Page "Accordion" Course Menu (video inside)

by Mark Schumann -
Sorry it's been so long since i've replied to this thread. I don't have a lot of time at the moment to work through the issues, but I can take a guess at what's happening here.

As you said, it's an issue with the jquery file, probably a conflict with the other accordion course format. What i'd suggest doing is checking the header or configuration file within the accordion course format for a jquery reference, and using the same path in your header file for the front page course menu. That way there shouldn't be any conflict. The only thing is that I can't guarantee the front page accordion course menu will work.

The other option is to place the jquery reference for the front page menu in the header.html file's front page section. That way it shouldn't get called on any course page (it should be like this anyway, but i'm not sure if it is).

Let me know how you go.
In reply to Mark Schumann

Re: Front Page "Accordion" Course Menu (video inside)

by Paul Hancock -

Thanks for the reply Mark.

I had a look through the header.html file, and did some research on the net. The conflict was fixed by placing the call to the jquery script at the beginning of the <HEAD> tag, before any other js script is called. Both accordion and accordion menu work fine together now.

Paul.

In reply to Paul Hancock

Re: Front Page "Accordion" Course Menu (video inside)

by Martin Smaxwil -
first of all - a great mod for all the moodle startpages wink
inspired by the fluid style we've done a little mod you are maybe interested in...

now with jquery-1.3.2.js, some 'cross-browser-fixes' and a much smoother movement in IE6,7,8.

but: we've implemented a only one-column design sad

module: http://moodle.org/mod/data/view.php?rid=2898
demo-video: http://www.tfh-bochum.de/uploads/media/accordion.html
live system: moodle.tfh-bochum.de

regards,
ml
In reply to Martin Smaxwil

Re: Front Page "Accordion" Course Menu (video inside)

by Yannick Michel -
Hi evrybody,
I'm tryiong to use this accordion http://moodle.org/mod/data/view.php?rid=2898

But My tree is the following:

Level
Topic
Execices
Activities
And so on...

It seems that it isn't possible to use this accordion with sub-sub categories.
I have tried many things but my php knowledges don't help me... So I ask you

Thank you

In reply to Mark Schumann

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Mark Schumann

Re: Front Page "Accordion" Course Menu (video inside)

by Tieku Bortei-Doku -
The top level categories are ordered in the order created and the subcategories are ordered in ascending alphabetical order?

How do I change this behavior?
Tieku
In reply to Tieku Bortei-Doku

Re: Front Page "Accordion" Course Menu (video inside)

by Rob Rashotte -

The course data is obtained from your database using a series of get_records_sql() function calls. If you look at the php code you will see the actual sql statement that is being used is enclosed in the () for these calls. Part of this sql is the "order by" statement. You can change this to order the returned results using any field you like. We might not be using the same version, but the version that I am using has the functiona calls on the following lines ...

49, 51
66, 70
131, 135
196, 200

Each pair of function calls is used to return results for a specific level (Top Category Level etc.)

Hope this helps.

Rob

In reply to Rob Rashotte

Re: Front Page "Accordion" Course Menu (video inside)

by Paulo Bagorro -
Hi
Can someone explain how to apply the patch?
Thanks
In reply to Mark Schumann

Re: Front Page "Accordion" Course Menu (video inside)

by Lynne Bayley -

Thankyou for this code - it worked brilliantly immediately and makes navigation a lot easier.

However I have more than 3 main categories. I was wondering if there was a way of forcing a maximum of 3 columns and getting the other main categories to sit above and below each other so users do no need to scroll across.

In reply to Mark Schumann

Re: Front Page "Accordion" Course Menu (video inside)

by Susan Hodges -

I have recently had this uploaded to moodle - the script has been added to the root index.php and the header section of the theme being used - however the accordion menu option is not showing up in the front page settings options.

The people who installed the plug in for me also have added a file accordion mod - is this meant to be in there...is there anyone who can help me??

In reply to Susan Hodges

Re: Front Page "Accordion" Course Menu (video inside)

by Nitesh Vaghani -
Hello,

I did install this menu module on my local for testing purpose.

But problem is menu only show on home not on other pages.

Can anybody help me to make it possible to show this menu on all other pages also not bound to only home page or front pages.

-----------------
Thanks
In reply to Nitesh Vaghani

Re: Front Page "Accordion" Course Menu (video inside)

by Steven Robertson -

Nitesh,

The Accordion Course Menu is not a global setting.  You will have to walk through the installation for each site/course you wish to use it on.

In reply to Steven Robertson

Re: Front Page "Accordion" Course Menu (video inside)

by Steven Robertson -

Does anyone know if this has been tested and works with 1.9.9?

I had done and installation on 1.8 that functioned flawlessly but attempting to repeat the process with 1.9.9 using the latest version of Firefox the menu does not appear and I received no errors.

Any assistance with this is greatly appreciated.

In reply to Steven Robertson

Re: Front Page "Accordion" Course Menu (video inside)

by Steven Robertson -

DOH!!! I have this working as expected now.  I had copied the accordion_course_menu folder into the theme top level folder instead of into the theme I had currently selected.

 

So remember the accordion_course_menu gets copied to

 

theme  X DO NOT COPY the accordion_course_menu here

[Your currently selected theme. ie. Custom Corners]

-> accordion_course_menu goes here

 

Hopes this helps someone else in the future.  Also check the references in the Page Source for your browser, it will show you what it expects.

Cheers!

In reply to Mark Schumann

Re: Front Page "Accordion" Course Menu (video inside)

by Lynne Bayley -

Any chance of getting a version of this that works with moodle 2.1?

In reply to Lynne Bayley

Re: Front Page "Accordion" Course Menu (video inside)

by Zbysiu Rodak -

I appear to have a new problem develop with the menu. Last summer we upgraded our server to 2008RC using IIS7. Network users are using IE9. This problem seems to only apply to people (teachers) who have been added since then. What happens is that the teacher tries to access a particular course of which they are either a course creator or admin by clicking the link in the menu. What then happens is that the course link does the opposite of what you would expect. Instead of taking the user to their course, the course link appears to move upwards and disappear behind the link above.

I'm perplexed and can't find a solution. thoughtful

In reply to Zbysiu Rodak

Re: Front Page "Accordion" Course Menu (video inside)

by Zbysiu Rodak -

I should add that I'm running Moodle 1.9.12+ (Build: 20110726)