/**
  * @param Icon $a
  * @param Icon $b
  * @param int $min_size
  * @param int $max_size
  * @return int
  */
 private function compare($a, $b, $min_size, $max_size)
 {
     if ($a->isInRange($min_size, $max_size) == $b->isInRange($min_size, $max_size)) {
         return 0;
     }
     return $a->isInRange($min_size, $max_size) < $b->isInRange($min_size, $max_size) ? -1 : 1;
 }
 public function Icon($cache = true)
 {
     require_once $this->App()->config("paths")['backend']['Icon'];
     require_once $this->App()->config("paths")['backend']['CacheWrapper'];
     $Icon = new Icon(function ($iconId) {
         return $this->getIcon($iconId);
     });
     $Icon->setMissingIcon($this->App()->config("defaults")['icon']['missing']);
     if ($cache) {
         return new CacheWrapper($this->App()->config("paths")['cache'], $Icon);
     } else {
         return $Icon;
     }
 }
Exemple #3
0
 function getPortalTemplate()
 {
     $dispatcher = new StudipDispatcher();
     $controller = new NewsController($dispatcher);
     $response = $controller->relay('news/display/studip');
     $template = $GLOBALS['template_factory']->open('shared/string');
     $template->content = $response->body;
     if (StudipNews::CountUnread() > 0) {
         $navigation = new Navigation('', PluginEngine::getLink($this, array(), 'read_all'));
         $navigation->setImage(Icon::create('refresh', 'clickable', ["title" => _('Alle als gelesen markieren')]));
         $icons[] = $navigation;
     }
     if (get_config('NEWS_RSS_EXPORT_ENABLE')) {
         if ($rss_id = StudipNews::GetRssIdFromRangeId('studip')) {
             $navigation = new Navigation('', 'rss.php', array('id' => $rss_id));
             $navigation->setImage(Icon::create('rss', 'clickable', ["title" => _('RSS-Feed')]));
             $icons[] = $navigation;
         }
     }
     if ($GLOBALS['perm']->have_perm('root')) {
         $navigation = new Navigation('', 'dispatch.php/news/edit_news/new/studip');
         $navigation->setImage(Icon::create('add', 'clickable', ["title" => _('Ankündigungen bearbeiten')]), ["rel" => 'get_dialog']);
         $icons[] = $navigation;
         if (get_config('NEWS_RSS_EXPORT_ENABLE')) {
             $navigation = new Navigation('', 'dispatch.php/news/rss_config/studip');
             $navigation->setImage(Icon::create('rss+add', 'clickable', ["title" => _('RSS-Feed konfigurieren')]), ["data-dialog" => 'size=auto']);
             $icons[] = $navigation;
         }
     }
     $template->icons = $icons;
     return $template;
 }
Exemple #4
0
 public function __construct($content = '', $icon = false)
 {
     parent::__construct($content);
     if ($icon) {
         $this->setIcon(is_string($icon) ? Icon::create2($icon) : $icon);
     }
 }
Exemple #5
0
 /**
  * Get the input corresponding to the field
  *
  * @return FormInput the input instance
  */
 public function getInput()
 {
     if (!is_array($this->search)) {
         $this->search = array('type' => 'text');
     }
     switch ($this->search['type']) {
         case 'select':
             $input = new SelectInput(array('options' => $this->search['options'], 'invitation' => isset($this->search['invitation']) ? $this->search['invitation'] : null, 'emptyValue' => isset($this->search['emptyValue']) ? $this->search['emptyValue'] : null, 'attributes' => array('e-value' => 'search', 'e-class' => "search ? 'alert-info not-empty' : 'empty'")));
             break;
         case 'checkbox':
             $input = new CheckboxInput(array('attributes' => array('e-value' => 'search')));
             break;
         case 'date':
             $input = new DatetimeInput(array('id' => uniqid(), 'after' => Icon::make(array('icon' => 'times-circle', 'class' => 'clean-search', 'e-click' => 'function(){ search = null; }', 'e-show' => 'search')), 'attributes' => array('e-value' => 'search', 'e-class' => "search ? 'alert-info not-empty' : 'empty'")));
             break;
         case 'text':
         default:
             $input = new TextInput(array('after' => Icon::make(array('icon' => 'times-circle', 'class' => 'clean-search', 'e-click' => 'function(){ search = null; }', 'e-show' => 'search')), 'attributes' => array('e-input' => 'search', 'e-class' => "search ? 'alert-info not-empty' : 'empty'")));
             break;
     }
     $input->attributes['data-field'] = $this->name;
     $input->class = ' list-search-input';
     $input->value = $this->searchValue;
     return $input;
 }
 public function __construct()
 {
     parent::__construct();
     $nav = new Navigation(_("Downloads"), PluginEngine::getURL($this, array(), "downloadarea/overview"));
     $nav->setImage(Icon::create("download", "navigation"));
     Navigation::addItem("/downloader", $nav);
 }
