示例#1
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $portfolios = \PortfolioModel::getMyPortfolios();
     $listViewer = new \Widgets\ListViewer();
     if (isset($this->portfolioId)) {
         $portfolioObject = new \PortfolioModel(\steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->portfolioId));
     }
     if (isset($this->artefactId)) {
         $artefactObject = new \ArtefactModel(\steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->artefactId));
     }
     $steamUser = $GLOBALS["STEAM"]->get_current_steam_user();
     //		/** check the rights of the log-in user */
     //		$threadObject_allowed_read = $threadObject->check_access_read($steamUser);
     //		$threadObject_write = $threadObject->check_access_write($steamUser);
     //		$threadObject_annotate = $threadObject->check_access_annotate($steamUser);
     $listViewer->setHeadlineProvider(new HeadlineProviderDebug());
     $listViewer->setContentProvider(new ContentProviderDebug());
     if (isset($portfolioObject)) {
         $listViewer->setContent($artefacts);
     } else {
         $listViewer->setContent($portfolios);
     }
     $frameResponseObject->addWidget($listViewer);
     return $frameResponseObject;
 }
示例#2
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $html = "";
     if (isset($this->params[0]) && $this->params[0] != "") {
         $extension = \ExtensionMaster::getInstance()->getExtensionById($this->params[0]);
         $html = $extension->getInfoHtml();
     } else {
         $content = \Admin::getInstance()->loadTemplate("ExtensionIndex.template.html");
         $extensions = \ExtensionMaster::getInstance()->getAllExtensions();
         foreach ($extensions as $extension) {
             $content->setCurrentBlock("BLOCK_EXTERNSION");
             $content->setVariable("EXTERNSION_ID", $extension->getId());
             $content->setVariable("EXTERNSION_NAME", $extension->getName());
             $content->setVariable("EXTERNSION_ICON", "");
             $content->setVariable("EXTERNSION_VERSION", $extension->getVersion());
             $content->parse("BLOCK_EXTERNSION");
         }
         $html = $content->get();
     }
     $rawHtml = new \Widgets\RawHtml();
     $rawHtml->setHtml($html);
     $frameResponseObject->setTitle("Extension Information");
     $frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
 }
示例#3
0
    public function frameResponse(\FrameResponseObject $frameResponseObject)
    {
        if (!$this->portfolioId) {
            print "no object id given!";
            exit;
        }
        $portfolio = \PortfolioModel::getById($this->portfolioId);
        $loader = new \Widgets\Loader();
        $loader->setWrapperId("artefactsWrapper");
        $loader->setMessage("loading artefacts ...");
        $loader->setCommand("loadArtefacts");
        $loader->setParams(array($this->portfolioId));
        $loader->setElementId("artefactsWrapper");
        $loader->setType("updater");
        $html .= <<<END
<script type="text/javascript">
\$(':checkbox').change(function() {
   sendRequest("UpdateSelectedArtefacts", {"artefactId": "{$this->artefactId}", "portfolio": "{$this->portfolioId}", "checked": \$(this).prop("checked")}, "", "data");
});
</script>
END;
        $rawHtml = new \Widgets\RawHtml();
        $rawHtml->setHtml($html);
        $frameResponseObject->addWidget($rawHtml);
        $frameResponseObject->addWidget($loader);
        return $frameResponseObject;
    }
示例#4
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $currentUser = $GLOBALS["STEAM"]->get_current_steam_user();
     if (isset($this->id)) {
         $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
         if ($object instanceof \steam_exit) {
             $object = $object->get_exit();
             $this->id = $object->get_id();
         }
     } else {
         $object = $currentUser->get_trashbin();
         $this->id = $object->get_id();
     }
     if ($object && $object instanceof \steam_container) {
         $objects = $object->get_inventory();
     } else {
         $objects = array();
     }
     $this->getExtension()->addJS();
     $this->getExtension()->addCSS();
     $title = "Papierkorb";
     $actionBar = new \Widgets\ActionBar();
     $actionBar->setActions(array(array("name" => "Papierkorb leeren", "ajax" => array("onclick" => array("command" => "EmptyTrashbin", "params" => array("fromNameSpace" => "Trashbin"), "requestType" => "popup", "namespace" => "explorer")))));
     $loader = new \Widgets\Loader();
     $loader->setWrapperId("trashbinWrapper");
     $loader->setMessage("Lade Daten ...");
     $loader->setCommand("loadContent");
     $loader->setParams(array("id" => $this->id));
     $loader->setElementId("trashbinWrapper");
     $loader->setType("updater");
     $frameResponseObject->setTitle($title);
     $frameResponseObject->addWidget($actionBar);
     $frameResponseObject->addWidget($loader);
     return $frameResponseObject;
 }
