Modules and plugins

RSS
Page: ()  1 ...  230  231  232  233  234  235  236  237  238  239  240  241  242  243  244  245  246  247 ...576   ()

Small Hack: Improved Accordion Course Menu

Improved Accordion Course Menu
Type: Small Hack
Requires: Moodle 1.9 or later
Status: Contributed
Maintainer(s): Martin Hermsen



This Module is a mod of the original Accordion Course Menu (by Mark Schumann), it adds
some major features and fixes some bugs.


New features:
* original course images added (course key, course text, guests)
* moodle roles recognition
* moodle course sort recognition
* edit function for categories
* fixed categorie order
* new jQuery version
* fixed some bugs for cross-browser-compatibility
* you can switch the accordion course menu on/off


Demo



Record added by Martin Hermsen - Monday, November 2, 2009, 11:07 PM
Last modified - Monday, November 2, 2009, 11:41 PM
Picture of Zak Fleming
by Zak Fleming - Tuesday, November 3, 2009, 04:20 PM
 

Thanks, for the update. I have 2 questions

1. Is there a way to make it look like the orignal version?
2. Is the spacing problem fixed in IE8?

Many Thanks

Picture of Martin Lukas
by Martin Lukas - Thursday, November 5, 2009, 11:20 PM
 

Hi Zak.

What do you mean by 'look like the old version'? Now it's a one-column-table. For changes you have to change the html-tags in the accordion_course_menu.php.

If you only want to change the style: the css is in the accordion_course_menu.php directly on top.

In IE8 it's now much smoother. test on live-system: http://moodle.tfh-bochum.de

Regards, ml

Picture of Rob Rashotte
by Rob Rashotte - Saturday, November 7, 2009, 05:12 AM
 

This looks really great!!! I am using the previous version of this menu, but I am having a problem with the new version. I do not have a diff tool to apply the changes to the index.php file, but I am assuming it is only the one line that needs to be updated.

ie: Change ...

print_whole_category_list(NULL, NULL, NULL, -1, false);

to

include('./theme/'. current_theme() .'/accordion_course_menu/accordion_course_menu.php');

In the block: case FRONTPAGECATEGORYNAMES:

Can you confirm that this is the only change required to the index.php file?

Seems that the only other thing to do is upload the new accordion_course_menu folder to my theme and set the front page to display "List of Categories".

The result is that I get my first category displayed, but then nothing else under it.

Any suggestions?

Rob

Picture of Martin Lukas
by Martin Lukas - Monday, November 9, 2009, 06:13 PM
 

... ithink you have to call up your javascript and the jquery library. Pls check the documentation/readme of the "original":

"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>

worx?
M.

Picture of Martin Lukas
by Martin Lukas - Monday, November 9, 2009, 06:16 PM
 

copy-paste-accident wink
of course you have to call up "jquery-1.3.2.js", not 1.2.6 ...

Picture of Rob Rashotte
by Rob Rashotte - Tuesday, November 10, 2009, 12:35 AM
 

I am specifying jquery-1.3.2.js in the header file, but I am still getting the same results. I have the orig. version working fine. I this new version for use with specific themes only? I think the new look is very clean and professional looking, so I would love to get this working on my production site. I am not a devloper and have somewhat limited php troubleshooting skills, so could be challenging.

Rob

Picture of Dustin Elliott
by Dustin Elliott - Tuesday, November 10, 2009, 11:27 PM
 

So far I have come across 2 problems, the first I was able to fix but now I seem to be stuck.

First: There were to locations in the accordion_course_menu.php file that the "mdl" table prefix was hard coded. I don't use "mdl" for my prefix so I had to change that.

Why not use the CFG->prefix?

Second: See error in screenshot

Warning: Invalid argument supplied for foreach() inE:\FFSMoodle\theme\FFS_custom_corners\accordion_course_menu\accordion_course_menu.phpon line76



Ideas?

Thanks,
Dustin

Picture of Dustin Elliott
by Dustin Elliott - Wednesday, November 11, 2009, 12:17 AM
 

I didn't realize that my main course categories have to have sub-categories and then the sub-categories need to contain the courses for this to work.

I turned of debugging and made some sub-categories for the courses and now it works perfectly!

Looks very professional, nice job.

Thanks,
Dustin

Picture of Martin Hermsen
by Martin Hermsen - Wednesday, November 11, 2009, 01:40 AM
 

Hi,

oh the missing CFG Prefix was a mistake, i will fix it. But i think it works, too.


regards martin


p.s. : I will make a new diff patch for the act weakly.

Picture of Rob Rashotte
by Rob Rashotte - Saturday, November 14, 2009, 02:12 AM
 

I am still having a problem getting this working. Seems that if I remove the code that is doing the role checking it works fine. I have not looked any closer to see what the specific problem is. If anyone more familiar with the code has any ideas I would love to discuss. I am not too worried about the role checking since I don't need hidden courses to show up on the front page, but I am a bit worried that I could have broken something else without knowing it by pulling out the code.

Rob


Page: ()  1 ...  230  231  232  233  234  235  236  237  238  239  240  241  242  243  244  245  246  247 ...576   ()