diff --git a/module/block/config.php b/module/block/config.php index fdeeee4bdc..47ba3a1603 100644 --- a/module/block/config.php +++ b/module/block/config.php @@ -14,6 +14,10 @@ $config->block->version = 2; $config->block->editor = new stdclass(); $config->block->editor->set = array('id' => 'html', 'tools' => 'simple'); +$config->block->moduleIndex = array(); +$config->block->moduleIndex['program'] = 'project'; +$config->block->moduleIndex['project'] = 'execution'; + $config->block->longBlock = array(); $config->block->longBlock['']['flowchart'] = 'flowchart'; $config->block->longBlock['']['welcome'] = 'welcome'; diff --git a/module/block/control.php b/module/block/control.php index fafaa7dd62..781192e20e 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -39,6 +39,7 @@ class block extends control $title = $id == 0 ? $this->lang->block->createBlock : $this->lang->block->editBlock; + $module = zget($this->config->block->moduleIndex, $module, $module); if($module == 'my') { $modules = $this->lang->block->moduleList; @@ -69,7 +70,6 @@ class block extends control $this->view->blocks = $this->fetch('block', 'main', "module=$module&id=$id"); $this->view->module = $module; } - $this->view->title = $title; $this->view->block = $this->block->getByID($id); $this->view->blockID = $id;