Forums | Mahara Community

Developers /
for Creating a New plugins


anonymous profile picture
Account deleted
Posts: 92

08 May 2010, 6:26

I already created the plugins development under artefact. i includes the file called lib.php , version.php , db folder etc.

Under development i includes the personal Development plan form .

in lib.php i got confused.

Here is code

defined('INTERNAL') || die();

class PluginArtefactDevelopment extends PluginArtefact {
    
    public static function get_artefact_types() {
        return array(
            'personalplan',
            'plandate',
            'cdate',
            'strength',
            'weakness',
            'opportunities',
            'threats',
            'books',
            'training',
            'weblinks',
            'electronic',
            'others',
            'reflection',
                    );
     }
    
    public static function get_block_types() {
        return array();
    }

    public static function get_plugin_name() {
        return 'development';
    }

    public static function menu_items() {
        return array(
            
            array(
                'path' => 'profile/mypersonaldevelopmentplan',
                'title' => get_string('mypersonaldevelopmentplan', 'artefact.development'),
                'url' => 'artefact/internal/personaldevelopmentplan.php',
                'weight' => 21,
            ),
            
        );
    }

    public static function get_artefact_type_content_types() {
        return array(

            'personalplan'   => array('text'),
            'plandate'      => array('text'),
            'cdate'         => array('text'),
            'strength'      => array('text'),
            'weakness'      => array('text'),
            'opportunities' => array('text'),
            'threats'      => array('text'),
            'books'       => array('text'),
            'training'   => array('text'),
            'weblinks'   => array('text'),
            'electronic' => array('text'),
            'others'     => array('text'),
            'reflection' => array('text'),
            
        );
    }
           
    }
    

?>

when i go to administration Extension / plugin administration in this it gives me the below Error.

Not installed plugins development Not installable! class ArtefactTypePersonalplan for type personalplan in plugin was missing

Please Help Me.

anonymous profile picture
Account deleted
Posts: 1

08 May 2010, 6:45

Try out some pluing websites where you can get code.

anonymous profile picture
Account deleted
Posts: 92

08 May 2010, 6:49

give me the link for plugin websites.

anonymous profile picture
Account deleted
Posts: 3

08 May 2010, 10:43

Hi Mrunal,

                  I have been customizing the resume artefact myself and I had to go throught all these. So here is a a little help. The "not installed Plugin/Artefact" message indicates that you haven´t added the new plugin/artefact to the database. For this to happend you have to go to the database and add one row per plugin. Here is a little code that could hep you: 

INSERT INTO `mahara`.`artefact_installed_type` (`name`, `plugin`) VALUES ('evaluatorhistory', 'resume');

So in this way you are noticing the core that this plugin is installed so that he must look for it. When the core is noticed he is going to search for that class in lib.php. For example, ArtefactTypeEvaluatorhistory that shoul extend from ArtefctType. 

Anyway if you want to share this plugins then you should provide a db/ folder as the documentation says in here. In this case I think that folder has an xml that tells mahara all the model needs so it should be a very good point to start. 

I hope it helps, don´t hesitate to come back with some feedback. :D 


Federico

anonymous profile picture
Account deleted
Posts: 92

08 May 2010, 12:36

Hello Federico

thanks for the reply.

but  problem is i do'nt  customized the resume but i am creating the new new plugin. i think it might be problem occurs in the lib.php so give me a help for that

here is lib.php code.

<?php
/
defined('INTERNAL') || die();

class PluginArtefactDevelopment extends PluginArtefact {
    
    public static function get_artefact_types() {
        return array(
            'personalplan',
            'plandate',
            'cdate',
            'strength',
            'weakness',
            'opportunities',
            'threats',
            'books',
            'training',
            'weblinks',
            'electronic',
            'others',
            'reflection',
                    );
     }
    
    public static function get_block_types() {
        return array();
    }

    public static function get_plugin_name() {
        return 'development';
    }

    public static function menu_items() {
        return array(
            
            array(
                'path' => 'profile/mypersonaldevelopmentplan',
                'title' => get_string('mypersonaldevelopmentplan', 'artefact.development'),
                'url' => 'artefact/internal/personaldevelopmentplan.php',
                'weight' => 21,
            ),
            
        );
    }

    public static function get_artefact_type_content_types() {
        return array(

            'personalplan'   => array('text'),
            'plandate'      => array('text'),
            'cdate'         => array('text'),
            'strength'      => array('text'),
            'weakness'      => array('text'),
            'opportunities' => array('text'),
            'threats'      => array('text'),
            'books'       => array('text'),
            'training'   => array('text'),
            'weblinks'   => array('text'),
            'electronic' => array('text'),
            'others'     => array('text'),
            'reflection' => array('text'),
            
        );
    }
           
    }
      

?>

first you check the class & give me the feedback for that.

so you check the code give me valuble feedback.

i am waiting for your reply.

new plugin addition is the next step after the installing the plugin

anonymous profile picture
Account deleted
Posts: 92

09 May 2010, 23:07

hello Federico,

Till date i am troubleshoot that problem so help for that.


6 results