示例#5
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $tpl = new \Worksheet\Template($this->id);
     $worksheet = new \Worksheet\Worksheet($this->id);
     $worksheet->validateRole("edit");
     $worksheet->validateStatus(2);
     $tplBlocks = array();
     /* get all blocks for this worksheet */
     $blocks = $worksheet->getBlocks();
     foreach ($blocks as $block) {
         $tplBlocks[] = array("id" => $block->getId(), "name" => $block->getName(), "content" => $block->getCorrectHtml(), "type" => $block->getType(), "order" => $block->getOrder());
     }
     if (count($blocks) == 0) {
         $tplBlocks = false;
     }
     $tpl->assign("blocks", $tplBlocks);
     $tpl->display("Correct.template.html");
     $sourceWorksheet = new \Worksheet\Worksheet($this->source);
     /* action bar */
     $actionBar = new \Widgets\ActionBar();
     $actionBar->setActions(array(array("name" => "Arbeitsblatt zurückgeben", "link" => "javascript: worksheet_finish('" . $this->source . "')"), array("name" => "Speichern", "link" => "javascript: worksheet_save()")));
     $frameResponseObject->addWidget($actionBar);
     /* template output */
     $tpl->parse($frameResponseObject);
     /* action bar */
     $actionBar = new \Widgets\ActionBar();
     $actionBar->setActions(array(array("name" => "Arbeitsblatt zurückgeben", "link" => "javascript: worksheet_finish('" . $this->source . "')"), array("name" => "Speichern", "link" => "javascript: worksheet_save()")));
     $frameResponseObject->addWidget($actionBar);
     /* page title */
     $frameResponseObject->setTitle($worksheet->getName());
     $frameResponseObject->setHeadline(array(array("name" => $sourceWorksheet->getName(), "link" => PATH_URL . "worksheet/View/" . $this->source), array("name" => "Arbeitsblätter korrigieren", "link" => PATH_URL . "worksheet/CopyList/" . $this->source), array("name" => $worksheet->getName())));
     return $frameResponseObject;
 }
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $activities = \CompetenceRaster::getActivityFields();
     $jobs = \CompetenceRaster::getJobs();
     $facets = \CompetenceRaster::getFacets();
     $listViewer = new \Widgets\ListViewer();
     \CompetenceRaster::initReadCompetences();
     $steamUser = $GLOBALS["STEAM"]->get_current_steam_user();
     //print("<pre>".print_r($activities,true)."</pre>");
     //print("<pre>".print_r(\CompetenceRaster::$competences,true)."</pre>");
     $html_text = "";
     $html_text .= "<h2>Bereiche</h2><br>";
     foreach ($activities as $activity) {
         $html_text .= $activity->name . ":<br>" . $activity->description . "<br><br>";
     }
     $html_text .= "<h2>Jobs</h2><br>";
     foreach ($jobs as $activity) {
         $html_text .= $activity->name . ":<br>" . $activity->description . "<br><br>";
     }
     $html_text .= "<h2>Aspekte</h2><br>";
     foreach ($facets as $activity) {
         $html_text .= $activity->name . ":<br>" . $activity->description . "<br><br>";
     }
     $html_text .= "<h2>Kompetenzen</h2><br>";
     foreach (\CompetenceRaster::getCompetences() as $activity) {
         //foreach (\CompetenceRaster::$competences as $activity){
         $html_text .= "Name: " . $activity->name . "<br>ID: " . $activity->job . "<br>facet: " . $activity->facet . "<br>activity: " . $activity->activity . "<br>index: " . $activity->index . "<br>" . "Beschreibung: " . $activity->description . "<br><br>";
     }
     $rawHtml = new \Widgets\RawHtml();
     $rawHtml->setHtml($html_text);
     $frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
 }
示例#7
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $jsWrapper = new \Widgets\JSWrapper();
     $jsWrapper->setJs('self.location.href="' . PATH_URL . "favorite/index/" . '"');
     $frameResponseObject->addWidget($jsWrapper);
     return $frameResponseObject;
 }
示例#8
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $tpl = new \Worksheet\Template($this->id);
     $worksheet = new \Worksheet\Worksheet($this->id);
     $worksheet->validateRole("build");
     $tplBlocks = array();
     /* get all blocks for this worksheet */
     $blocks = $worksheet->getBlocks();
     foreach ($blocks as $block) {
         $tplBlocks[] = array("id" => $block->getId(), "name" => $block->getName(), "content" => $block->getBuildViewHtml(), "type" => $block->getType(), "order" => $block->getOrder());
     }
     if (count($blocks) == 0) {
         $tplBlocks = false;
     }
     $tpl->assign("blocks", $tplBlocks);
     $tpl->display("Build.template.html");
     /* action bar */
     $actionBar = new \Widgets\ActionBar();
     $actionBar->setActions(array(array("name" => "Eine Aufgabe hinzufügen", "link" => PATH_URL . "worksheet/AddBlock/" . $this->id), array("name" => "Arbeitsblatt veröffentlichen", "link" => PATH_URL . "worksheet/Deploy/" . $this->id)));
     $frameResponseObject->addWidget($actionBar);
     /* template output */
     $tpl->parse($frameResponseObject);
     /* page title */
     $frameResponseObject->setTitle($worksheet->getName());
     $frameResponseObject->setHeadline(array(array("name" => $worksheet->getName(), "link" => PATH_URL . "worksheet/Build/" . $this->id)));
     return $frameResponseObject;
 }
