HSU's block course menu and Moodle 1.6

HSU's block course menu and Moodle 1.6

- andrzej marczewski の投稿
返信数: 23
Has anyone got the HSU's block course menu working well with 1.6?
I get lots of bits like this blockname on my menu!!
andrzej marczewski への返信

Re: HSU's block course menu and Moodle 1.6

- Owen Stephens の投稿
First guess would be that you are missing the relevant language files. What language are you working in?
Owen Stephens への返信

Re: HSU's block course menu and Moodle 1.6

- andrzej marczewski の投稿
English
Could it be to do with the utf8 encoding thing in 1.6?
andrzej marczewski への返信

Re: HSU's block course menu and Moodle 1.6

- Neil S の投稿
I have the block displaying correctly by placing the block_course_menu.php lang file in the lang/en_utf8 directory.

But I have a different issue.

When I go to the control panel portion of the block and select a different tab such as 'backup and restore' the URL changes to reflect my clicking the link but the block still displays the 'Main Control Panel' view -- No matter what tab I select I always see the opening 'Main Control Panel'. I haven't been able to figure out why I'm seeing this (mis)behavior. The code seems easy enough to understand - and it should be pretty easy to add in the 1.6 functionality under the control panel but so far no dice笑顔 Any help is appreciated. I'm running CentOS4 Linux and PHP5 with MySql 4.1

Cheers
ns
Neil S への返信

Re: HSU's block course menu and Moodle 1.6

- James Ballard の投稿
I have the same error with the tabs in the Control Panel view.

Likewise I can display the block correctly - it sounds like a language string is missing; try redownloading an copying the language files if it isn't fixed. I did notice there was an empty language string for the bug tracker module, but we do not use this so I commented that line out from the menu and it is fine. It appeared under "Show all sections".


Yours
James
James Ballard への返信

Re: HSU's block course menu and Moodle 1.6

- Neil S の投稿
Figured out a fix for the tabs issue -- I don't know if it's 'moodlesque' or not -- but it does work this way 笑顔

Seems like there is probably a function to collect Get/Post vars that I didn't see in my brief digging through the dev docs.

In .....blocks/course_menu/controls/controls.php

Change:
optional_variable($action, 'mcp');

To:
$action = $_GET['action'];
optional_variable($action, 'mcp');

That should make the tabs work correctly.

I'm also planning to work on the 'included' files that comprise each tab's content to incorporate some of the new Moodle functionality found (for example) in the 'administration' block of 1.6

Cheers,
ns
andrzej marczewski への返信

このフォーラム投稿は削除されました。

このフォーラム投稿のコンテンツは削除されたため現在アクセスすることはできません。
削除済みユーザ への返信

Re: HSU's block course menu and Moodle 1.6

- Francis Brouns の投稿
Hi,

the HSU course menu is a block. After installing it, it should be listed in the admin page for blocks.

You have to add it to a course. Turn editing on. In the 'Add a block' block, choose 'Course menu'. The Course menu is then added and you can move it to the position you like.

We have it running on several Moodle sites on a Windows 2003 server, both Moodle 1.5+ and Moodle 1.6. On the Moodle 1.6 site we made some minor modifications to remove the control panel and gradebook, because we are only interested in the tree menu for the sections.

Francis
Francis Brouns への返信

このフォーラム投稿は削除されました。

このフォーラム投稿のコンテンツは削除されたため現在アクセスすることはできません。
削除済みユーザ への返信

Re: HSU's block course menu and Moodle 1.6

- Francis Brouns の投稿
Hello,

in your previous message you refered to course menu as a new module you installed. In which directory did you add the files? You should place the course_menu directory in moodle/blocks, not moodle/modules.

You should have a directory structure like
moodle
blocks
course_menu
block_course_menu.php
...

And then visit http://yourserver/moodle/admin. This should make the course_menu block.

You should also check whether the files are owned by the Apache user.

Francis


Francis Brouns への返信

Re: HSU's block course menu and Moodle 1.6

- James Ballard の投稿
Hi

I have this working fine in 1.6 using Neil's changes and have edited the control panel to include the new Administration functions (Reset, Questions, and Reports). Students also changes to Child courses in the user panel when the course is a meta course.

I have taken out the change password option as we use ldap authentication and do not allow updates this way, so do not overwrite your files if you need this option.

I have included the files I changed - it involved adding a new row to tables so it should be easy to copy and paste to your own files. There were also some description strings to add to the language file which I have also included.

Yours
James
James Ballard への返信

Re: HSU's block course menu and Moodle 1.6

- Jamie Chandler の投稿
Everytime I hit turn editing on through the menu I get....

'A required parameter (sesskey) was missing'

Any thoughts?
Jamie Chandler への返信

Re: HSU's block course menu and Moodle 1.6

- A. T. Wyatt の投稿
This is now happening to us also.  We are going to back it out and reinstall the block.  I changed quite a few things--adding all the latest suggested tweaks, and such.  I might have corrupted something!

