/** * Constructor * * @return \block_ajax_marking_workshop */ public function __construct() { // Call parent constructor with the same arguments. parent::__construct(); $this->modulename = 'workshop'; $this->capability = 'mod/workshop:editdimensions'; $this->icon = 'mod/workshop/icon.gif'; }
/** * Constructor. Needs to be duplicated in all modules, so best put in parent. PHP4 issue though. * * The aim is to pass in the main ajax_marking_functions object by reference, so that its * properties are accessible * * @internal param object $reference the parent object to be referred to * @return \block_ajax_marking_assignment */ public function __construct() { // Call parent constructor with the same arguments (keep for 2.1 - PHP 5.3 needed. parent::__construct(); $this->modulename = 'assignment'; // DB modulename. $this->capability = 'mod/assignment:grade'; $this->icon = 'mod/assignment/icon.gif'; }
/** * Constructor * * @internal param object $reference the parent object passed in by reference so that it's data * can be used * @return \block_ajax_marking_quiz */ public function __construct() { // Call parent constructor with the same arguments. parent::__construct(); // Must be the same as the DB modulename. $this->modulename = 'quiz'; $this->capability = 'mod/quiz:grade'; $this->icon = 'mod/quiz/icon.gif'; }
/** * Constructor * * @return \block_ajax_marking_forum * @internal param object $mainobject parent object passed in by reference */ public function __construct() { // Call parent constructor with the same arguments. parent::__construct(); // Must be the same as the DB modulename. $this->modulename = 'forum'; $this->capability = 'mod/forum:viewhiddentimedposts'; $this->icon = 'mod/forum/icon.gif'; }
/** * Finds out whether there is a method provided by the modules that overrides the core ones. * * @static * @param $moduleclass * @param $classnamesuffix * @param $filterfunctionname * @return bool|string */ private static function module_override_available(block_ajax_marking_module_base $moduleclass, $classnamesuffix, $filterfunctionname) { // If we are filtering by a specific module, look there first. $moduleclassname = 'block_ajax_marking_' . $moduleclass->get_module_name() . '_' . $classnamesuffix; $moduleoverrideavailable = class_exists($moduleclassname) && method_exists($moduleclassname, $filterfunctionname); if ($moduleoverrideavailable) { return $moduleclassname; } return false; }