function http_auth()
{
    // Abfragen ob man bereits über das koaLA Interface eingeloggt ist
    // Wenn ja, kein HTTP_AUTH notwendig
    if (isset($_SESSION["LMS_USER"]) && $_SESSION["LMS_USER"] instanceof lms_user && $_SESSION["LMS_USER"]->is_logged_in()) {
        $lms_user = $_SESSION["LMS_USER"];
        lms_steam::connect(STEAM_SERVER, STEAM_PORT, $lms_user->get_login(), $lms_user->get_password());
        return true;
    } else {
        // Wenn nicht, untenstehende checks durchführen
        if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW']) || $_SERVER['PHP_AUTH_USER'] === "" || $_SERVER['PHP_AUTH_PW'] === "") {
            // User abort
            header('WWW-Authenticate: Basic realm="koaLA"');
            header('HTTP/1.0 401 Unauthorized');
            return false;
        } else {
            // Correct Login
            $lms_user_new = new lms_user($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']);
            if (!$lms_user_new->login()) {
                header('WWW-Authenticate: Basic realm="koaLA"');
                header('HTTP/1.0 401 Unauthorized');
                return false;
            }
            $_SESSION["LMS_USER"] = $lms_user_new;
            return true;
        }
    }
}
Exemple #2
0
 public function getHtml()
 {
     $portal = \lms_portal::get_instance();
     $annotations = $this->data->get_annotations();
     $annotations = array_reverse($annotations);
     $lastAnnotation = 0;
     foreach ($annotations as $annotation) {
         $this->getContent()->setCurrentBlock("BLOCK_CHAT");
         if ($lastAnnotation === 0) {
             $lastAnnotation = $annotation->get_attribute("OBJ_CREATION_TIME");
             $this->getContent()->setCurrentBlock("BLOCK_STATUS");
             $this->getContent()->setVariable("STATUS_MESSAGE", "Diskussion mit " . $portal->get_user()->get_forename() . " " . $portal->get_user()->get_surname() . ".<br>" . getReadableDate($lastAnnotation));
             $this->getContent()->parse("BLOCK_STATUS");
         } else {
             $tmp = $lastAnnotation;
             $lastAnnotation = $annotation->get_attribute("OBJ_CREATION_TIME");
             if ($lastAnnotation - $tmp > 600) {
                 $this->getContent()->setCurrentBlock("BLOCK_STATUS");
                 $this->getContent()->setVariable("STATUS_MESSAGE", getReadableDate($lastAnnotation));
                 $this->getContent()->parse("BLOCK_STATUS");
             }
         }
         $this->getContent()->setCurrentBlock("BLOCK_OUTGOING");
         $this->getContent()->setVariable("OUTGOING_MESSAGE", $annotation->get_content());
         $this->getContent()->setVariable("OUTGOING_IMG", \lms_user::get_user_image_url(32, 32));
         $this->getContent()->setVariable("OUTGOING_TITLE", $portal->get_user()->get_forename() . " " . $portal->get_user()->get_surname());
         $this->getContent()->parse("BLOCK_OUTGOING");
         $this->getContent()->parse("BLOCK_CHAT");
     }
     return $this->getContent()->get();
 }
Exemple #3
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $portal = \lms_portal::get_instance();
     $user = \lms_steam::get_current_user();
     $frameResponseObject->setTitle(gettext("Your Desktop"));
     // Cache for 7 Minutes
     $cache = get_cache_function($user->get_name(), 420);
     $feeds = $cache->call("koala_user::get_news_feeds_static", 0, 10, FALSE, $user);
     $home = \Home::getInstance();
     //$home->addJS();
     $content = $home->loadTemplate("home.template.html");
     $infobar = new \Widgets\InfoBar();
     $infobar->setHeadline(gettext("Hallo") . " " . $portal->get_user()->get_forename() . " " . $portal->get_user()->get_surname() . "!");
     $content->setVariable("INFOBAR", $infobar->getHtml());
     $captionImage = new \Widgets\CaptionImage();
     $captionImage->setLink(PATH_URL . "user/index/" . $user->get_name() . "/");
     $captionImage->setLinkText(gettext("To your profile"));
     $captionImage->setImageSrc(\lms_user::get_user_image_url(140, 185));
     $captionImage->setImageAlt(gettext("Profile Image"));
     $captionImage->setImageTitle(gettext("Complete your Profile"));
     $content->setVariable("PROFILEIMAGE", $captionImage->getHtml());
     $rawHtml = new \Widgets\RawHtml();
     $rawHtml->addWidget($infobar);
     $rawHtml->addWidget($captionImage);
     $homeExtensions = \ExtensionMaster::getInstance()->getExtensionByType("IHomeExtension");
     foreach ($homeExtensions as $homeExtension) {
         $content->setCurrentBlock("HOME_EXTENSION");
         $widget = $homeExtension->getWidget();
         $rawHtml->addWidget($widget);
         $content->setVariable("HOME_EXTENSION_CONTENT", $widget->getHtml());
         $content->parse("HOME_EXTENSION");
     }
     $rawHtml->setHtml($content->get());
     $frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
 }