Exemple #7
0
function head($headline, $red = False)
{
    $class = '';
    if ($red) {
        $class = '_red';
    }
    ?>
<div align="center">
<table class="default" width="70%">
    <tbody>
        <tr>
            <td class="table_header_bold<?php 
    echo $class;
    ?>
" colspan=3 align="left">
                <?php 
    echo Icon::create('mail', 'info_alt')->asImg(['class' => 'text-top']);
    ?>
                <b>&nbsp;<?php 
    echo $headline;
    ?>
</b>
            </td>
        </tr>
        <tr>
            <td style="padding: 1.5em;">
<?php 
}
 public function __construct()
 {
     parent::__construct();
     if ($GLOBALS['perm']->have_perm("root")) {
         $processes = FleximportProcess::findBySQL("1=1 ORDER BY name ASC");
         $navigation = new Navigation($this->getDisplayName());
         $navigation->setURL(PluginEngine::getURL($this, array(), 'import/overview' . (count($processes) ? "/" . $processes[0]['process_id'] : "")));
         Navigation::addItem('/start/fleximport', $navigation);
         Navigation::addItem('/fleximport', $navigation);
         if (count($processes)) {
             foreach ($processes as $process) {
                 $navigation = new Navigation($process['name'], PluginEngine::getURL($this, array(), 'import/overview/' . $process->getId()));
                 Navigation::addItem('/fleximport/process_' . $process->getId(), $navigation);
             }
         } else {
             $navigation = new Navigation(_("Import"), PluginEngine::getURL($this, array(), 'import/overview'));
             Navigation::addItem('/fleximport/overview', $navigation);
         }
         $navigation = new Navigation(_("Konfiguration"), PluginEngine::getURL($this, array(), 'config/overview'));
         Navigation::addItem('/fleximport/config', $navigation);
         if (FleximportConfig::get("DISPLAY_AT_HEADER")) {
             if (is_numeric(FleximportConfig::get("DISPLAY_AT_HEADER"))) {
                 Navigation::getItem('/fleximport')->setImage(version_compare($GLOBALS['SOFTWARE_VERSION'], "3.4", ">=") ? Icon::create("install", "navigation") : Assets::image_path("icons/lightblue/install.svg"));
             } else {
                 Navigation::getItem('/fleximport')->setImage(version_compare($GLOBALS['SOFTWARE_VERSION'], "3.4", ">=") ? Icon::create(FleximportConfig::get("DISPLAY_AT_HEADER"), "navigation") : FleximportConfig::get("DISPLAY_AT_HEADER"));
             }
         }
     }
 }
 public function afterStoreCallback()
 {
     if ($this->isDirty()) {
         //add notification to writer of review
         if (!$this->review['host_id'] && $this->review['user_id'] !== $this['user_id']) {
             PersonalNotifications::add($this->review['user_id'], URLHelper::getURL("plugins.php/lernmarktplatz/market/discussion/" . $this['review_id'] . "#comment_" . $this->getId()), sprintf(_("%s hat einen Kommentar zu Ihrem Review geschrieben."), $this['host_id'] ? LernmarktplatzUser::find($this['user_id'])->name : get_fullname($this['user_id'])), "comment_" . $this->getId(), Icon::create("support", "clickable"));
         }
         //add notification to all users of this servers who discussed this review but are neither the new
         //commentor nor the writer of the review
         $statement = DBManager::get()->prepare("\n                SELECT user_id\n                FROM lernmarktplatz_comments\n                WHERE review_id = :review_id\n                    AND host_id IS NULL\n                GROUP BY user_id\n            ");
         $statement->execute(array('review_id' => $this->review->getId()));
         foreach ($statement->fetchAll(PDO::FETCH_COLUMN, 0) as $user_id) {
             if (!in_array($user_id, array($this->review['user_id'], $this['user_id']))) {
                 PersonalNotifications::add($user_id, URLHelper::getURL("plugins.php/lernmarktplatz/market/discussion/" . $this['review_id'] . "#comment_" . $this->getId()), sprintf(_("%s hat auch einen Kommentar geschrieben."), $this['host_id'] ? LernmarktplatzUser::find($this['user_id'])->name : get_fullname($this['user_id'])), "comment_" . $this->getId(), Icon::create("support", "clickable"));
             }
         }
         //only push if the comment is from this server and the material-server is different
         if (!$this['host_id']) {
             $myHost = LernmarktplatzHost::thisOne();
             $data = array();
             $data['host'] = array('name' => $myHost['name'], 'url' => $myHost['url'], 'public_key' => $myHost['public_key']);
             $data['data'] = $this->toArray();
             $data['data']['foreign_comment_id'] = $data['data']['comment_id'];
             unset($data['data']['comment_id']);
             unset($data['data']['id']);
             unset($data['data']['user_id']);
             unset($data['data']['host_id']);
             $user_description_datafield = DataField::find(get_config("LERNMARKTPLATZ_USER_DESCRIPTION_DATAFIELD")) ?: DataField::findOneBySQL("name = ?", array(get_config("LERNMARKTPLATZ_USER_DESCRIPTION_DATAFIELD")));
             if ($user_description_datafield) {
                 $datafield_entry = DatafieldEntryModel::findOneBySQL("range_id = ? AND datafield_id = ?", array($this['user_id'], $user_description_datafield->getId()));
             }
             $data['user'] = array('user_id' => $this['user_id'], 'name' => get_fullname($this['user_id']), 'avatar' => Avatar::getAvatar($this['user_id'])->getURL(Avatar::NORMAL), 'description' => $datafield_entry ? $datafield_entry['content'] : null);
             $statement = DBManager::get()->prepare("\n                    SELECT host_id\n                    FROM lernmarktplatz_comments\n                    WHERE review_id = :review_id\n                        AND host_id IS NOT NULL\n                    GROUP BY host_id\n                ");
             $statement->execute(array('review_id' => $this->review->getId()));
             $hosts = $statement->fetchAll(PDO::FETCH_COLUMN, 0);
             if ($this->review['host_id'] && !in_array($this->review['host_id'], $hosts)) {
                 $hosts[] = $this->review['host_id'];
             }
             if ($this->review->material['host_id'] && !in_array($this->review->material['host_id'], $hosts)) {
                 $hosts[] = $this->review->material['host_id'];
             }
             foreach ($hosts as $host_id) {
                 $remote = new LernmarktplatzHost($host_id);
                 if (!$remote->isMe()) {
                     $review_id = $this->review['foreign_review_id'] ?: $this->review->getId();
                     if ($this->review['foreign_review_id']) {
                         if ($this->review->host_id === $remote->getId()) {
                             $host_hash = null;
                         } else {
                             $host_hash = md5($this->review->host['public_key']);
                         }
                     } else {
                         $host_hash = md5($myHost['public_key']);
                     }
                     $remote->pushDataToEndpoint("add_comment/" . $review_id . "/" . $host_hash, $data);
                 }
             }
         }
     }
 }
 public function afterStoreCallback()
 {
     if (!$this->material['host_id'] && $this->material['user_id'] !== $GLOBALS['user']->id) {
         PersonalNotifications::add($this->material['user_id'], URLHelper::getURL("plugins.php/lernmarktplatz/market/details/" . $this->material->getId() . "#review_" . $this->getId()), $this->isNew() ? sprintf(_("%s hat ein Review zu '%s' geschrieben."), $this['host_id'] ? LernmarktplatzUser::find($this['user_id'])->name : get_fullname($this['user_id']), $this->material['name']) : sprintf(_("%s hat ein Review zu '%s' verändert."), $this['host_id'] ? LernmarktplatzUser::find($this['user_id'])->name : get_fullname($this['user_id']), $this->material['name']), "review_" . $this->getId(), Icon::create("support", "clickable"));
     }
     //only push if the comment is from this server and the material-server is different
     if ($this->material['host_id'] && !$this['host_id'] && $this->isDirty()) {
         $remote = new LernmarktplatzHost($this->material['host_id']);
         $myHost = LernmarktplatzHost::thisOne();
         $data = array();
         $data['host'] = array('name' => $myHost['name'], 'url' => $myHost['url'], 'public_key' => $myHost['public_key']);
         $data['data'] = $this->toArray();
         $data['data']['foreign_review_id'] = $data['data']['review_id'];
         unset($data['data']['review_id']);
         unset($data['data']['id']);
         unset($data['data']['user_id']);
         unset($data['data']['host_id']);
         $user_description_datafield = DataField::find(get_config("LERNMARKTPLATZ_USER_DESCRIPTION_DATAFIELD")) ?: DataField::findOneBySQL("name = ?", array(get_config("LERNMARKTPLATZ_USER_DESCRIPTION_DATAFIELD")));
         if ($user_description_datafield) {
             $datafield_entry = DatafieldEntryModel::findOneBySQL("range_id = ? AND datafield_id = ?", array($this['user_id'], $user_description_datafield->getId()));
         }
         $data['user'] = array('user_id' => $this['user_id'], 'name' => get_fullname($this['user_id']), 'avatar' => Avatar::getAvatar($this['user_id'])->getURL(Avatar::NORMAL), 'description' => $datafield_entry ? $datafield_entry['content'] : null);
         if (!$remote->isMe()) {
             $remote->pushDataToEndpoint("add_review/" . $this->material['foreign_material_id'], $data);
         }
     }
 }
 public function __construct()
 {
     parent::__construct();
     $top = new Navigation($this->getDisplayTitle(), PluginEngine::getURL($this, array('view' => 'tiles'), "presenting/overview"));
     $top->setImage(Icon::create($this->getPluginURL() . "/assets/topicon.svg"));
     $overview = new Navigation($this->getDisplayTitle(), PluginEngine::getURL($this, array(), "presenting/overview"));
     $top->addSubNavigation("presenting", $overview);
     $overview->addSubNavigation("overview", new AutoNavigation(_('Übersicht'), PluginEngine::getURL($this, array(), "presenting/overview")));
     $overview->addSubNavigation("all", new AutoNavigation(_('Alle Plugins'), PluginEngine::getURL($this, array(), "presenting/all")));
     $overview->addSubNavigation("tools", new AutoNavigation(_('Tools'), PluginEngine::getURL($this, array(), "tools/sidebar_graphics_generator")));
     if ($GLOBALS['perm']->have_perm("autor")) {
         $top->addSubNavigation("myplugins", new Navigation(_("Meine Plugins"), PluginEngine::getURL($this, array(), "myplugins/overview")));
     }
     if ($GLOBALS['perm']->have_perm("user")) {
         $last_visit = UserConfig::get($GLOBALS['user']->id)->getValue("last_pluginmarket_visit");
         if ($last_visit) {
             $badge_number = MarketPlugin::countBySql("publiclyvisible = 1 AND approved = 1 AND published > ?", array($last_visit));
             if ($badge_number > 0) {
                 $top->setBadgeNumber($badge_number);
             }
         }
     }
     if ($GLOBALS['perm']->have_perm("root")) {
         $approving = new Navigation(_("Qualitätssicherung"), PluginEngine::getURL($this, array(), "approving/overview"));
         $top->addSubNavigation("approving", $approving);
     }
     Navigation::addItem("/pluginmarket", $top);
     $loginlink = new Navigation($this->getDisplayTitle(), PluginEngine::getURL($this, array(), "presenting/overview"));
     $loginlink->setDescription(_("Laden Sie hier Plugins für Ihr Stud.IP herunter"));
     Navigation::addItem("/login/pluginmarket", $loginlink);
     NotificationCenter::addObserver($this, "triggerFollowingStudips", "PluginReleaseDidUpdateCode");
 }
