ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilTestSignaturePlugin.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once 'Services/Component/classes/class.ilPlugin.php';
5
15abstract class ilTestSignaturePlugin extends ilPlugin
16{
18 protected $GUIObject;
19
23 public function setGUIObject($GUIObject)
24 {
25 $this->GUIObject = $GUIObject;
26 }
27
31 public function getGUIObject()
32 {
33 return $this->GUIObject;
34 }
35
40 final public function getComponentType()
41 {
42 return IL_COMP_MODULE;
43 }
44
49 final public function getComponentName()
50 {
51 return "Test";
52 }
53
58 final public function getSlot()
59 {
60 return "Signature";
61 }
62
67 final public function getSlotId()
68 {
69 return "tsig";
70 }
71
75 final protected function slotInit()
76 {
77 }
78
84 protected function getLinkTargetForCmd($cmd)
85 {
87 global $ilCtrl;
88 return
89 '//'. $_SERVER['HTTP_HOST']
90 . substr($_SERVER['PHP_SELF'],0, strlen($_SERVER['PHP_SELF']) - 10)
91 . '/' . $ilCtrl->getLinkTarget($this->getGUIObject(), $cmd, '', false, false);
92 }
93
100 protected function getLinkTargetForRessource($cmd, $ressource)
101 {
103 global $ilCtrl;
104 $link = 'http://'. $_SERVER['HTTP_HOST']
105 . substr($_SERVER['PHP_SELF'],0, strlen($_SERVER['PHP_SELF']) - 10)
106 . '/'
107 . $ilCtrl->getLinkTarget($this->getGUIObject(), $cmd, '', false, false) . '&ressource=' . $ressource;
108 return $link;
109 }
110
116 protected function getFormAction($default_cmd)
117 {
119 global $ilCtrl;
120 return $ilCtrl->getFormAction($this, $default_cmd);
121 }
122
126 protected function populatePluginCanvas($content)
127 {
129 global $tpl;
130 $tpl->setVariable($this->getGUIObject()->getTestOutputGUI()->getContentBlockName(), $content );
131 return;
132 }
133
151 protected function handInFileForArchiving($active_fi, $pass, $filename, $filepath)
152 {
153 require_once './Modules/Test/classes/class.ilTestArchiver.php';
154 $archiver = new ilTestArchiver($this->getGUIObject()->getTest()->getId());
155 $archiver->handInParticipantMisc($active_fi, $pass, $filename, $filepath);
156 }
157
158 protected function redirectToTest($success)
159 {
160 $this->getGUIObject()->redirectToTest($success);
161 }
162
178 abstract function invoke($cmd = null);
179
180}
global $tpl
Definition: ilias.php:8
$success
Definition: Utf8Test.php:87
$filename
Definition: buildRTE.php:89
const IL_COMP_MODULE
getId()
Get Id.
Class ilTestArchiver.
Abstract parent class for all signature plugin classes.
invoke($cmd=null)
Method all commands are forwarded to.
getComponentName()
Get Component Name.
handInFileForArchiving($active_fi, $pass, $filename, $filepath)
Hands in a file from the signature process associated with a given user and pass for archiving.
slotInit()
Object initialization done by slot.
getComponentType()
Get Component Type.
global $ilCtrl
Definition: ilias.php:18
$cmd
Definition: sahs_server.php:35
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']