Exemple #4
0
<?php

require_once "../../etc/koala.conf.php";
echo "**************** reset sync script ****************" . $newline;
try {
    echo "check root access to server";
    $steam_user = new lms_user(STEAM_ROOT_LOGIN, STEAM_ROOT_PW);
    //TODO: use phpsteam here. this fails if wrong login data for root
    $steam_user->login();
    echo "\t\t\t\t\t\t\t\t\t[OK]" . $newline;
    echo "reset lock flag";
    $paulsync_folder = steam_factory::path_to_object($GLOBALS["STEAM"]->get_id(), "/home/root/documents/paulsync");
    if (is_object($paulsync_folder)) {
        $paulsync_folder->set_attribute("PAUL_SYNC_RUNNING", "FALSE");
        echo "\t\t\t\t\t\t\t\t\t\t\t[OK]" . $newline;
    } else {
        echo "\t\t\t\t\t\t[FAIL]" . $newline;
        echo "--> ERROR: is server should not be synced with paul" . $newline;
    }
} catch (Exception $e) {
    echo "\t\t\t\t\t\t[FAIL]" . $newline;
    echo "--> ERROR: failed to connect to steam:" . $ex->getMessage() . $newline;
}
exit;
Exemple #5
0
    public function frameResponse(\FrameResponseObject $frameResponseObject)
    {
        $portfolioExtension = \Portfolio::getInstance();
        $content = $portfolioExtension->loadTemplate("portfolio.template.html");
        $portfolio = \Portfolio\Model\Portfolio::getInstanceForUser($this->user);
        $rawHtml = new \Widgets\RawHtml();
        $breadcrumb = new \Widgets\Breadcrumb();
        $breadcrumb->setData(array(array("name" => "Kompetenzportfolio")));
        $infobar = new \Widgets\InfoBar();
        $infobar->setHeadline("");
        $infobar->addParagraph(<<<END
Mithilfe dieses Kompetenzportfolio-Systems können  zentrale chemieberufliche
Kompetenzen zur Bilanzierung gesichtet, bestimmt, geordnet und dokumentiert werden.<br><br>
Das Kompetenzportfolio ist durch seine Bilanzierungs- und Dokumentationsfunktionen 
dafür geeignet, Ausbilder, Dozenten, Auszubildende, Schüler, Personalreferenten oder 
Angestellte von Berufen der chemischen Industrie bei Fragestellungen der Aus- und 
Weiterbildungseignung/-vorbereitung , der Anrechnung von Aus- und Weiterbildungszielen,
der Personalauswahl, der Personalentwicklung, der Berufswahl sowie bei der Bewerbung zu unterstützen.\t\t\t\t
END
);
        $content->setVariable("INFOBAR", $infobar->getHtml());
        // Profilbild
        $captionImage = new \Widgets\CaptionImage();
        $captionImage->setLink(PATH_URL . "user/index/" . $this->user->get_name() . "/");
        $captionImage->setLinkText($this->user->get_attribute("USER_FIRSTNAME") . " " . $this->user->get_attribute("USER_FULLNAME"));
        $captionImage->setImageSrc(\lms_user::get_user_image_url(140, 185, $this->user->get_attribute("OBJ_ICON")));
        $captionImage->setImageAlt(gettext("Profile Image"));
        $captionImage->setImageTitle(gettext("Complete your Profile"));
        $content->setVariable("PROFILEIMAGE", $captionImage->getHtml());
        $rawHtml->addWidget($captionImage);
        // schulische Abschlüsse
        $schoolBox = \Portfolio\Model\EntrySchool::getViewWidget($portfolio);
        $content->setCurrentBlock("PORTFOLIO_BOX");
        $content->setVariable("PORTFOLIO_CONTENT", $schoolBox->getHtml());
        $content->parse("PORTFOLIO_BOX");
        $rawHtml->addWidget($schoolBox);
        // berufliche Abschlüsse
        $jobBox = \Portfolio\Model\EntryEducation::getViewWidget($portfolio);
        $content->setCurrentBlock("PORTFOLIO_BOX");
        $content->setVariable("PORTFOLIO_CONTENT", $jobBox->getHtml());
        $content->parse("PORTFOLIO_BOX");
        $rawHtml->addWidget($jobBox);
        /*		$jobBox = new \Widgets\Box();
        		$jobBox->setId(\PortfolioHome::getInstance()->getId());
        		$jobBox->setTitle(\Portfolio::getInstance()->getText("Berufliche Aus- und Weiterbildungsgänge"));
        		$jobBox->setTitleLink(PATH_URL . "portfolio/");
        		$html = <<<END
        		<div style="text-align: center; color: gray; font-size: 80%">
        			Hier können relevante Informationen zu den beruflichen Aus- und Weiterbildungsgängen (wie die Art des Ausbildungsberufes sowie ggf. des Weiterbildungsberufes) hinterlegt, erläutert und belegt werden.
        		</div>
        		<br>
        		<div style="border: 3px dotted lightblue; padding: 5px; background-color: #ffe">
        			Ausbildungsberuf: <em>Chemikant</em> <br>
        			durchschnittliche Abschlussnote: <em>Gut (2)</em> <br>
        			Jahrgang: <em>2005</em> <br>
        			Ausbildungsbetrieb: <em>Bayer</em> <br>
        			Ausbildungsstätte: <em>Infracor</em> <br>
        			Bemerkung: <em>Schwerpunkt Anlagen</em>
        			<br clear=all>
        			<div style="float: right; display: inline">
        				<a href="">Eintrag bearbeiten</a> |
        				<a href="">Beleg anfügen</a> 
        			</div>
        			<br clear=all>
        			Kompetenzen:<br><br>
        			<em>Tätigkeitsfeld II (Chemische/biologische Produktionsverfahren vorbereiten/planen, durchführen und optimieren)</em><br>
        			<div style="font-size:80%">Das Tätigkeitsfeld beinhaltet Kompetenzen, die für die erfolgreiche Planung, Durchführung, Optimierung und Dokumentation chemischer/biologischer Produktionsverfahren vorhanden sein sollten.</div>
        			<div style="font-size:80%; text-align:right">Kompetenzniveau (gemäß DQR): 4<br>
        			Er/Sie ist in der Lage  kompetenzbezogene Aufgabenstellungen im Rahmen der Vorbereitung/Planung, Durchführung und Optimierung von chemischer/biologischer Produktionsverfahren (bspw. Feststoffe zu zerkleinern und klassieren)  auch unter sich verändernden und nicht eindeutigen Rahmenbedingungen selbständig zu planen, zu bearbeiten, ggf. hierbei auftretende Probleme zu lösen sowie Arbeitsergebnisse unter Beachtung von Wechselwirkungen zu beurteilen.     
        			</div>
        			<hr>
        END;
        		$html .= $this->getKompetenzHtml("II.1", "Kann betriebsübliche verfahrenstechnische mechanische Grundoperationen durchführen");
        		$html .= $this->getKompetenzHtml("II.2", "Kann betriebsübliche verfahrenstechnische thermische Grundoperationen durchführen");
        		$html .= "<br clear=all><br><em>Tätigkeitsfeld III</em><hr>";
        		$html .= $this->getKompetenzHtml("III.1", "Kann betriebsübliche Arbeitsmitteln (z.B. Fördersysteme, Werkstoffe, Anlagenteile und Geräte usw.) handhaben, pflegen, instandhalten sowie  funktionell relevante Faktoren (z.B. Korrosion, Verschleiß usw.) beurteilen");
        		$html .= $this->getKompetenzHtml("III.2", "Kann Installationstechnische Arbeiten (z.B. Rohre und Rohrleitungsteile verbinden und abdichten) planen und durchführen");
        		$html .="<br clear=all></div>";
        		$jobBox->setContent($html);
        		$jobBox->setContentMoreLink(PATH_URL . "portfolio/");
        		$content->setCurrentBlock("PORTFOLIO_BOX");
        		$content->setVariable("PORTFOLIO_CONTENT", $jobBox->getHtml());
        		$content->parse("PORTFOLIO_BOX");
        		$rawHtml->addWidget($jobBox);*/
        // Studium
        $studyBox = \Portfolio\Model\EntryAcademic::getViewWidget($portfolio);
        $content->setCurrentBlock("PORTFOLIO_BOX");
        $content->setVariable("PORTFOLIO_CONTENT", $studyBox->getHtml());
        $content->parse("PORTFOLIO_BOX");
        $rawHtml->addWidget($studyBox);
        // Zertifikate
        $certBox = \Portfolio\Model\EntryCertificate::getViewWidget($portfolio);
        $content->setCurrentBlock("PORTFOLIO_BOX");
        $content->setVariable("PORTFOLIO_CONTENT", $certBox->getHtml());
        $content->parse("PORTFOLIO_BOX");
        $rawHtml->addWidget($certBox);
        // Berufserfahrung
        $practiceBox = \Portfolio\Model\EntryEmployment::getViewWidget($portfolio);
        $content->setCurrentBlock("PORTFOLIO_BOX");
        $content->setVariable("PORTFOLIO_CONTENT", $practiceBox->getHtml());
        $content->parse("PORTFOLIO_BOX");
        $rawHtml->addWidget($practiceBox);
        /*		$practiceBox = new \Widgets\Box();
        		$practiceBox->setId(\PortfolioHome::getInstance()->getId());
        		$practiceBox->setTitle(\Portfolio::getInstance()->getText("Berufliche Erfahrungen"));
        		$practiceBox->setTitleLink(PATH_URL . "portfolio/");
        		$html = <<<END
        		<div style="text-align: center; color: gray; font-size: 80%">
        			Hier können relevante Informationen zu den beruflichen Erfahrungen (Art der Erfahrung) hinterlegt, erläutert und belegt werden.
        		</div>
        		<br>
        		<div style="border: 3px dotted lightblue; padding: 5px; background-color: #ffe">
        			Art: <em>Praktikum oder Beschäftigung</em> <br>
        			Betrieb: <em>Bayer</em> <br>
        			Dauer: <em>2 Jahr</em> <br>
        			Position: <em>Chemikant</em><br>
        			Bemerkung: <em>Schwerpunkt Anlagen</em>
        			<br clear=all>
        			<div style="float: right; display: inline">
        				<a href="">Eintrag bearbeiten</a> |
        				<a href="">Beleg anfügen</a> 
        			</div>
        			<br clear=all>
        			Kompetenzen:<br><br>
        			<em>Tätigkeitsfeld II (Chemische/biologische Produktionsverfahren vorbereiten/planen, durchführen und optimieren)</em><br>
        			<div style="font-size:80%">Das Tätigkeitsfeld beinhaltet Kompetenzen, die für die erfolgreiche Planung, Durchführung, Optimierung und Dokumentation chemischer/biologischer Produktionsverfahren vorhanden sein sollten.</div>
        			<div style="font-size:80%; text-align:right">Kompetenzniveau (gemäß DQR): 4<br>
        			Er/Sie ist in der Lage  kompetenzbezogene Aufgabenstellungen im Rahmen der Vorbereitung/Planung, Durchführung und Optimierung von chemischer/biologischer Produktionsverfahren (bspw. Feststoffe zu zerkleinern und klassieren)  auch unter sich verändernden und nicht eindeutigen Rahmenbedingungen selbständig zu planen, zu bearbeiten, ggf. hierbei auftretende Probleme zu lösen sowie Arbeitsergebnisse unter Beachtung von Wechselwirkungen zu beurteilen.     
        			</div>
        			<hr>
        END;
        		$html .= $this->getKompetenzHtml("II.1<br><div style=\"font-size:60%\">Chemikant</div>", "Kann betriebsübliche verfahrenstechnische mechanische Grundoperationen durchführen");
        		$html .="<br clear=all>
        		<div style=\"float: right; display: inline\">
        				<a href=\"\">Kompetenzen verwalten</a> 
        		</div>
        		<br clear=all>
        		</div>";
        		$practiceBox->setContent($html);
        		$practiceBox->setContentMoreLink(PATH_URL . "portfolio/");
        		$content->setCurrentBlock("PORTFOLIO_BOX");
        		$content->setVariable("PORTFOLIO_CONTENT", $practiceBox->getHtml());
        		$content->parse("PORTFOLIO_BOX");
        		$rawHtml->addWidget($practiceBox);*/
        // Sonstige
        $otherBox = \Portfolio\Model\EntryOther::getViewWidget($portfolio);
        $content->setCurrentBlock("PORTFOLIO_BOX");
        $content->setVariable("PORTFOLIO_CONTENT", $otherBox->getHtml());
        $content->parse("PORTFOLIO_BOX");
        $rawHtml->addWidget($otherBox);
        $frameResponseObject->setTitle("Kompetenzportfolio");
        $frameResponseObject->addWidget($breadcrumb);
        $actionBar = new \Widgets\ActionBar();
        $actionBar->setActions(array(array("name" => "Bildungsbiographie", "ajax" => array("onclick" => array("command" => "properties", "params" => array("id" => "1"), "requestType" => "popup"))), array("name" => "Kompetenzübersicht", "ajax" => array("onclick" => array("command" => "newElement", "params" => array("id" => "1"), "requestType" => "popup"))), array("name" => "Diskussionen", "ajax" => array("onclick" => array("command" => "newElement", "params" => array("id" => "1"), "requestType" => "popup"))), array("name" => "Kompetenzmodell", "ajax" => array("onclick" => array("command" => "newElement", "params" => array("id" => "1"), "requestType" => "popup"))), array("name" => "Import der Belege", "ajax" => array("onclick" => array("command" => "Sanctions", "params" => array("id" => "1"), "requestType" => "popup"))), array("name" => "Export der Belege", "ajax" => array("onclick" => array("command" => "Sanctions", "params" => array("id" => "1"), "requestType" => "popup"))), array("name" => "Drucken", "ajax" => array("onclick" => array("command" => "Sanctions", "params" => array("id" => "1"), "requestType" => "popup")))));
        $frameResponseObject->addWidget($actionBar);
        $rawHtml->setHtml($content->get());
        $frameResponseObject->addWidget($rawHtml);
        return $frameResponseObject;
    }