Exemple #12
0
 function getTabNavigation($course_id)
 {
     $object_type = get_object_type($course_id, array('sem', 'inst'));
     if ($object_type === 'sem') {
         $course = Course::find($course_id);
         $sem_class = $GLOBALS['SEM_CLASS'][$GLOBALS['SEM_TYPE'][$course->status]['class']] ?: SemClass::getDefaultSemClass();
     } else {
         $institute = Institute::find($course_id);
         $sem_class = SemClass::getDefaultInstituteClass($institute->type);
     }
     $navigation = new Navigation(_('Übersicht'));
     $navigation->setImage(Icon::create('seminar', 'info_alt'));
     $navigation->setActiveImage(Icon::create('seminar', 'info'));
     if ($object_type !== 'sem') {
         $navigation->addSubNavigation('info', new Navigation(_('Kurzinfo'), 'dispatch.php/institute/overview'));
         $navigation->addSubNavigation('courses', new Navigation(_('Veranstaltungen'), 'show_bereich.php?level=s&id=' . $course_id));
         $navigation->addSubNavigation('schedule', new Navigation(_('Veranstaltungs-Stundenplan'), 'dispatch.php/calendar/instschedule?cid=' . $course_id));
         if ($GLOBALS['perm']->have_studip_perm('admin', $course_id)) {
             $navigation->addSubNavigation('admin', new Navigation(_('Administration der Einrichtung'), 'dispatch.php/institute/basicdata/index?new_inst=TRUE'));
         }
     } else {
         $navigation->addSubNavigation('info', new Navigation(_('Kurzinfo'), 'dispatch.php/course/overview'));
         if (!$sem_class['studygroup_mode']) {
             $navigation->addSubNavigation('details', new Navigation(_('Details'), 'dispatch.php/course/details/'));
         }
         if (!$course->admission_binding && in_array($GLOBALS['perm']->get_studip_perm($course_id), array('user', 'autor'))) {
             $navigation->addSubNavigation('leave', new Navigation(_('Austragen aus der Veranstaltung'), 'dispatch.php/my_courses/decline/' . $course_id . '?cmd=suppose_to_kill'));
         }
     }
     return array('main' => $navigation);
 }
