?>
<? if ($is_inst) : ?>
    <h2><?php 
echo _('Lernmodule der Einrichtung');
?>
</h2>
<? else : ?> 
    <h2><?php 
echo _('Lernmodule der Veranstaltung');
?>
</h2>
<? endif ?>
<? if ($elearning_active) : ?>
    <? if ($new_account) : ?>
        <?php 
echo ELearningUtils::getNewAccountForm($new_account);
?>
    <? else : ?>
        <? if (!count($content_modules) AND count($course_output['courses'])) : ?>
            <br>
            <div class="messagebox messagebox_info" style="background-image: none; padding-left: 15px">
                <?php 
echo $course_output['text'];
?>
<br>
                <? foreach ($course_output['courses'] as $course) : ?>        
                    <a href="<?php 
echo $course['url'];
?>
"><?php 
echo sprintf(_('Kurs in %s'), $course['cms_name']);
Example #2
0
 /**
  * Displays accounts and elearning modules for active user
  */
 public function my_accounts_action()
 {
     global $connected_cms, $current_module, $messages;
     Navigation::activateItem('/tools/my_elearning');
     PageLayout::setTitle(_("Meine Lernmodule und Benutzer-Accounts"));
     if ($this->new_account_cms != "") {
         $this->new_account_form = ELearningUtils::getNewAccountForm($this->new_account_cms);
     }
     foreach ($GLOBALS['ELEARNING_INTERFACE_MODULES'] as $cms => $cms_preferences) {
         if (ELearningUtils::isCMSActive($cms)) {
             ELearningUtils::loadClass($cms);
             if ($cms_preferences["auth_necessary"] == true) {
                 $this->new_module_form[$cms] = ELearningUtils::getNewModuleForm($cms);
             }
             $connection_status = $connected_cms[$cms]->getConnectionStatus($cms);
             foreach ($connection_status as $type => $msg) {
                 if ($msg["error"] != "") {
                     PageLayout::postMessage(MessageBox::error(_("Es traten Probleme bei der Anbindung einzelner Lermodule auf. Bitte wenden Sie sich an Ihren Systemadministrator."), array($cms . ': ' . $msg["error"])));
                     $GLOBALS["ELEARNING_INTERFACE_" . $cms . "_ACTIVE"] = false;
                 }
             }
         }
     }
     $connected_cms = array();
     // prepare cms list
     foreach ($GLOBALS['ELEARNING_INTERFACE_MODULES'] as $cms => $cms_preferences) {
         if (ELearningUtils::isCMSActive($cms) and $cms_preferences["auth_necessary"]) {
             ELearningUtils::loadClass($cms);
             $this->cms_list[$cms] = $cms_preferences;
             $this->cms_list[$cms]['name'] = $connected_cms[$cms]->getName();
             $this->cms_list[$cms]['logo'] = $connected_cms[$cms]->getLogo();
             $this->cms_list[$cms]['modules'] = array();
             if ($this->new_account_cms != $cms) {
                 $this->cms_list[$cms]['show_account_form'] = $cms_preferences;
             }
             if ($GLOBALS["module_type_" . $cms] != "") {
                 $this->cms_list[$cms]['cms_anker_target'] = true;
             }
             if ($connected_cms[$cms]->user->isConnected()) {
                 $this->cms_list[$cms]['start_link'] = $connected_cms[$cms]->link->getStartpageLink();
             }
             if ($this->new_account_cms != $cms) {
                 if ($connected_cms[$cms]->user->isConnected()) {
                     $this->cms_list[$cms]['user'] = $connected_cms[$cms]->user->getUsername();
                     $connected_cms[$cms]->soap_client->setCachingStatus(false);
                     $this->user_content_modules = $connected_cms[$cms]->getUserContentModules();
                     $connected_cms[$cms]->soap_client->setCachingStatus(true);
                     if (!($this->user_content_modules == false)) {
                         foreach ($this->user_content_modules as $key => $connection) {
                             $connected_cms[$cms]->setContentModule($connection, false);
                             $this->cms_list[$cms]['modules'][] = $connected_cms[$cms]->content_module[$current_module]->view->show();
                         }
                     }
                     $this->cms_list[$cms]['new_module_form'] = $this->new_module_form[$cms];
                 }
             } else {
                 $this->cms_list[$cms]['account_form'] = $this->new_account_form;
             }
         }
     }
     $sidebar = Sidebar::get();
     $sidebar->setImage('sidebar/learnmodule-sidebar.png');
     $widget = new ActionsWidget();
     if ($GLOBALS['perm']->have_perm('autor') and count($this->cms_list)) {
         foreach ($this->cms_list as $cms_key => $cms_data) {
             if ($connected_cms[$cms_key]->user->isConnected()) {
                 $widget->addLink(sprintf(_('Zur %s Startseite'), $cms_data['name']), URLHelper::getScriptLink($cms_data['start_link']), Icon::create('link-extern', 'clickable'), array('target' => '_blank'));
                 $link_count++;
             }
         }
     }
     if ($link_count) {
         $sidebar->addWidget($widget);
     }
     // terminate objects
     if (is_array($connected_cms)) {
         foreach ($connected_cms as $system) {
             $system->terminate();
         }
     }
     if (is_array($messages)) {
         foreach ($messages as $mtype => $mtext) {
             PageLayout::postMessage(MessageBox::$mtype($mtext));
         }
     }
 }
Example #3
0
            <td class="table_header_bold" colspan="3">&nbsp;</td>
        </tr>
        <tr>
            <td class="blank" colspan="3">&nbsp;
            </td>
        </tr>
        <tr valign="top">
                <td width="1%" class="blank">
                &nbsp;
                </td>
                <td width="90%" class="blank">

    <?
    if (!empty($new_account_cms))
    {
        $output = ELearningUtils::getNewAccountForm($new_account_cms);
    }

    if ($messages["info"] != "")
    {
        echo "<table>";
        my_info($messages["info"]);
        echo "</table>";
    }
    if ($messages["error"] != "")
    {
        echo "<table>";
        my_error($messages["error"]);
        echo "</table>";
    }