atw
A. T. Wyatt への返信

Re: HSU's block course menu and Moodle 1.6

- A. T. Wyatt の投稿
After further digging, I have decided that because the editing link in this block does not include sesskey information, it does not work properly in 1.6.

I have commented out the offending lines of code until an update is available.  Since the "turn editing on" button is still at the top of the screen, teachers are not losing functionality.

atw
A. T. Wyatt への返信

Re: HSU's block course menu and Moodle 1.6

- James Ballard の投稿
Hi

Been away for a week; I hadn't used the turn editing on or off command from this block but I have the same problem. The session key is missing from the original block rather than the additions.

In block_course_menu.php replace:

if (isteacher($this->course->id)) {
if (isediting($this->course->id)) {
print_xtree_item('tree','edit',get_string('turneditingoff'),"view.php?id=". $this->course->id . "&edit=off",'',"$CFG->pixpath/i/edit.gif", 'alt="alt"'); //add edit item
}
else {
print_xtree_item('tree','edit',get_string('turneditingon'),"view.php?id=" . $this->course->id . "&edit=on",'',"$CFG->pixpath/i/edit.gif"); add edit item
}
}

with:

if (isteacher($this->course->id)) {
            if (isediting($this->course->id)) {
                print_xtree_item('tree','edit',get_string('turneditingoff'),"view.php?id=". $this->course->id . "&edit=off&sesskey=".sesskey()."",'',"$CFG->pixpath/i/edit.gif", 'alt="alt"'); //add edit item
            }
            else {
                print_xtree_item('tree','edit',get_string('turneditingon'),"view.php?id=" . $this->course->id . "&edit=on&sesskey=".sesskey()."",'',"$CFG->pixpath/i/edit.gif"); //add edit item
            }
        }

should solve this, although I only quickly tested it, but it seemed fine.

Yours
James
James Ballard への返信

Re: HSU's block course menu and Moodle 1.6

- Francis Brouns の投稿
Just added your corrections. This solved the sessionkey problems. However the option 'turn editing on' is also shown to teachers without the editing permissions. Clicking this option has no effect. How do I hide this option for non-editing teachers?

Thanks for any feedback,

Francis
Francis Brouns への返信

Re: HSU's block course menu and Moodle 1.6

- James Ballard の投稿
Hi

On line 78 of block_course_menu.php relace:

if (isteacher($this->course->id)) {
if (isediting($this->course->id)) { print_xtree_item('tree','edit',get_string('turneditingoff'),"view.php?id=". $this->course->id . "&edit=off&sesskey=".sesskey()."",'',"$CFG->pixpath/i/edit.gif", 'alt="alt"'); //add edit item
}
else { print_xtree_item('tree','edit',get_string('turneditingon'),"view.php?id=" . $this->course->id . "&edit=on&sesskey=".sesskey()."",'',"$CFG->pixpath/i/edit.gif"); //add edit item
}
}

with:

if (isteacheredit($this->course->id)) {
if (isediting($this->course->id)) { print_xtree_item('tree','edit',get_string('turneditingoff'),"view.php?id=". $this->course->id . "&edit=off&sesskey=".sesskey()."",'',"$CFG->pixpath/i/edit.gif", 'alt="alt"'); //add edit item
}
else { print_xtree_item('tree','edit',get_string('turneditingon'),"view.php?id=" . $this->course->id . "&edit=on&sesskey=".sesskey()."",'',"$CFG->pixpath/i/edit.gif"); //add edit item
}
}

I think that should do it.

Yours
James
James Ballard への返信

Re: HSU's block course menu and Moodle 1.6

- A. T. Wyatt の投稿
Greetings, James!

I just installed this.  Thank you for your hard work!

I found two strings missing from the language file--

$string['questionsdesc'] = 'Question pools';
$string['resetdesc'] = 'Reset course';

Any ideas why some of the icons are showing up and some not?  I am missing question, reset, and report.  The rest are present and visible!  That is a little weird.  Oh well, I am working on it!

atw
-----
Edited:  The reason the images were not showing up was because of my theme!
A. T. Wyatt への返信

Re: HSU's block course menu and Moodle 1.8

- Andrea Rappa の投稿
hello,
i looking for use this block but i can't look icons and i can't understand if this block works.
please if someone can help me.

andrea
andrzej marczewski への返信

Re: HSU's block course menu and Moodle 1.6

- Darrin Jackson の投稿
Hey Peoples!

Not a major issue,but when I click on "logs" in the control panel, the link doesnt work. It looks for " /moodle/course/log.php".

Did I loose this file or is it not included int the 1.6 package?
Darrin Jackson への返信

Re: HSU's block course menu and Moodle 1.6

- James Ballard の投稿
Hi

The page is called report.php in 1.6; you need to update the control panel pages to change the link. I included the files I changed in an earlier post so that the control panel includes the new administration functions from 1.6.

Yours
James