示例#9
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $tpl = new \Worksheet\Template($this->id);
     $worksheet = new \Worksheet\Worksheet($this->id);
     $worksheet->validateRole("view");
     $tplBlocks = array();
     /* get all blocks for this worksheet */
     $blocks = $worksheet->getBlocks();
     foreach ($blocks as $block) {
         $tplBlocks[] = array("id" => $block->getId(), "name" => $block->getName(), "content" => $block->getViewHtml(), "type" => $block->getType(), "order" => $block->getOrder());
     }
     if (count($blocks) == 0) {
         $tplBlocks = false;
     }
     $tpl->assign("blocks", $tplBlocks);
     $tpl->display("View.template.html");
     /* action bar */
     $actionBar = new \Widgets\ActionBar();
     $actionBar->setActions(array(array("name" => "Arbeitsblätter korrigieren", "link" => PATH_URL . "worksheet/CopyList/" . $this->id), array("name" => "Arbeitsblatt ausfüllen", "link" => PATH_URL . "worksheet/StartEdit/" . $this->id)));
     $frameResponseObject->addWidget($actionBar);
     /* template output */
     $tpl->parse($frameResponseObject);
     /* page title */
     $frameResponseObject->setTitle($worksheet->getName());
     $frameResponseObject->setHeadline(array(array("name" => $worksheet->getName(), "link" => PATH_URL . "worksheet/View/" . $this->id)));
     return $frameResponseObject;
 }
示例#10
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $rawWidget = $this->displayWorkplans();
     $frameResponseObject->setTitle("Projektplanverwaltung");
     $frameResponseObject->setHeadline("Projektplanverwaltung");
     $frameResponseObject->addWidget($rawWidget);
     return $frameResponseObject;
 }
示例#11
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $rawHtml = new \Widgets\RawHtml();
     $rawHtml->setHtml("<center>Noch nicht fertig.</center>");
     $frameResponseObject->setTitle("Impressum");
     $frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
 }
示例#12
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $portfolios = \PortfolioModel::getMyPortfolios();
     $listViewer = new \Widgets\ListViewer();
     $listViewer->setHeadlineProvider(new HeadlineProviderMyPortfolios());
     $listViewer->setContentProvider(new ContentProviderMyPortfolios());
     $listViewer->setContent($portfolios);
     $frameResponseObject->addWidget($listViewer);
     return $frameResponseObject;
 }
示例#13
0
    public function frameResponse(\FrameResponseObject $frameResponseObject)
    {
        $filePersistence = PATH_URL . "debug/filePersistence/";
        $rawHtml = new \Widgets\RawHtml();
        $rawHtml->setHtml(<<<END
<h1>Platform Tests</h1>
<a href="{$filePersistence}">Testing File-Persistence.</a>
END
);
        $frameResponseObject->addWidget($rawHtml);
        return $frameResponseObject;
    }
示例#14
0
 public function getHtmlForFullScreen(\FrameResponseObject $frameResponseObject)
 {
     $objectId = $this->id;
     $content = '<img src=' . PATH_URL . 'download/image/' . $objectId . '/946/710"
       border="0"
       title="Vollbild"
      >';
     $widget = new \Widgets\RawHtml();
     $widget->setHtml($content);
     $frameResponseObject->addWidget($widget);
     return $frameResponseObject;
 }
示例#15
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     if (!\PortfolioExtensionModel::init()) {
         $html .= "Portfolio Räume bereits initialisiert<br>";
     } else {
         $html .= "E-Portfolio erfolgreich initialisiert";
     }
     $rawHtml = new \Widgets\RawHtml();
     $rawHtml->setHtml($html);
     $frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
 }