Exemple #13
0
 /**
  * show the administration page for mass-editing forum-entries
  */
 function index_action()
 {
     ForumPerm::check('admin', $this->getId());
     $nav = Navigation::getItem('course/forum2');
     $nav->setImage(Icon::create('forum', 'info'));
     Navigation::activateItem('course/forum2/admin');
     $list = ForumEntry::getList('flat', $this->getId());
     // sort by cat
     $new_list = array();
     // iterate over all categories and add the belonging areas to them
     foreach ($categories = ForumCat::getListWithAreas($this->getId(), false) as $category) {
         if ($category['topic_id']) {
             $new_list[$category['category_id']][$category['topic_id']] = $list['list'][$category['topic_id']];
             unset($list['list'][$category['topic_id']]);
         } else {
             if (ForumPerm::has('add_area', $this->seminar_id)) {
                 $new_list[$category['category_id']] = array();
             }
         }
         $this->categories[$category['category_id']] = $category['entry_name'];
     }
     if (!empty($list['list'])) {
         // append the remaining entries to the standard category
         $new_list[$this->getId()] = array_merge((array) $new_list[$this->getId()], $list['list']);
     }
     $this->list = $new_list;
 }
Exemple #14
0
 public function initItem()
 {
     global $user, $neux;
     parent::initItem();
     $my_messaging_settings = UserConfig::get($user->id)->MESSAGING_SETTINGS;
     $lastVisitedTimestamp = isset($my_messaging_settings['last_box_visit']) ? (int) $my_messaging_settings['last_box_visit'] : 0;
     $query = "SELECT SUM(mkdate > :time AND readed = 0) AS num_new,\n                         SUM(readed = 0) AS num_unread,\n                         SUM(readed = 1) AS num_read\n                  FROM message_user\n                  WHERE snd_rec = 'rec' AND user_id = :user_id AND deleted = 0";
     $statement = DBManager::get()->prepare($query);
     $statement->bindValue(':time', $lastVisitedTimestamp);
     $statement->bindValue(':user_id', $GLOBALS['user']->id);
     $statement->execute();
     list($neux, $neum, $altm) = $statement->fetch(PDO::FETCH_NUM);
     $this->setBadgeNumber($neum);
     if ($neux > 0) {
         $tip = sprintf(ngettext('Sie haben %d neue ungelesene Nachricht', 'Sie haben %d neue ungelesene Nachrichten', $neux), $neux);
     } else {
         if ($neum > 1) {
             $tip = sprintf(ngettext('Sie haben %d ungelesene Nachricht', 'Sie haben %d ungelesene Nachrichten', $neum), $neum);
         } else {
             if ($altm > 1) {
                 $tip = sprintf(ngettext('Sie haben %d alte empfangene Nachricht', 'Sie haben %d alte empfangene Nachrichten', $altm), $altm);
             } else {
                 $tip = _('Sie haben keine alten empfangenen Nachrichten');
             }
         }
     }
     $this->setImage(Icon::create('mail', 'navigation', ["title" => $tip]));
 }
 function getTabNavigation($course_id)
 {
     $navigation = new Navigation(_('Teilnehmende'), "dispatch.php/course/studygroup/members/" . $course_id);
     $navigation->setImage(Icon::create('persons', 'info_alt'));
     $navigation->setActiveImage(Icon::create('persons', 'info'));
     return array('members' => $navigation);
 }
