Skip to content

Commit a54a42a

Browse files
committed
updating Courseware Block registration API
1 parent aac47b9 commit a54a42a

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

Courseware.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,8 +542,13 @@ public static function deleteUserdata($user_id)
542542
return $exec;
543543
}
544544

545-
public static function addBlockPath($path_to_block)
545+
public static function addBlock($plugin_name, $rel_path)
546546
{
547-
self::$registered_blocks[] = $path_to_block;
547+
$path = PluginEngine::getPlugin($plugin_name)->getPluginPath();
548+
549+
self::$registered_blocks[] = [
550+
'plugin' => $plugin_name,
551+
'path' => $path .'/'. $rel_path,
552+
];
548553
}
549554
}

0 commit comments

Comments
 (0)