Exemple #6
0
 public function frameResponse(\FrameResponseObject $frameResponseObject)
 {
     $path = $this->params;
     $portal = \lms_portal::get_instance();
     $user = \lms_steam::get_current_user();
     if (isset($path[0])) {
         if (\steam_factory::groupname_to_object($GLOBALS["STEAM"]->get_id(), "courses." . $path[0]) instanceof \steam_group) {
             $current_semester = \steam_factory::groupname_to_object($GLOBALS["STEAM"]->get_id(), "courses." . $path[0]);
         } else {
             header("Location: " . PATH_URL . "404/");
             die;
         }
     } else {
         $current_semester = \lms_steam::get_current_semester();
     }
     $current_semester_name = $current_semester->get_name();
     if (\lms_steam::is_steam_admin($user)) {
         if (!$portal->get_user()->is_logged_in()) {
             throw new Exception("Access denied. Please login.", E_USER_AUTHORIZATION);
         }
         $semester_admins = \steam_factory::groupname_to_object($GLOBALS["STEAM"]->get_id(), $current_semester->get_groupname() . ".admins");
         $admin_group = new \koala_group_default($semester_admins);
         if ($_SERVER["REQUEST_METHOD"] == "POST") {
             $delete = $_POST["delete"];
             if (count($delete) == 1) {
                 $login = key($delete);
                 $admin = \steam_factory::username_to_object($GLOBALS["STEAM"]->get_id(), $login);
                 $admin_group->remove_member($admin);
             }
         }
         $content = \Semester::getInstance()->loadTemplate("semester_admins.template.html");
         $content->setVariable("INFORMATION_ADMINS", str_replace("%SEMESTER", h($current_semester->get_attribute("OBJ_DESC")), gettext("These people are allowed to create courses for %SEMESTER.")) . " " . gettext("They can appoint other users as staff members/moderators for their own courses."));
         $content->setVariable("LINK_ADD_ADMIN", PATH_URL . "semester/addAdmin/" . $current_semester_name . "/" . $admin_group->get_id());
         $content->setVariable("LABEL_ADD_ADMIN", gettext("Add another admin"));
         //TODO: Messages extension schreiben
         // TODO: Passt der Link?
         $content->setVariable("LINK_MESSAGE", PATH_URL . "mail/write/" . $admin_group->get_id());
         $content->setVariable("LABEL_MESSAGE_ADMINS", gettext("Mail to admins"));
         $admins = $admin_group->get_members();
         $no_admins = count($admins);
         if ($no_admins > 0) {
             $content->setVariable("LABEL_ADMINS", gettext("Course admins"));
             $content->setCurrentBlock("BLOCK_CONTACT_LIST");
             $content->setVariable("LABEL_NAME_POSITION", gettext("Name") . "/" . gettext("Position"));
             $content->setVariable("LABEL_SUBJECT_AREA", gettext("Subject area"));
             $content->setVariable("LABEL_COMMUNICATION", gettext("Communication"));
             $content->setVariable("LABEL_REMOVE_ADMIN", gettext("Action"));
             foreach ($admins as $admin) {
                 $adm_attributes = $admin->get_attributes(array("USER_FIRSTNAME", "USER_FULLNAME", "OBJ_DESC", "OBJ_ICON"));
                 $content->setCurrentBlock("BLOCK_CONTACT");
                 $content->setVariable("CONTACT_NAME", h($adm_attributes["USER_FIRSTNAME"]) . " " . h($adm_attributes["USER_FULLNAME"]));
                 // TODO: Profile Image einfügen
                 // TODO: Passt der Link?
                 $icon_link = \lms_user::get_user_image_url(30, 40);
                 $content->setVariable("CONTACT_IMAGE", $icon_link);
                 // TODO: Passt der Link?
                 $content->setVariable("CONTACT_LINK", PATH_URL . "user/" . $admin->get_name() . "/");
                 $content->setVariable("OBJ_DESC", h($adm_attributes["OBJ_DESC"]));
                 $content->setVariable("LABEL_MESSAGE", gettext("Message"));
                 // TODO: Passt der Link?
                 $content->setVariable("LINK_SEND_MESSAGE", PATH_URL . "mail/write/" . $admin->get_name());
                 $content->setVariable("LABEL_SEND", gettext("Send"));
                 $content->setVariable("LABEL_REMOVE", gettext("Remove"));
                 $content->setVariable("CONTACT_ID", $admin->get_name());
                 $content->parse("BLOCK_CONTACT");
             }
             $content->parse("BLOCK_CONTACT_LIST");
         } else {
             $content->setVariable("LABEL_ADMINS", gettext("No admins found."));
         }
         /* TODO: Portal anpassen
         			$portal->set_page_title( h($current_semester->get_name()) . " Admins" );
         			$portal->set_page_main( 
         				array(
         					array( "link" => PATH_URL . SEMESTER_URL . "/" . h($current_semester->get_name()) . "/", "name" => h($current_semester->get_attribute( "OBJ_DESC" ))), array( "link" => "", "name" => gettext( "Admins" ) )
         				),
         				$content->get(),
         				""
         			);
         			$portal->show_html( );
         			*/
     } else {
         header("Location: " . PATH_URL . "404/");
         die;
     }
     $frameResponseObject->setTitle("Semester " . $current_semester_name);
     $rawHtml = new \Widgets\RawHtml();
     $rawHtml->setHtml($content->get());
     $frameResponseObject->addWidget($rawHtml);
     return $frameResponseObject;
 }
