add new blocks has disapeared

add new blocks has disapeared

by Zoran Jeremic -
Number of replies: 4
Hi,

I have created my block, that works fine, but when I add it, it is visible, but "add new blocks" disapears. If I add some other blocks before adding my block, it is not visible, and it becomes visible after I turn off all added blocks.
Does anybody has some idea what could be cause of this problem.

Thanks
Average of ratings: -
In reply to Zoran Jeremic

Re: add new blocks has disapeared

by Jim Peterson -
What version of moodle are you running and what modifications have you made to it?

In reply to Jim Peterson

Re: add new blocks has disapeared

by Zoran Jeremic -
I'm using Moodle 1.9.2 and I have created 3 new blocks and one module? Everything worked fine till now. The block that makes me trouble is actually modified tags block. I have changed its name and I have created new tables (same structure as tag's tables). I have just started to modify this block so there is not too much changes comparing to tags block.
In reply to Jim Peterson

Re: add new blocks has disapeared

by Zoran Jeremic -
Hi Jim,

I have located the possible reason of the problem. It is in the

function get_content() {
//...
require_once($CFG->dirroot.'/tag/lib.php');
$this->content->text = print_tag_cloud(popular_tags_count($this->config->numberoftags), false, 170, 70, true);


I have changed to:

require_once($CFG->dirroot.'/depths/tag/lib.php');
$this->content->text = print_tag_cloud(popular_tags_count($this->config->numberoftags), false, 170, 70, true);

and I have copied tag folder to depths/tag. I have done it because I want this tag block to be independent from the moodle's one as it will use
semantic web technologies. I didn't change anything in depths/tag files except require_once('../config.php'); to require_once('../../config.php');
where it was necessary. It works but with problems I have described before.

Do you have any ideas?
In reply to Jim Peterson

Re: add new blocks has disapeared

by Zoran Jeremic -
It seems that there are some conflicts with tag_youtube, tag_flickr or blog_menu. When I have deleted those three blocks everything started to works fine.