public function get_plugin_by_type($subtype, $type) {
        $shortsubtype = substr($subtype, strlen('assign'));
        $name = $shortsubtype . 'plugins';
        if ($name != 'feedbackplugins' && $name != 'submissionplugins') {
            return null;
        }
        $pluginlist = $this->$name;
        foreach ($pluginlist as $plugin) {
            if ($plugin->get_type() == $type) {
                return $plugin;
            }
        }
        return null;
    }
public function get_plugin_by_type($subtype, $type) {
        $shortsubtype = substr($subtype, strlen('assign'));
        $name = $shortsubtype . 'plugins';
        if ($name != 'feedbackplugins' && $name != 'submissionplugins') {
            return null;
        }
        $pluginlist = $this->$name;
        foreach ($pluginlist as $plugin) {
            if ($plugin->get_type() == $type) {
                return $plugin;
            }
        }
        return null;
    }
public function get_plugin_by_type ( $ subtype , $ type ) { $ shortsubtype = substr ( $ subtype , strlen ( 'assign' ) ) ; $ name = $ shortsubtype . 'plugins' ; if ( $ name != 'feedbackplugins' && $ name != 'submissionplugins' ) { return null ; } $ pluginlist = $ this -> $ name ; foreach ( $ pluginlist as $ plugin ) { if ( $ plugin -> get_type ( ) == $ type ) { return $ plugin ; } } return null ; }
Get a specific submission plugin by its type.

@param string $subtype assignsubmission | assignfeedback
@param string $type
@return mixed assign_plugin|null
Get a specific submission plugin by its type .