コード例 #1
0
 /**
  * Adds a control to add a new course to the provided context
  * or show a message if this is not possible for some reason.
  *
  * @since 0.1
  *
  * @param IContextSource $context
  * @param array $args
  */
 public static function displayAddNewRegion(IContextSource $context, array $args = array())
 {
     if (EPOrg::has()) {
         EPCourse::displayAddNewControl($context, $args);
     } elseif ($context->getUser()->isAllowed('ep-org')) {
         $context->getOutput()->addWikiMsg('ep-courses-addorgfirst');
     }
 }