Exemple #16
0
 public function initItem()
 {
     parent::initItem();
     if (is_object($GLOBALS['user']) && $GLOBALS['user']->id != 'nobody') {
         if (WidgetHelper::hasWidget($GLOBALS['user']->id, 'News')) {
             $news = StudipNews::CountUnread();
         }
         if (Config::get()->VOTE_ENABLE && WidgetHelper::hasWidget($GLOBALS['user']->id, 'Evaluations')) {
             $threshold = Config::get()->NEW_INDICATOR_THRESHOLD ? strtotime("-{" . Config::get()->NEW_INDICATOR_THRESHOLD . "} days 0:00:00") : 0;
             $statement = DBManager::get()->prepare("\n                    SELECT COUNT(*)\n                    FROM questionnaire_assignments\n                        INNER JOIN questionnaires ON (questionnaires.questionnaire_id = questionnaire_assignments.questionnaire_id)\n                    WHERE questionnaire_assignments.range_id = 'start'\n                        AND questionnaires.visible = 1\n                        AND questionnaires.startdate IS NOT NULL\n                        AND questionnaires.startdate > UNIX_TIMESTAMP()\n                        AND questionnaires.startdate > :threshold\n                        AND (questionnaires.stopdate IS NULL OR questionnaires.stopdate <= UNIX_TIMESTAMP())\n                ");
             $statement->execute(array('threshold' => $threshold));
             $vote = (int) $statement->fetchColumn();
             $query = "SELECT COUNT(IF(chdate > IFNULL(b.visitdate, :threshold) AND d.author_id != :user_id, a.eval_id, NULL))\n                          FROM eval_range a\n                          INNER JOIN eval d ON (a.eval_id = d.eval_id AND d.startdate < UNIX_TIMESTAMP() AND\n                                            (d.stopdate > UNIX_TIMESTAMP() OR d.startdate + d.timespan > UNIX_TIMESTAMP() OR (d.stopdate IS NULL AND d.timespan IS NULL)))\n                          LEFT JOIN object_user_visits b ON (b.object_id = d.eval_id AND b.user_id = :user_id AND b.type = 'eval')\n                          WHERE a.range_id = 'studip'\n                          GROUP BY a.range_id";
             $statement = DBManager::get()->prepare($query);
             $statement->bindValue(':user_id', $GLOBALS['user']->id);
             $statement->bindValue(':threshold', ($threshold = Config::get()->NEW_INDICATOR_THRESHOLD) ? strtotime("-{$threshold} days 0:00:00") : 0);
             $statement->execute();
             $vote += (int) $statement->fetchColumn();
         }
     }
     $homeinfo = _('Zur Startseite');
     if ($news) {
         $homeinfo .= ' - ';
         $homeinfo .= sprintf(ngettext('%u neue Ankündigung', '%u neue Ankündigungen', $news), $news);
     }
     if ($vote) {
         $homeinfo .= ' - ';
         $homeinfo .= sprintf(ngettext('%u neuer Fragebogen', '%u neue Fragebögen', $vote), $vote);
     }
     $this->setBadgeNumber($vote + $news);
     $this->setImage(Icon::create('home', 'navigation', ["title" => $homeinfo]));
 }