Exemple #7
0
    public function frameResponse(\FrameResponseObject $frameResponseObject)
    {
        $breadcrumb = new \Widgets\Breadcrumb();
        $breadcrumb->setData(array(array("name" => \Portfolio::getInstance()->getText("Portfolio/"), "link" => $this->getExtension()->getExtensionUrl() . "Myportfolio/"), array("name" => \Portfolio::getInstance()->getText("Profile"))));
        $actionBar = new \Widgets\ActionBar();
        $actionBar->setActions(array(array("name" => \Portfolio::getInstance()->getText("Edit Profile"), "link" => $this->getExtension()->getExtensionUrl() . "Editprofile/"), array("name" => \Portfolio::getInstance()->getText("Qualification"), "link" => $this->getExtension()->getExtensionUrl() . "Qualificationprofile/"), array("name" => \Portfolio::getInstance()->getText("Employment History"), "link" => $this->getExtension()->getExtensionUrl() . "Employmentprofile/")));
        $captionImage = new \Widgets\CaptionImage();
        $captionImage->setLink(PATH_URL . "user/index/" . \lms_steam::get_current_user()->get_name() . "/");
        $captionImage->setLinkText(\Portfolio::getInstance()->getText("To your profile"));
        $captionImage->setImageSrc(\lms_user::get_user_image_url(140, 185));
        $captionImage->setImageAlt(\Portfolio::getInstance()->getText("Profile Image"));
        $captionImage->setImageTitle(\Portfolio::getInstance()->getText("Complete your Profile"));
        $input = new \Widgets\TextInput();
        $grid = new \Widgets\Grid();
        $grid->setData(array("headline" => array(array("name" => \Portfolio::getInstance()->getText("Personal Information"), "colspan" => "2")), "rows" => array(array(array("content" => \Portfolio::getInstance()->getText("First Name:"), "type" => "label"), array("content" => $input, "type" => "value")), array(array("content" => \Portfolio::getInstance()->getText("Last Name:"), "type" => "label"), array("content" => "l.name", "type" => "value")), array(array("content" => \Portfolio::getInstance()->getText("Email Id:"), "type" => "label"), array("content" => "email", "type" => "value"), array(array("content" => \Portfolio::getInstance()->getText("Address:"), "type" => "label"), array("content" => "Address", "type" => "value"))))));
        $html = <<<end
<style type="text/css">


</style>

<div class="headline">
\t<h1>My Profile</h1>
</div>

<div class="actionBar">
    
\t<a href="../Editprofile/"class="button">Edit profile</a>
\t
\t<a href="../Qualificationprofile/" class="button">Qualification icon</a>
\t
\t<a href="../Employmentprofile/" class="button">Employment History</a>
\t
</div>



<tbody>
 <tr>
    <td class="info" width="155" valign="top">
       <table style="width: 146px; height: 191px; background-color: rgb(238, 238, 238); margin-bottom: 3px;">
       </table>
<tbody>
<tr>
<td>
<img class="border" alt=" Ashish Chopra" type=usericon&width=140&height=185">
</td>
</tr>

</tbody>

<table cellspacing="0" cellpadding="5" width="100%" class="grid">
\t<tr>
\t\t<th class="group" colspan="2">Personal Information</th>
\t</tr>
\t<tr>
\t\t<td class="label">First Name:</td>
\t\t<td class="value">f.name</td>
\t</tr>
\t<tr>
\t\t<td class="label">Last Name:</td>
\t\t<td class="value">L.name</td>
\t</tr>\t
\t<tr>
\t\t<td class="label">Email Id:</td>
\t\t<td class="value">Email address</td>
\t</tr>
\t<tr>
\t\t<td class="label">Contact Details:</td>
\t\t<td class="value">Number and Address</td>
\t</tr>
\t<tr>
\t\t<td class="label">Introduction:</td>
\t
\t</tr>
 </table>
 
 

</div>
end;
        $frameResponseObject->setTitle("Profile");
        $rawHtml = new \Widgets\RawHtml();
        $rawHtml->setHtml($html);
        $frameResponseObject->addWidget($breadcrumb);
        $frameResponseObject->addWidget($actionBar);
        $frameResponseObject->addWidget($captionImage);
        $frameResponseObject->addWidget($grid);
        //$frameResponseObject->addWidget($rawHtml);
        return $frameResponseObject;
    }