Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
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;
 }
Exemplo n.º 3
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $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(1);
     $breadcrumb = new \Widgets\Breadcrumb();
     $breadcrumb->setData(array(array("name" => \Portfolio::getInstance()->getText("Chart"), "link" => $this->getExtension()->getExtensionUrl() . "ViewChart/"), array("name" => \Portfolio::getInstance()->getText("View Competance"))));
     \CompetenceRaster::initReadCompetences();
     $comptetences = \CompetenceRaster::$competences;
     $collected = \CompetenceRaster::getCollectedCompetences();
     $jobs = \CompetenceRaster::getJobs();
     $activities = \CompetenceRaster::getActivityFields();
     $facets = \CompetenceRaster::getFacets();
     $html = "<br>";
     if ($this->showCollected) {
         $html .= "<h1>Gesammelte Kompetenzen</h1>";
     } else {
         $html .= "<h1>Offene Kompetenzen</h1>";
     }
     foreach ($jobs as $job) {
         if (!($this->job == "" || $this->job == $job->name)) {
             continue;
         }
         $html .= "<h2>" . $job->description . "</h2>";
         $html .= '<table  class="grid">';
         foreach ($activities as $activity) {
             if (!($this->activity == "" || $this->activity == $activity->short)) {
                 continue;
             }
             $html .= "<tr><td colspan=7><h4>" . $activity->name . "</h4></td><tr>";
             foreach ($facets as $facet) {
                 if (!($this->facet == "" || $this->facet == $facet->short)) {
                     continue;
                 }
                 $comptetences = \CompetenceRaster::getCompetences($job->name, $activity->short, $facet->short);
                 foreach ($comptetences as $competence) {
                     $url = "#";
                     $text = "";
                     if (!$this->showCollected && isset($collected[$job->name . $activity->short . $facet->short . $competence->getIndex()])) {
                         continue;
                     } elseif ($this->showCollected && !isset($collected[$job->name . $activity->short . $facet->short . $competence->getIndex()])) {
                         //$artefact = Artefacts::getById($collected[$job->name . $activity->short . $facet->short . $competence->getIndex() . "ID"]);
                         continue;
                     }
                     if ($this->showCollected && isset($collected[$job->name . $activity->short . $facet->short . $competence->getIndex()])) {
                         $artefactId = $collected[$job->name . $activity->short . $facet->short . $competence->getIndex() . "ID"];
                         $text = "Artefakt";
                         $url = \ExtensionMaster::getInstance()->getUrlForObjectId($artefactId, "view");
                     }
                     $checked = isset($collected[$job->name . $activity->short . $facet->short . $competence->getIndex()]) ? "checked=true" : "";
                     $html .= "<tr><td>" . $competence->job . "</td>";
                     $html .= "<td>" . $competence->activity . "</td>";
                     $html .= "<td>" . $competence->facet . "</td>";
                     $html .= "<td >" . $competence->index . "</td>";
                     $html .= "<td>" . $competence->name . "</td>";
                     $html .= "<td>" . "<input type=checkbox disabled=true " . $checked . "</td>";
                     $html .= "<td><a href=\"" . $url . "\">" . $text . "</a></td></tr>";
                 }
             }
         }
         $html .= "</table>";
     }
     $frameResponseObject->setTitle("Competence View");
     $rawHtml = new \Widgets\RawHtml();
     $rawHtml->setHtml($html);
     $frameResponseObject->addWidget($breadcrumb);
     $frameResponseObject->addWidget($tabBar);
     $frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
 }