示例#16
0
    public function frameResponse(\FrameResponseObject $frameResponseObject)
    {
        $html = <<<end
<style type="text/css">



</style>

<div class="actionBar">
    
\t<a href="../Fileupload/"class="button">Manual Upload</a>
\t
\t
</div>

<div>
<h1> Qualification Details</h1>
</div>

<div>
<ul class="tabBar">
<li class="tabOut">
<a href="">EDUCATIONAL CERTIFICATES</a>
</li>
<li class="tabIn">
<a href="">ADDITIONAL CERTIFICATES</a>
</li>
<li class="tabIn">
<a href="../WizardLinks/">WEB LINKS</a>
</li>
<li class="tabIn">
<a href="../WizardBlogs/">BLOGS</a>
</li>
<li class="tabIn">
<a href="../Editprofile/">PROFILE</a>
</li>

<br>
<br>

<h3><font color="red"> here user can see diffrent set of folders named school, bachelors, Masters,Phd,etc. by clicking on which user will be guided to upload the desired artifacts</font></h3>
\t


end;
        $frameResponseObject->setTitle("Wizard Certificates");
        $rawHtml = new \Widgets\RawHtml();
        $rawHtml->setHtml($html);
        $frameResponseObject->addWidget($rawHtml);
        return $frameResponseObject;
    }
示例#17
0
    public function frameResponse(\FrameResponseObject $frameResponseObject)
    {
        $html = <<<end
<style type="text/css">



</style>
<div class="actionBar">
    
\t<a href="../Fileupload/"class="button">Manual Upload</a>
\t
\t
</div>

<div>
<h1> Add Weblink</h1>
</div>

<div>
<ul class="tabBar">
<li class="tabIn">
<li class="tabIn">
<a href="../WizardCertificates/">EDUCATIONAL CERTIFICATES</a>
</li>
<li class="tabIn">
<a href="">ADDITIONAL CERTIFICATES</a>
</li>
<li class="tabOut">
<a href="">WEB LINKS</a>
</li>
<li class="tabIn">
<a href="../WizardBlogs/">BLOGS</a>
</li>
<li class="tabIn">
<a href="../Editprofile/">PROFILE</a>
</li>
<br>
<br>

<h3><font color="red"> In this page user get LINKS to youtube or other needfull site via which user can select the deired weblinks which should be seen on his/her E-portfolio
</font></h3>

\t

end;
        $frameResponseObject->setTitle("Wizard Links");
        $rawHtml = new \Widgets\RawHtml();
        $rawHtml->setHtml($html);
        $frameResponseObject->addWidget($rawHtml);
        return $frameResponseObject;
    }
示例#18
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     header("HTTP/1.0 404 Not Found");
     $content = \NotFound::getInstance()->loadTemplate("404-inline.template.html");
     $content->setVariable("TITLE", "Endstation Hbf");
     $content->setVariable("MESSAGE", "Sie haben das Ende erreicht. Hier war noch niemand zuvor. Nicht mal wir Entwickler.<br/><br/><a href=\"javascript:history.back();\">Der einzige Weg führt zurück.</a>");
     $rawHtml = new \Widgets\RawHtml();
     $rawHtml->setHtml($content->get());
     $rawHtml->setCss(\NotFound::getInstance()->readCss());
     $frameResponseObject->setTitle("Seite nicht gefunden (Fehler 404).");
     $frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
 }
示例#19
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     header("HTTP/1.0 403 Not Found");
     $content = \NotAccess::getInstance()->loadTemplate("403-inline.template.html");
     $content->setVariable("TITLE", "Kein Zugriff");
     $content->setVariable("MESSAGE", "Sie haben keine Zugriff auf dieses Dokument.<br/><br/><a href=\"javascript:history.back();\">Der einzige Weg führt zurück.</a>");
     $rawHtml = new \Widgets\RawHtml();
     $rawHtml->setHtml($content->get());
     $rawHtml->setCss(\NotAccess::getInstance()->readCss());
     $frameResponseObject->setTitle("Sie haben keinen Zugriff (Fehler 403).");
     $frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
 }
示例#20
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $actionBar = new \Widgets\ActionBar();
     $this->getExtension()->addJS();
     $actionBar->setActions(array(array("name" => \Portfolio::getInstance()->getText("newArtefacts"), "ajax" => array("onclick" => array("command" => "newArtefactForm", "namespace" => "portfolio", "params" => "", "requestType" => "popup")))));
     //		array("name" => "Bild anfügen<img src=\"{$editIcon}\">", "command" => "EditMessageImage", "namespace" => "forum", "params" => "{'messageObjectId':'{$this->id}','forum':'{$forumId}'}", "type" => "popup");
     $breadcrumb = new \Widgets\Breadcrumb();
     $breadcrumb->setData(array(array("name" => \Portfolio::getInstance()->getText("Manage Artefacts"))));
     $tabBar = new \Widgets\TabBar();
     $tabBar->setTabs(array(array("name" => \Portfolio::getInstance()->getText("Dashboard"), "link" => $this->getextension()->getExtensionUrl() . "/"), array("name" => \Portfolio::getInstance()->getText("Competences"), "link" => $this->getExtension()->getExtensionUrl() . "ViewChart/"), array("name" => \Portfolio::getInstance()->getText("Artefacts"), "link" => $this->getExtension()->getExtensionUrl() . "ManageArtefacts/")));
     $tabBar->setActiveTab(2);
     $clearer = new \Widgets\Clearer();
     $loader = new \Widgets\Loader();
     $loader->setWrapperId("artefactsWrapper");
     $loader->setMessage("loading artefacts ...");
     $loader->setCommand("loadArtefacts");
     $loader->setParams($this->params);
     $loader->setElementId("artefactsWrapper");
     $loader->setType("updater");
     $frameResponseObject->setTitle("Manage Artefacts");
     $frameResponseObject->addWidget($actionBar);
     $frameResponseObject->addWidget($breadcrumb);
     $frameResponseObject->addWidget($tabBar);
     $frameResponseObject->addWidget($clearer);
     $frameResponseObject->addWidget($loader);
     //$frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
 }
