summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php
diff options
context:
space:
mode:
authorDirk Riestere2017-03-01 19:28:18 +0100
committerDirk Riestere2017-03-01 19:28:18 +0100
commita2545dfaa398f2825a43853227bbdeed913bf192 (patch)
treef764770a1f358129c866d0b024074bc06e6c6e0b /modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php
parentAPI: Fixed Calendar function. (diff)
downloadslx-admin-a2545dfaa398f2825a43853227bbdeed913bf192.tar.gz
slx-admin-a2545dfaa398f2825a43853227bbdeed913bf192.tar.xz
slx-admin-a2545dfaa398f2825a43853227bbdeed913bf192.zip
Bugfixes und checkConection implementiert
Diffstat (limited to 'modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php')
-rw-r--r--modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php31
1 files changed, 20 insertions, 11 deletions
diff --git a/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php b/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php
index 519d85b7..46fc0af8 100644
--- a/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php
+++ b/modules-available/locationinfo/inc/coursebackend/coursebackend_hisinone.inc.php
@@ -16,6 +16,11 @@ class CourseBackend_HisInOne extends CourseBackend
$this->location = $location."/qisserver/services2/CourseService";
$this->serverID = $serverID;
}
+
+ public function checkConection(){
+ $this->findUnit(42);
+ return $this->error;
+ }
//Cache the timetables for 30 minutes ttables older than 60 are not refreshed
public function getCacheTime(){
@@ -120,6 +125,9 @@ class CourseBackend_HisInOne extends CourseBackend
$this->errormsg =$respons2['soapenvBody']['soapenvFault']['faultcode']." ".$respons2['soapenvBody']['soapenvFault']['faultstring'];
return;
}
+ else{
+ $this->error = false;
+ }
$id = $respons2['soapenvBody']['hisfindUnitResponse']['hisunitIds']['hisid'];
return $id;
}
@@ -154,6 +162,9 @@ class CourseBackend_HisInOne extends CourseBackend
$this->errormsg =$respons2['soapenvBody']['soapenvFault']['faultcode']." ".$respons2['soapenvBody']['soapenvFault']['faultstring'];
return;
}
+ else{
+ $this->error = false;
+ }
$respons3 = $respons2['soapenvBody']['hisreadUnitResponse'];
return $respons3;
}
@@ -313,8 +324,7 @@ class CourseBackend_HisInOne extends CourseBackend
foreach($dates as $date){
$roomID = $date['hisroomId'];
$datum = $date['hisexecutiondate'];
- if(intval($roomID) == $param && in_array($datum,$currentWeek)){
-
+ if(intval($roomID) == $room && in_array($datum,$currentWeek)){
$startTime = $date['hisstarttime'];
$endTime = $date['hisendtime'];
$json = array(
@@ -332,7 +342,7 @@ class CourseBackend_HisInOne extends CourseBackend
foreach($dates as $date){
$roomID = $date['hisroomId'];
$datum = $date['hisexecutiondate'];
- if(intval($roomID) == $param && in_array($datum,$currentWeek)){
+ if(intval($roomID) == $room && in_array($datum,$currentWeek)){
$startTime = $date['hisstarttime'];
$endTime = $date['hisendtime'];
@@ -367,11 +377,10 @@ class CourseBackend_HisInOne extends CourseBackend
}
-/*
- * $client = new CourseBackend_HisInOne();
- * $login = ['username'=> '','password'=>'','role'=>''];
-$login = json_encode($login);
-$client->setCredentials($login,"https://histestwebserver.vm.uni-freiburg.de",3);
-$test=$client->fetchSchedulesInternal([42=>42]);
-echo htmlentities($test[42]);
-*/ \ No newline at end of file
+
+//$client = new CourseBackend_HisInOne();
+//$login = ['username'=> '','password'=>'','role'=>''];
+//$login = json_encode($login);
+//$client->setCredentials($login,"https://histestwebserver.vm.uni-freiburg.de",3);
+//$test=$client->fetchSchedulesInternal([42=>42]);
+//echo htmlentities($test[42]);