ILIAS  release_7 Revision v7.30-3-g800a261c036
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 $DIC;
88 $ilCtrl = $DIC['ilCtrl'];
89 return
90 '//' . $_SERVER['HTTP_HOST']
91 . substr($_SERVER['PHP_SELF'], 0, strlen($_SERVER['PHP_SELF']) - 10)
92 . '/' . $ilCtrl->getLinkTarget($this->getGUIObject(), $cmd, '', false, false);
93 }
94
101 protected function getLinkTargetForRessource($cmd, $ressource)
102 {
104 global $DIC;
105 $ilCtrl = $DIC['ilCtrl'];
106 $link = 'http://' . $_SERVER['HTTP_HOST']
107 . substr($_SERVER['PHP_SELF'], 0, strlen($_SERVER['PHP_SELF']) - 10)
108 . '/'
109 . $ilCtrl->getLinkTarget($this->getGUIObject(), $cmd, '', false, false) . '&ressource=' . $ressource;
110 return $link;
111 }
112
118 protected function getFormAction($default_cmd)
119 {
121 global $DIC;
122 $ilCtrl = $DIC['ilCtrl'];
123 return $ilCtrl->getFormAction($this, $default_cmd);
124 }
125
129 protected function populatePluginCanvas($content)
130 {
132 global $DIC;
133 $tpl = $DIC['tpl'];
134 $tpl->setVariable($this->getGUIObject()->getTestOutputGUI()->getContentBlockName(), $content);
135 return;
136 }
137
155 protected function handInFileForArchiving($active_fi, $pass, $filename, $filepath)
156 {
157 require_once './Modules/Test/classes/class.ilTestArchiver.php';
158 $archiver = new ilTestArchiver($this->getGUIObject()->getTest()->getId());
159 $archiver->handInParticipantMisc($active_fi, $pass, $filename, $filepath);
160 }
161
162 protected function redirectToTest($success)
163 {
164 $this->getGUIObject()->redirectToTest($success);
165 }
166
182 abstract public function invoke($cmd = null);
183}
$success
Definition: Utf8Test.php:86
$filename
Definition: buildRTE.php:89
An exception for terminatinating execution or to throw for unit testing.
const IL_COMP_MODULE
Abstract Class ilPlugin.
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 $DIC
Definition: goto.php:24
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41
$_SERVER['HTTP_HOST']
Definition: raiseError.php:10