示例#21
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $user = $GLOBALS["STEAM"]->get_current_steam_user();
     $testObject = \steam_factory::create_room($GLOBALS["STEAM"]->get_id(), "Test Workflow2", $user->get_workroom());
     $testObject->set_attribute("OBJ_TYPE", "WORKPLAN_CONTAINER");
     $workplanExtension = \Workplan::getInstance();
     $workplanExtension->addJS();
     $content = $workplanExtension->loadTemplate("workplan_create.template.html");
     $rawWidget = new \Widgets\RawHtml();
     $rawWidget->setHtml("Test container wurde erstellt!");
     $frameResponseObject->setTitle("Projektplan erstellen");
     $frameResponseObject->addWidget($rawWidget);
     return $frameResponseObject;
 }
示例#22
0
    public function frameResponse(\FrameResponseObject $frameResponseObject)
    {
        $html = <<<end
<style type="text/css">



</style>

<div class="actionBar">
    
\t<a href="../Fileupload/"class="button">Manual Upload</a>
\t
\t
</div>

<div>
<h1> Add Blogs</h1>
</div>

<div>
<ul class="tabBar">
<li class="tabIn">
<a href="../WizardCertificates/">EDUCATIONAL CERTIFICATES</a>
</li>
<li class="tabIn">
<a href="">ADDITIONAL CERTIFICATES</a>
</li>
<li class="tabIn">
<a href="../WizardLinks/">WEB LINKS</a>
</li>
<li class="tabOut">
<a href="">BLOGS</a>
</li>
<li class="tabIn">
<a href="../Editprofile/">PROFILE</a>
</li>

\t<br>
\t<br>
\t
<h3><font color="red"> shows all previously written blogs and out of those user gets an option to select the desired ones</font></h3>\t

end;
        $frameResponseObject->setTitle(" WizardBlogs ");
        $rawHtml = new \Widgets\RawHtml();
        $rawHtml->setHtml($html);
        $frameResponseObject->addWidget($rawHtml);
        return $frameResponseObject;
    }
示例#23
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $actionBar = new \Widgets\ActionBar();
     $actionBar->setActions(array(array("name" => \Portfolio::getInstance()->getText("new"), "ajax" => array("onclick" => array("command" => "newArtefact", "params" => array(), "requestType" => "popup")))));
     $breadcrumb = new \Widgets\Breadcrumb();
     $breadcrumb->setData(array(array("name" => \Portfolio::getInstance()->getText("Manage Portfolios"))));
     $tabBar = new \Widgets\TabBar();
     $tabBar->setTabs(array(array("name" => \Portfolio::getInstance()->getText("Dashboard"), "link" => $this->getextension()->getExtensionUrl() . "/"), array("name" => \Portfolio::getInstance()->getText("Portfolio"), "link" => $this->getExtension()->getExtensionUrl() . "MyPortfolio/"), array("name" => \Portfolio::getInstance()->getText("Shared Portfolios"), "link" => $this->getExtension()->getExtensionUrl() . "SharedProfiles/")));
     $tabBar->setActiveTab(1);
     $clearer = new \Widgets\Clearer();
     $loader = new \Widgets\Loader();
     $loader->setWrapperId("portfoliosWrapper");
     $loader->setMessage("loading portfolios ...");
     $loader->setCommand("loadPortfolios");
     $loader->setParams(array());
     $loader->setElementId("portfoliosWrapper");
     $loader->setType("updater");
     $frameResponseObject->setTitle("Manage Portfolios");
     $frameResponseObject->addWidget($actionBar);
     $frameResponseObject->addWidget($breadcrumb);
     $frameResponseObject->addWidget($tabBar);
     $frameResponseObject->addWidget($clearer);
     $frameResponseObject->addWidget($loader);
     //$frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
 }
