Skip to content
Snippets Groups Projects
Select Git revision
  • 1724e93c6d21b8f92328d7ed76b47db7827d896a
  • main default protected
  • step-3263
  • feature/plugins-cli
  • feature/vite
  • step-2484-peerreview
  • biest/issue-5051
  • tests/simplify-jsonapi-tests
  • fix/typo-in-1a70031
  • feature/broadcasting
  • database-seeders-and-factories
  • feature/peer-review-2
  • feature-feedback-jsonapi
  • feature/peerreview
  • feature/balloon-plus
  • feature/stock-images-unsplash
  • tic-2588
  • 5.0
  • 5.2
  • biest/unlock-blocks
  • biest-1514
21 results

Folder.php

Blame
  • Forked from Stud.IP / Stud.IP
    Source project has a limited visibility.
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    assistant.php 20.96 KiB
    <?php
    
    require_once __DIR__.'/ToolAssistantBaseController.php';
    
    use Mooc\DB\Block as dbBlock;
    
    /**
     * This program is free software; you can redistribute it and/or
     * modify it under the terms of the GNU General Public License as
     * published by the Free Software Foundation; either version 2 of
     * the License, or (at your option) any later version.
     *
     * @author      Elmar Ludwig
     * @author      Ron Lucke
     * @license     http://www.gnu.org/licenses/gpl-2.0.html GPL version 2
     */
    
    class AssistantController extends ToolAssistantBaseController
    {
        /**
         * Default action: show the tool assistant.
         */
        public function index_action()
        {
            $preferredLang = mb_substr($GLOBALS['user']->preferred_language, 0, 2);
            if ($preferredLang=='en') {
                $name='Service and Support';
            } else {
                $name='Service und Support';
            }
            Navigation::activateItem('/course/assistant');
            PageLayout::setTitle(Context::getHeaderLine() . ' - ' . $name);
            PageLayout::addStylesheet($this->plugin->getPluginURL() . '/assets/assistant.css?v=0.1');
    
            $widget = new SidebarWidget();
            $widget->setTitle($name);
            if ($preferredLang=='en') {
                $widget->addElement(new WidgetElement('Osnabrück University offers many opportunities to support teaching online via virtUOS and the computing center (Rechenzentrum).
                    Reliable operation and personal support are guaranteed for the tools presented here and they allow for a use that is unobjectionable in terms of data protection law.<br><br>
                    On this page, you will find initial information and you can start further steps directly from here.'));
                $widget->addElement(new WidgetElement(Studip\LinkButton::create(_('Download cheat sheet'), $this->plugin->getPluginURL().'/assets/cheatsheet-teach-online.pdf')));
            } else {
                $widget->addElement(new WidgetElement(
                    'Die Universität Osnabrück bietet über virtUOS und Rechenzentrum viele Möglichkeiten, Lehre online zu unterstützen.
                     Für die hier vorgestellten Tools sind verlässlicher Betrieb und persönlicher Support gewährleistet und sie
                     ermöglichen eine datenschutzrechtlich unbedenkliche Nutzung.<br><br>
                     Auf dieser Seite finden Sie nicht nur erste Informationen, sondern können weitere Schritte direkt von hier aus starten.')
                );
                $widget->addElement(new WidgetElement(Studip\LinkButton::create(_('"Spickzettel" herunterladen'), $this->plugin->getPluginURL().'/assets/spickzettel-online-lehre.pdf')));
            }
            Sidebar::get()->addWidget($widget);
    
            $this->course = Course::find($this->course_id);
            $this->datafields = DataFieldEntry::getDataFieldEntries($this->course_id, 'sem');
            $this->folder_id = Folder::findTopFolder($this->course_id)->id;
        }
    
        public function set_type_action()
        {
            CSRFProtection::verifyUnsafeRequest();
    
            $request = Request::getInstance();
            
    
            $datafields = DataFieldEntry::getDataFieldEntries($this->course_id, 'sem');
            $id = 'aee5626da96ab9c37976b2fc454d88b4';
    
            $values = array();
            foreach($request as $key => $value) {
                switch ($key) {