Exemple #17
0
 /** 
  * @see StudipModule::getMetadata()
  */
 function getMetadata()
 {
     return array('summary' => _('Anzeige aller Termine der Veranstaltung'), 'description' => _('Der Ablaufplan listet alle Präsenz-, ' . 'E-Learning-, Klausur-, Exkursions- und sonstige ' . 'Veranstaltungstermine auf. Zur besseren Orientierung und zur ' . 'inhaltlichen Einstimmung der Studierenden können Lehrende den ' . 'Terminen Themen hinzufügen, die z. B. eine Kurzbeschreibung ' . 'der Inhalte darstellen.'), 'displayname' => _('Ablaufplan'), 'category' => _('Lehr- und Lernorganisation'), 'keywords' => _('Inhaltliche und räumliche Orientierung für Studierende;
                         Beschreibung der Inhalte einzelner Termine;
                         Raumangabe;
                         Themenzuordnung zu Terminen;
                         Terminzuordnung zu Themen'), 'descriptionshort' => _('Anzeige aller Termine der Veranstaltung, ggf. mit Themenansicht'), 'descriptionlong' => _('Der Ablaufplan listet alle Präsenz-, E-Learning-, Klausur-, Exkursions- ' . 'und sonstige Veranstaltungstermine auf. Zur besseren Orientierung und zur ' . 'inhaltlichen Einstimmung der Studierenden können Lehrende den Terminen ' . 'Themen hinzufügen, die z. B. eine Kurzbeschreibung der Inhalte darstellen.'), 'icon' => Icon::create('schedule', 'info'), 'screenshots' => array('path' => 'plus/screenshots/Ablaufplan', 'pictures' => array(0 => array('source' => 'Termine_mit_Themen.jpg', 'title' => _('Termine mit Themen')), 1 => array('source' => 'Thema_bearbeiten_und_einem_Termin_zuordnen.jpg', 'title' => _('Thema bearbeiten und einem Termin zuordnen')))));
 }
Exemple #18
0
 protected function createSidebar($active = 'week', $calendar = null)
 {
     parent::createSidebar($active, $calendar);
     $sidebar = Sidebar::Get();
     $actions = new ActionsWidget();
     $actions->addLink(_('Termin anlegen'), $this->url_for('calendar/group/edit'), Icon::create('add', 'clickable'), array('data-dialog' => 'size=auto'));
     $actions->addLink(_('Kalender freigeben'), $this->url_for('calendar/single/manage_access/' . $GLOBALS['user']->id, array('group_filter' => $this->range_id)), Icon::create('community', 'clickable'), array('id' => 'calendar-open-manageaccess', 'data-dialog' => '', 'data-dialogname' => 'manageaccess'));
     $sidebar->addWidget($actions);
 }
Exemple #19
0
 /**
  * Registers foundation fonts
  * @param mixed $fonts the array or string name to register.
  */
 public static function registerFonts($fonts = array())
 {
     if (empty($fonts)) {
         return;
     }
     foreach ($fonts as $font) {
         Icon::registerIconFontSet($font);
     }
 }
Exemple #20
0
 /**
  * Renders the widget.
  */
 public function run()
 {
     $this->registerPlugin('button');
     $this->label = $this->getLabel();
     if ($this->enableIcon) {
         $this->label .= Icon::widget(['label' => $this->icon, 'options' => $this->iconOptions]);
     }
     return Html::tag($this->tagName, $this->label, $this->options);
 }
 /** 
  * @see StudipModule::getMetadata()
  */
 function getMetadata()
 {
     return array('summary' => _('Liste aller Teilnehmenden einschließlich Nachrichtenfunktionen'), 'description' => _('Die Teilnehmenden werden gruppiert nach ihrer ' . 'jeweiligen Funktion in einer Tabelle gelistet. Für Lehrende ' . 'werden sowohl das Anmeldedatum als auch der Studiengang mit ' . 'Semesterangabe dargestellt. Die Liste kann in verschiedene ' . 'Formate exportiert werden. Außerdem gibt es die ' . 'Möglichkeiten, eine Rundmail an alle zu schreiben (nur ' . 'Lehrende) bzw. einzelne Teilnehmende separat anzuschreiben.'), 'displayname' => _('Teilnehmende'), 'keywords' => _('Rundmail an einzelne, mehrere oder alle Teilnehmenden;
                         Gruppierung nach Lehrenden, Tutor/-innen und Studierenden (Autor/-innen);
                         Aufnahme neuer Studierender (Autor/-innen) und Tutor/-innen;
                         Import einer Teilnehmendenliste;
                         Export der Teilnehmendenliste;
                         Einrichten von Gruppen;
                         Anzeige Studiengang und Fachsemester'), 'descriptionshort' => _('Liste aller Teilnehmenden einschließlich Nachrichtenfunktionen'), 'descriptionlong' => _('Die Teilnehmenden werden gruppiert nach ihrer jeweiligen Rolle in ' . 'einer Tabelle gelistet. Für Lehrende werden sowohl das Anmeldedatum ' . 'als auch der Studiengang mit Semesterangabe der Studierenden dargestellt. ' . 'Die Liste kann in verschiedene Formate exportiert werden. Außerdem gibt ' . 'es die Möglichkeiten für Lehrende, allen eine Rundmail zukommen zu lassen ' . 'bzw. einzelne Teilnehmende separat anzuschreiben.'), 'category' => _('Lehr- und Lernorganisation'), 'icon' => Icon::create('persons', 'info'), 'screenshots' => array('path' => 'plus/screenshots/TeilnehmerInnen', 'pictures' => array(0 => array('source' => 'Liste_aller_Teilnehmenden_einer_Veranstaltung.jpg', 'title' => _('Liste aller Teilnehmenden einer Veranstaltung')), 1 => array('source' => 'Rundmail_an_alle_TeilnehmerInnen_einer_Veranstaltung.jpg', 'title' => _('Rundmail an alle Teilnehmdenden einer Veranstaltung')))));
 }
Exemple #22
0
 /**
  * create a link for a widget
  *
  * @param String $label      Label/content of the link
  * @param String $url        URL/Location of the link
  * @param Mixed  $icon       Icon for the link, should be an Icon
  *                           object; until v3.6 this may be a string
  * @param array  $attributes HTML-attributes for the a-tag in an associative array.
  */
 public function __construct($label, $url, $icon = null, $attributes = array())
 {
     parent::__construct();
     $this->label = $label;
     $this->url = $url;
     $this->attributes = $attributes;
     // DEPRECATED
     // TODO icon may be a string until v3.6
     $this->icon = is_string($icon) ? Icon::create2($icon) : $icon;
 }
 /**
  * @param null $icon
  * @param array $options
  * @return $this
  */
 public function icon($icon, $options = [])
 {
     if ($icon === false) {
         $this->parts['{icon}'] = '';
         return $this;
     }
     $options = array_merge($this->iconOptions, $options);
     $this->parts['{icon}'] = Icon::widget(['name' => $icon, 'options' => $options]);
     return $this;
 }
Exemple #24
0
 /** 
  * @see StudipModule::getMetadata()
  */
 function getMetadata()
 {
     return array('summary' => _('Austausch von Dateien'), 'description' => _('Im Dateibereich können Dateien sowohl von ' . 'Lehrenden als auch von Studierenden hoch- bzw. ' . 'heruntergeladen werden. Es können Ordner angelegt und ' . 'individuell benannt werden (nur Lehrende). Die Dateien ' . 'können somit strukturiert zur Verfügung gestellt werden. ' . 'Multimediadateien wie Grafiken, Audio- und Videodateien ' . 'können sofort angezeigt bzw. abgespielt werden. Über das ' . 'PlugIn "Dateiordnerberechtigung" können Im Dateibereich ' . 'bestimmte Rechte für Studierende, wie z.B. das Leserecht, ' . 'festgelegt werden.'), 'displayname' => _('Dateien'), 'category' => _('Lehr- und Lernorganisation'), 'keywords' => _('Hoch- und Herunterladen von Dateien;
                         Anlegen von Ordnern und Unterordnern;
                         Verschieben einer Datei/eines Ordners per drag and drop innerhalb einer Veranstaltung;
                         Verschieben einer Datei/eines Ordners in eine andere Veranstaltung;
                         Kopieren einer Datei/eines Ordners in eine andere oder mehrere Veranstaltungen;
                         Verlinkung auf abgelegte Dateien möglich;
                         Erstellung Hausaufgabenordner durch Aktivierung der Funktion "Dateiordnerberechtigung"'), 'descriptionshort' => _('Austausch von Dateien'), 'descriptionlong' => _('Dateien können sowohl von Lehrenden als auch von Studierenden hoch- bzw. ' . 'heruntergeladen werden. Ordner können angelegt und individuell benannt werden ' . '(Standard: nur Lehrende), so dass Dateien strukuriert zur Verfügung gestellt ' . 'werden können. Multimediadateien wie Grafiken, Audio- und Videodateien werden ' . 'sofort angezeigt bzw. abspielbar dargestellt. Über das PlugIn "Dateiordnerberechtigungen" ' . 'können Im Dateibereich bestimmte Rechte (r, w, x, f) für Studierende, wie z.B. das ' . 'Leserecht (r), festgelegt werden.'), 'icon' => Icon::create('files', 'info'), 'screenshots' => array('path' => 'plus/screenshots/Dateibereich_-_Dateiordnerberechtigung', 'pictures' => array(0 => array('source' => 'Ordneransicht_mit_geoeffnetem_Ordner.jpg', 'title' => _('Ordneransicht mit geöffnetem Ordner')), 1 => array('source' => 'Ordneransicht_mit_Dateiinformationen.jpg', 'title' => _('Ordneransicht mit Dateiinformationen')), 2 => array('source' => 'Neuen_Ordner_erstellen.jpg', 'title' => _('Neuen Ordner erstellen')), 3 => array('source' => 'Ordner_zum_Hausaufgabenordner_umwandeln.jpg', 'title' => _('Ordner zum Hausaufgabenordner umwandeln')), 4 => array('source' => 'Ansicht_alle_Dateien.jpg', 'title' => _('Ansicht alle Dateien')))));
 }
Exemple #25
0
 public function testActiveImage()
 {
     $foo = Icon::create('foo', 'clickable');
     $bar = Icon::create('bar', 'clickable');
     $navigation = new Navigation('test', 'foo.php');
     $navigation->setImage($foo);
     $navigation->setActiveImage($bar);
     $this->assertEquals($foo, $navigation->getImage());
     $navigation->setActive(true);
     $this->assertEquals($bar, $navigation->getImage());
 }
Exemple #26
0
 /**
  * Initialize a new Navigation instance.
  */
 public function __construct()
 {
     global $perm;
     parent::__construct(_('Planer'));
     if (!$perm->have_perm('admin') && get_config('SCHEDULE_ENABLE')) {
         $planerinfo = _('Stundenplan');
     } else {
         $planerinfo = _('Termine');
     }
     $this->setImage(Icon::create('schedule', 'navigation', ["title" => $planerinfo]));
 }
Exemple #27
0
 function getTabNavigation($course_id)
 {
     if (get_config('CALENDAR_GROUP_ENABLE')) {
         $navigation = new Navigation(_('Kalender'), 'dispatch.php/calendar/single/');
         $navigation->setImage(Icon::create('schedule', 'info_alt'));
         $navigation->setActiveImage(Icon::create('schedule', 'info'));
         return array('calendar' => $navigation);
     } else {
         return null;
     }
 }
Exemple #28
0
 public function getOptions()
 {
     if (!$this->reported) {
         $opt[] = sprintf('<a style="cursor : pointer" class="message" id="%s">%s</a>', $this->from_user_id, \Icon::show('undo', 'Reply to contact'));
         $opt[] = sprintf('<a style="cursor:pointer" class="report" id="%s">%s</a>', $this->id, \Icon::show('warning', 'Report'));
         $opt[] = javascript('confirm', array('question' => 'Are you sure you want to delete this message?', 'address' => \PHPWS_Text::linkAddress('properties', array('rop' => 'delete_message', 'id' => $this->id)), 'link' => \Icon::show('delete'), 'title' => 'Delete message'));
         return implode('', $opt);
     } else {
         return null;
     }
 }
Exemple #29
0
 public function set_sidebar()
 {
     $sidebar = Sidebar::Get();
     $sidebar->setImage('sidebar/studygroup-sidebar.png');
     $sidebar->setTitle(_('Meine Studiengruppen'));
     if (count($this->studygroups) > 0) {
         $setting_widget = new ActionsWidget();
         $setting_widget->setTitle(_("Aktionen"));
         $setting_widget->addLink(_('Farbgruppierung ändern'), URLHelper::getLink('dispatch.php/my_courses/groups/all/true'), Icon::create('group4', 'clickable'), array('data-dialog' => 'buttons=true'));
         $sidebar->addWidget($setting_widget);
     }
 }
Exemple #30
0
 public function initItem()
 {
     global $user;
     parent::initItem();
     $db = DBManager::get();
     $time = $user->cfg->PROFILE_LAST_VISIT ? $user->cfg->PROFILE_LAST_VISIT : $user->cfg->LAST_LOGIN_TIMESTAMP;
     $hp_txt = _('Zu Ihrer Profilseite');
     $hp_link = 'dispatch.php/profile';
     $hp_txt .= sprintf(' (%s, %s)', $user->username, $user->perms);
     $this->setURL($hp_link);
     $this->setImage(Icon::create('person', 'navigation', ["title" => $hp_txt]), ["class" => $hp_class]);
 }