示例#24
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $portfolio = \PortfolioModel::getById($this->portfolioId);
     $actionBar = new \Widgets\ActionBar();
     $actionBar->setActions(array(array("link" => "javascript:history.back()", "name" => "zurück"), array("name" => \Portfolio::getInstance()->getText("new"), "ajax" => array("onclick" => array("command" => "newArtefact", "params" => array(), "requestType" => "popup")))));
     $breadcrumb = new \Widgets\Breadcrumb();
     $breadcrumb->setData(array(array("name" => \Portfolio::getInstance()->getText("Belege des Portfolios »" . $portfolio->getName() . "«"))));
     $tabBar = new \Widgets\TabBar();
     $tabBar->setTabs(array(array("name" => \Portfolio::getInstance()->getText("Dashboard"), "link" => $this->getextension()->getExtensionUrl() . "/"), array("name" => \Portfolio::getInstance()->getText("Portfolio"), "link" => $this->getExtension()->getExtensionUrl() . "MyPortfolio/"), array("name" => \Portfolio::getInstance()->getText("Shared Portfolios"), "link" => $this->getExtension()->getExtensionUrl() . "SharedProfiles/")));
     $tabBar->setActiveTab(1);
     $clearer = new \Widgets\Clearer();
     $loader = new \Widgets\Loader();
     $loader->setWrapperId("artefactsWrapper");
     $loader->setMessage("loading artefacts ...");
     $loader->setCommand("loadArtefacts");
     $loader->setParams(array(0 => $this->portfolioId));
     $loader->setElementId("artefactsWrapper");
     $loader->setType("updater");
     $frameResponseObject->setTitle("Belege verwalten");
     $frameResponseObject->addWidget($actionBar);
     $frameResponseObject->addWidget($breadcrumb);
     $frameResponseObject->addWidget($tabBar);
     $frameResponseObject->addWidget($clearer);
     $frameResponseObject->addWidget($loader);
     //$frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
 }
示例#25
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $path = $this->params;
     $portal = \lms_portal::get_instance();
     $user = \lms_steam::get_current_user();
     if (!\lms_steam::is_steam_admin($user)) {
         //TODO: REDIRECT!!
     }
     if ($_SERVER["REQUEST_METHOD"] == "POST") {
         $values = $_POST["values"];
         $start_date = iso_to_unix($values["start"]);
         $end_date = iso_to_unix($values["end"]);
         // TODO PROBLEM CHECKING MISSING
         $courses = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), STEAM_COURSES_GROUP, CLASS_GROUP);
         $all_user = \steam_factory::groupname_to_object($GLOBALS["STEAM"]->get_id(), STEAM_ALL_USER);
         $new_semester = \steam_factory::create_group($GLOBALS["STEAM"]->get_id(), $values["name"], $courses, FALSE, $values["desc"]);
         $new_semester_admins = \steam_factory::create_group($GLOBALS["STEAM"]->get_id(), "admins", $new_semester, FALSE, "admin group for " . $values["desc"]);
         $new_semester_admins->set_attribute("OBJ_TYPE", "semester_admins");
         $new_semester_admins->add_member($user);
         $new_semester->set_insert_access($new_semester_admins, TRUE);
         $new_semester->set_read_access($all_user, TRUE);
         $new_semester->set_attributes(array("SEMESTER_START_DATE" => $start_date, "SEMESTER_END_DATE" => $end_date));
         // CACHE ZURÜCKSETZEN
         $cache = get_cache_function("ORGANIZATION");
         $cache->drop("lms_steam::get_semesters");
         header("Location: " . PATH_URL . "semester/index/" . $values["name"] . "/all");
     }
     $content = \Semester::getInstance()->loadTemplate("semester_create.template.html");
     $content->setVariable("INFO_TEXT", gettext("So, you want to start a new semester?") . " " . gettext("Please fill out the requested values on the right.") . "<br/><br/>" . str_replace("%SEMESTER", STEAM_CURRENT_SEMESTER, gettext("And don't forget to reset the current semester in the etc/koala.def.php, which is <b>%SEMESTER</b> at the moment.")));
     $content->setVariable("LABEL_NAME", gettext("Shortname"));
     $content->setVariable("INFO_NAME", gettext("IMPORTANT: Don't use any slashes, commas or dots in this name. Keep it short, like 'WS0607' or 'SS06'."));
     $content->setVariable("LABEL_DESC", gettext("Name"));
     $content->setVariable("INFO_DESC", gettext("Examples: 'Wintersemester 06/07', or 'Sommersemester 2006'"));
     $content->setVariable("LABEL_START_DATE", gettext("Starting date of semester"));
     $content->setVariable("LABEL_END_DATE", gettext("Ending date of semester"));
     $content->setVariable("INFO_DATE_FORMAT", gettext("Please type in the date in the following format: YYYY-MM-DD"));
     $content->setVariable("LABEL_CREATE", gettext("Create Semester"));
     /* TODO: Portal anpassen
     		$portal->set_page_main(
     			array(array("link" => PATH_URL.SEMESTER_URL."/", "name" => gettext("Semester")), array("link" => "", "name" => gettext("Create new"))),
     			$content->get(),
     			""
     		);
     		*/
     $rawHtml = new \Widgets\RawHtml();
     $rawHtml->setHtml($content->get());
     $frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
 }
示例#26
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $portfolios = \PortfolioModel::getMyPortfolios();
     $artefacts = \ArtefactModel::getAllArtefacts();
     foreach ($portfolios as $portfolio) {
         $portfolio->delete();
     }
     foreach ($artefacts as $artefact) {
         $artefact->delete();
     }
     $rawHtml = new \Widgets\RawHtml();
     $rawHtml->setHtml("E-Portfolio erfolgreich zurückgesetzt");
     $frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
 }
示例#27
0
    public function frameResponse(\FrameResponseObject $frameResponseObject)
    {
        $rapidfeedback = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
        $RapidfeedbackExtension = \Rapidfeedback::getInstance();
        $survey = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->params[1]);
        $survey_object = new \Rapidfeedback\Model\Survey($rapidfeedback);
        $xml = \steam_factory::get_object_by_name($GLOBALS["STEAM"]->get_id(), $survey->get_path() . "/survey.xml");
        $user = $GLOBALS["STEAM"]->get_current_steam_user();
        $RapidfeedbackExtension->addCSS();
        $RapidfeedbackExtension->addJS();
        $content = $RapidfeedbackExtension->loadTemplate("rapidfeedback_results.template.html");
        $content->setCurrentBlock("BLOCK_RESULTS");
        $content->setVariable("RESULTS_LABEL", "Auswertung");
        if ($survey->get_attribute("RAPIDFEEDBACK_RESULTS") != 1) {
            $content->setVariable("RESULTS_AMOUNT", $survey->get_attribute("RAPIDFEEDBACK_RESULTS") . " Abgaben");
        } else {
            $content->setVariable("RESULTS_AMOUNT", $survey->get_attribute("RAPIDFEEDBACK_RESULTS") . " Abgabe");
        }
        $survey_object->parseXML($xml);
        $survey_object->generateResults($survey);
        $questions = $survey_object->getQuestions();
        $question_html = '
		<script type="text/javascript" src="https://www.google.com/jsapi"></script>
    	<script type="text/javascript">
      		google.load("visualization", "1", {packages:["corechart"]});
		</script>';
        for ($count = 0; $count < count($questions); $count++) {
            $question_html = $question_html . $questions[$count]->getResultHTML($count + 1);
        }
        $content->setVariable("QUESTIONS_HTML", $question_html);
        $content->setVariable("BACK_LABEL", "Zurück");
        $content->setVariable("BACK_URL", $RapidfeedbackExtension->getExtensionUrl() . "Index/" . $this->id);
        $content->parse("BLOCK_RESULTS");
        $group = $rapidfeedback->get_attribute("RAPIDFEEDBACK_GROUP");
        if ($group->get_name() == "learners") {
            $parent = $group->get_parent_group();
            $courseOrGroup = "Kurs: " . $parent->get_attribute("OBJ_DESC") . " (" . $parent->get_name() . ")";
            $courseOrGroupUrl = PATH_URL . "semester/" . $parent->get_id();
        } else {
            $courseOrGroup = "Gruppe: " . $group->get_name();
            $courseOrGroupUrl = PATH_URL . "groups/" . $group->get_id();
        }
        $rawWidget = new \Widgets\RawHtml();
        $rawWidget->setHtml($content->get());
        $frameResponseObject->addWidget($rawWidget);
        $frameResponseObject->setHeadline(array(array("name" => $courseOrGroup, "link" => $courseOrGroupUrl), array("name" => "Rapid Feedback", "link" => $RapidfeedbackExtension->getExtensionUrl() . "Index/" . $rapidfeedback->get_id()), array("name" => "Auswertung")));
        return $frameResponseObject;
    }
示例#28
0
 public function getHtmlForObjectId(\FrameResponseObject $frameResponseObject)
 {
     $mplme = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
     if (isset($this->params[1]) && !strstr($this->params[1], "?")) {
         $doc = \steam_factory::get_object_by_name($GLOBALS["STEAM"]->get_id(), $mplme->get_path() . "/" . $this->params[1]);
         if (isset($doc) && $doc !== 0 && $doc instanceof \steam_document) {
             echo $doc->download();
             //echo $doc->get_content();
         } else {
             echo "404";
         }
         die;
     }
     $elements = $mplme->get_inventory();
     $html = "";
     foreach ($elements as $element) {
         if ($element->get_name() == "data.xml") {
             $xmlContent = $element->get_content();
             //$html .= "<b>".$element->get_name()."</b><br><pre>". htmlentities($element->get_content()) . "</pre><br>";
         } else {
             if ($element->get_name() == $_REQUEST["xslName"] . ".xsl") {
                 $xslContent = $element->get_content();
                 //$html .= "<b>".$element->get_name()."</b><br><pre>". htmlentities($element->get_content()) . "</pre><br>";
             } else {
                 //$html .= "<b>".$element->get_name()."</b><br>";
             }
         }
     }
     if (isset($xmlContent) && isset($xslContent)) {
         $xml = new \DOMDocument();
         $xml->loadXML($xmlContent);
         $searchstring = '/<includexslt[ 0-9a-zA-Z=\\/\\"]*url="([~\\-0-9a-zA-Z=\\:\\?\\&\\.\\/]+)"[ 0-9a-zA-Z=\\/"]*[ \\-0-9a-zA-Z=\\/"]*\\/>/i';
         $xslContent = preg_replace_callback($searchstring, array(&$this, 'cb_replace'), $xslContent);
         $xsl = new \DOMDocument();
         $xsl->loadXML($xslContent);
         $proc = new \XSLTProcessor();
         $proc->importStylesheet($xsl);
         $html .= $proc->transformToXml($xml);
     }
     if (isset($_REQUEST['output']) && $_REQUEST['output'] === "download") {
         header('Content-Disposition: attachment; filename=data.' . $_REQUEST['xslName']);
     }
     $rawHtml = new \Widgets\RawHtml();
     $rawHtml->setHtml($html);
     $frameResponseObject->addWidget($rawHtml);
     $frameResponseObject->setHeadline(array(array("name" => "zurück", "link" => "javascript:history.back()"), array("name" => "Mplme")));
     return $frameResponseObject;
 }
示例#29
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     if (!defined("FILE_PERSISTENCE") || !FILE_PERSISTENCE) {
         $html = "FILE_PERSISTENCE must be <b>true</b>";
     } else {
         $html = "FILE_PERSISTENCE is enabled.<br>";
         $html .= "FILE_PERSISTENCE_PATH is " . FILE_PERSISTENCE_PATH . ".<br><br>Create a new document in your home \"filePersistenceTest.txt\".";
         $doc = \steam_factory::create_document($GLOBALS["STEAM"]->get_id(), "filePersistenceTest.txt", "I am a file on file system.", "text/plain");
         $home = $GLOBALS["STEAM"]->get_current_steam_user()->get_workroom();
         $doc->move($home);
     }
     $rawHtml = new \Widgets\RawHtml();
     $rawHtml->setHtml($html);
     $frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
 }
示例#30
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     \CompetenceRaster::initReadCompetences();
     $comptetences = \CompetenceRaster::$competences;
     $comptetences = \CompetenceRaster::getCompetences($this->jobs, $this->facet, $this->activity);
     $jobs = \CompetenceRaster::getJobs();
     //$activity = \CompetenceRaster::getActivityFields();
     $facets = \CompetenceRaster::getFacets();
     $html = "";
     foreach ($jobs as $job) {
         if (!($this->jobs == "" || $this->jobs == $job->name)) {
             continue;
         }
         $html .= "<h2>" . $job->name . "</h2>";
         $html .= '<table  class="grid">';
         //foreach ($activity as $activity) {
         //if (!($this->activity == "" || $this->activity == $activity->name))
         //continue;
         foreach ($facets as $facet) {
             if (!($this->facet == "" || $this->facet == $facet->name)) {
                 continue;
             }
             $html .= "<tr><td colspan=7><h4>" . $facet->name . "</h4></td><tr>";
             $comptetences = \CompetenceRaster::getCompetences($job->name, $facet->short);
             //$comptetences = \CompetenceRaster::getCompetences();
             foreach ($comptetences as $competence) {
                 //$html .= '<table  class="grid">';
                 $html .= "<tr><td>" . $competence->job . "</td>";
                 $html .= "<td>" . $competence->facet . "</td>";
                 $html .= "<td>" . $competence->activity . "</td>";
                 $html .= "<td >" . $competence->index . "</td>";
                 $html .= "<td>" . $competence->name . "</td>";
                 //$html .= "<td>" . $competence->description . "</td>" ;
                 //$html .= "<td>" . $competence->niveau . "</td>" ;
                 $html .= "<td>" . "<input type=checkbox>" . "</td>";
                 $html .= "<td>" . "......" . "</td></tr>";
             }
         }
         $html .= "</table>";
     }
     $frameResponseObject->setTitle("Competence View");
     $rawHtml = new \Widgets\RawHtml();
     $rawHtml->setHtml($html);
     //$frameResponseObject->addWidget($actionBar);
     $frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
 }