Public Member Functions | |
| ilCalInterface ($ilias, $nb="") | |
| showLocator ($tpl, $lng, $app) | |
| showLocator($tpl, $lng, $app) genarate the locater for ilias3 public | |
| getUId () | |
| read UserID public | |
| getLang () | |
| read current language, the user selected public | |
| getSkin () | |
| read current skin-name, the user selected public | |
| getStyle () | |
| read current style(-sheet)-name, the user selected public | |
| getStyleFname () | |
| read current style(-sheet)-name including path, the user selected public | |
| getGroupIds () | |
| read GroupIDs of the current UserID (stub) public | |
| getIliasDbName () | |
| Returns the Ilias-Databasename. | |
| getCscwDbName () | |
| Returns the CSCW-Databasename. | |
| getMysqlHostName () | |
| Returns the mysql-Host for database-access. | |
| getMysqlUserName () | |
| Returns the mysql-Username for database-access. | |
| getMysqlPass () | |
| Returns the mysql-Password for database-access. | |
| getAllUserId () | |
| Returns the userID which stands for 'all Users'. | |
| getrelCSCWDir () | |
| Returns the relative path where cscw is located. | |
| getFrameDec () | |
| Returns the string for the menue is the DP runs in no-frames modus. | |
| getUserGroups ($userId) | |
| Returns all groups which are owned by the user. | |
| getOtherMembers ($groupId, $userId) | |
| Returns all user-ID's which are in the given group ($groupId) except the given $userId. | |
| getMemberGroups ($userId) | |
| Returns all groups where the user is member in. | |
| getGroupName ($groupId) | |
| Fetches the name of a group according to its group_ID from the database. | |
| getNumOfMembers ($group_id) | |
| Returns number of members in the Group with $group_id. | |
| getDpDBHandler () | |
| Returns dte Dtateplane DB handler fo database conectivity. | |
| setNames () | |
| check wether current MySQL server is version 4.1.x or higher | |
Data Fields | |
| $ilias | |
| The following Variables do not need to be kept up to date manually. | |
| $iliasRootDir | |
| ilias-root-directory (including the whole path beginning from system-root!) @ var string @ access private | |
| $modulDir | |
| ilias module directory (up to the ilias root dir) @ var string @ access private | |
| $relCSCWDir | |
| relative path of the cscw dir @ var string @ access private | |
| $dbaseIlias | |
| $dbaseCscw | |
| $host | |
| $mysqlUser | |
| $mysqlPass | |
| $allUserId | |
| $usingFrames | |
| $uId | |
| $uPrefs | |
| $templPath | |
| $skinPath | |
| $pBuf | |
| $GroupIds | |
| $sock = FALSE | |
| Constructor fetch userspecific data from ilias and store them in local variables public. | |
Definition at line 38 of file class.ilCalInterface.php.
| ilCalInterface::getAllUserId | ( | ) |
Returns the userID which stands for 'all Users'.
Definition at line 413 of file class.ilCalInterface.php.
{
return $this->allUserId;
}//end function
| ilCalInterface::getCscwDbName | ( | ) |
Returns the CSCW-Databasename.
Definition at line 377 of file class.ilCalInterface.php.
{
return $this->dbaseCscw;
}//end function
| ilCalInterface::getDpDBHandler | ( | ) |
Returns dte Dtateplane DB handler fo database conectivity.
Definition at line 593 of file class.ilCalInterface.php.
{
$dbase_ilias = $this->getIliasDbName(); //Get all constants from the interface
$dbase_cscw = $this->getCscwDbName(); // /
$host = $this->getMysqlHostName(); // /
$user = $this->getMysqlUserName(); // /
$pass = $this->getMysqlPass(); // /
$alluser_id = $this->getAllUserId(); //
$dlI = @mysql_connect ($host, $user, $pass); //Connect to database
if (isset($dlI))
{
if (mysql_select_db ($dbase_ilias, $dlI) == false) //Select the database
{
mysql_close ($dlI);
$dlI = false;
}
}
$this->setNames();
Return $dlI ;
}// end func
| ilCalInterface::getFrameDec | ( | ) |
Returns the string for the menue is the DP runs in no-frames modus.
Definition at line 431 of file class.ilCalInterface.php.
{
switch($this->usingFrames) {
case 1 :
$uptext = "";
break;
case 0 :
$uptext = ereg_replace ('HREF="', 'HREF="../../', $this->upText);
$uptext = ereg_replace ('SRC="', 'SRC="../../', $uptext);
$uptext = ereg_replace ('= "images/navbar/', '= "../../images/navbar/', $uptext);
break;
case -1:
// not now implemented in Ilias3 and Ilias2
break;
default :
$uptext = "";
}
//$uptext = htmlspecialchars($uptext);
return $uptext;
}//end function
| ilCalInterface::getGroupIds | ( | ) |
read GroupIDs of the current UserID (stub) public
| @return | array of integers |
Definition at line 348 of file class.ilCalInterface.php.
{
$IliasArryGroups = ilUtil::GetObjectsByOperations ("grp", "read", False,False);
$IliasArryGroups = array_merge($IliasArryGroups,ilUtil::GetObjectsByOperations ("crs", "read", False,False));
if($IliasArryGroups[0]!="") {
$i = 0;
foreach ($IliasArryGroups as $Row){
$groupContainer = $Row[ref_id];
$groups[$i]=$groupContainer ;
$i++;
}
}
return $groups;
}//end function
| ilCalInterface::getGroupName | ( | $ | groupId | ) |
Fetches the name of a group according to its group_ID from the database.
| int | group_IDs |
Definition at line 535 of file class.ilCalInterface.php.
{
$IliasArryGroups = ilUtil::GetObjectsByOperations ("grp", "read", False,False);
$IliasArryGroups = array_merge($IliasArryGroups,ilUtil::GetObjectsByOperations("crs", "read", False,False));
if($IliasArryGroups[0]!="") {
$i = 0;
foreach ($IliasArryGroups as $Row){
$groupContainer = $Row[ref_id];
$groups[$i][id]=$groupContainer ;
$groups[$i][title]=$Row[title] ;
$i++;
}
}
if($groups) {
foreach ($groups as $Row ){
$groupContainer = $Row[id];
if ($groupId == $groupContainer ){
$groupname = $Row[title] ;
}
}
}
return $groupname;
}//end function
| ilCalInterface::getIliasDbName | ( | ) |
Returns the Ilias-Databasename.
Definition at line 368 of file class.ilCalInterface.php.
{
return $this->dbaseIlias;
}//end function
| ilCalInterface::getLang | ( | ) |
read current language, the user selected public
| @return | string |
Definition at line 304 of file class.ilCalInterface.php.
{
return $this->uPrefs["language"];
}//end function
| ilCalInterface::getMemberGroups | ( | $ | userId | ) |
Returns all groups where the user is member in.
| int | user_ID |
Definition at line 524 of file class.ilCalInterface.php.
Referenced by Database::getDates(), Database::getFullDayDates(), Database::getFullDayRotationDates(), and Database::getRotationDates().
{
$GroupIds = ilCalInterface::getGroupIds();
return $GroupIds;
}//end function
Here is the caller graph for this function:| ilCalInterface::getMysqlHostName | ( | ) |
Returns the mysql-Host for database-access.
Definition at line 386 of file class.ilCalInterface.php.
{
return $this->host;
}//end function
| ilCalInterface::getMysqlPass | ( | ) |
Returns the mysql-Password for database-access.
Definition at line 404 of file class.ilCalInterface.php.
{
return $this->mysqlPass;
}//end function
| ilCalInterface::getMysqlUserName | ( | ) |
Returns the mysql-Username for database-access.
Definition at line 395 of file class.ilCalInterface.php.
{
return $this->mysqlUser;
}//end function
| ilCalInterface::getNumOfMembers | ( | $ | group_id | ) |
Returns number of members in the Group with $group_id.
| $group_id | (int) |
Definition at line 566 of file class.ilCalInterface.php.
Referenced by Database::delDate(), and Database::discardChangedDate().
{
$tmp_obj =& ilObjectFactory::getInstanceByRefId($group_id);
switch($tmp_obj->getType())
{
case 'grp':
return count($tmp_obj->getGroupMemberIds());
case 'crs':
$tmp_obj->initCourseMemberObject();
return count($tmp_obj->members_obj->getAssignedUsers());
}
#//gain access to ilias-variables
#include_once("./classes/class.ilObjGroup.php");
#$group = new ilObjGroup($group_id);
#$members = $group->getGroupMemberIds($group_id);
#return count($members);
}//end function
Here is the caller graph for this function:| ilCalInterface::getOtherMembers | ( | $ | groupId, | |
| $ | userId | |||
| ) |
Returns all user-ID's which are in the given group ($groupId) except the given $userId.
| int | group_ID | |
| int | user_ID |
Definition at line 482 of file class.ilCalInterface.php.
Referenced by Database::addDate(), Database::delDate(), Database::getGroupDates(), Database::getGroupRotationDates(), and Database::updateDate().
{
$tmp_obj =& ilObjectFactory::getInstanceByRefId($groupId);
switch($tmp_obj->getType())
{
case 'grp':
$members = $tmp_obj->getGroupMemberIds($groupId);
break;
case 'crs':
$tmp_obj->initCourseMemberObject();
$members = $tmp_obj->members_obj->getAssignedUsers();
break;
}
//gain access to ilias-variables
#include_once("./classes/class.ilObjGroup.php");
#$group = new ilObjGroup($groupId);
#$members = $group->getGroupMemberIds($groupId);
if($members[0] == $userId and count($members) == 1) {
$members = FALSE;
}elseif ($userId != "-1") {
array_unshift ($members, $userId);
$members = array_unique ($members);
$members = array_reverse ($members);
array_pop ($members);
}
return $members;
}//end function
Here is the caller graph for this function:| ilCalInterface::getrelCSCWDir | ( | ) |
Returns the relative path where cscw is located.
Definition at line 422 of file class.ilCalInterface.php.
{
return $this->relCSCWDir;
}//end function
| ilCalInterface::getSkin | ( | ) |
read current skin-name, the user selected public
| @return | string |
Definition at line 315 of file class.ilCalInterface.php.
{
return $this->uPrefs["skin"];
}//end function
| ilCalInterface::getStyle | ( | ) |
read current style(-sheet)-name, the user selected public
| @return | string |
Definition at line 326 of file class.ilCalInterface.php.
{
return $this->uPrefs["style"];
}//end function
| ilCalInterface::getStyleFname | ( | ) |
read current style(-sheet)-name including path, the user selected public
| @return | string |
Definition at line 337 of file class.ilCalInterface.php.
{
return ilUtil::getStyleSheetLocation();
}//end function
| ilCalInterface::getUId | ( | ) |
read UserID public
| @return | integer |
Definition at line 293 of file class.ilCalInterface.php.
{
return $this->uId;
}//end function
| ilCalInterface::getUserGroups | ( | $ | userId | ) |
Returns all groups which are owned by the user.
| int | user_ID |
Definition at line 457 of file class.ilCalInterface.php.
{
$IliasArryGroups = ilUtil::GetObjectsByOperations ("grp", "read", False,False);
$IliasArryGroups = array_merge($IliasArryGroups,ilUtil::GetObjectsByOperations ("crs", "read", False,False));
if($IliasArryGroups[0]!="") {
$i = 0;
foreach (@$IliasArryGroups as $Row){
$groupContainer = $Row[ref_id];
$groups[$i][0]=$groupContainer ;
$groups[$i][1]=$Row[title] ;
$i++;
}
}
return $groups;
}//end function
| ilCalInterface::ilCalInterface | ( | $ | ilias, | |
| $ | nb = "" | |||
| ) |
Definition at line 186 of file class.ilCalInterface.php.
{
global $tpl;
//include manual edited variables
include ('.'.DATEPLANER_ROOT_DIR.'/config/conf.dateplaner.php');
/*generate a copy of the ilias object*/
$this->ilias = $ilias;
$this->modulDir = $modulDir;
$this->relCSCWDir = $relCSCWDir;
define("ALLUSERID", $allUserId); /* All USER ID */
//gain access to ilias-variables
if($dbaseIlias != "-1") {$this->dbaseIlias=$dbaseIlias;}else {$this->dbaseIlias =$this->ilias->ini->readVariable("db", "name");}
if($dbaseCscw != "-1") {$this->dbaseCscw=$dbaseCscw;} else {$this->dbaseCscw =$this->ilias->ini->readVariable("db", "name");}
if($host != "-1") {$this->host=$host;} else {$this->host =$this->ilias->ini->readVariable("db", "host");}
if($mysqlUser != "-1") {$this->mysqlUser=$mysqlUser;} else {$this->mysqlUser =$this->ilias->ini->readVariable("db", "user");}
if($mysqlPass != "-1") {$this->mysqlPass=$mysqlPass;} else {$this->mysqlPass =$this->ilias->ini->readVariable("db", "pass");}
$this->sock = @mysql_connect ($this->host, $this->mysqlUser, $this->mysqlPass);
//connect to database
if ($this->sock)
{
if (mysql_select_db ($this->dbaseCscw, $this->sock) == FALSE)
{
mysql_close ($this->sock);
$this->sock = FALSE;
}
}
$this->setNames();
//gain further access to ilias-variables
$this->uId = $ilias->account->getId();
$this->uPrefs["language"] = $ilias->account->getPref("language");
$this->uPrefs["skin"] = $ilias->account->getPref("skin");
$this->uPrefs["style"] = $ilias->account->getPref("style");
$this->GroupIds = $this->getGroupIds();
$this->upText = ""; //menue string not developed in ilias3
//$this->tpl =& $tpl;
//$this->__showLocator();
}//end Constructor
| ilCalInterface::setNames | ( | ) |
check wether current MySQL server is version 4.1.x or higher
Definition at line 620 of file class.ilCalInterface.php.
{
$version = mysql_get_server_info();
$version = explode(".", $version);
if ((int)$version[0] >= 5 ||
((int)$version[0] == 4 && (int)$version[1] >= 1))
{
mysql_query("SET NAMES utf8");
}
}
| ilCalInterface::showLocator | ( | $ | tpl, | |
| $ | lng, | |||
| $ | app | |||
| ) |
showLocator($tpl, $lng, $app) genarate the locater for ilias3 public
| @return | integer |
Definition at line 246 of file class.ilCalInterface.php.
{
global $ilias;
$tpl = new ilTemplate("tpl.calendar_header.html", true, true);
$tpl->setCurrentBlock("locator_item");
$tpl->setVariable("LINK_ITEM","./usr_personaldesktop.php");
$tpl->setVariable("LINK_TARGET","bottom");
$tpl->setVariable("ITEM",$lng->txt("personal_desktop"));
$tpl->parseCurrentBlock();
$tpl->touchBlock("locator_separator_prefix");
$tpl->setCurrentBlock("locator_item");
$tpl->setVariable("LINK_ITEM","./dateplaner.php");
$tpl->setVariable("LINK_TARGET","bottom");
$tpl->setVariable("ITEM",$lng->txt("dateplaner"));
$tpl->parseCurrentBlock();
$tpl->touchBlock("locator_separator_prefix");
$tpl->setCurrentBlock("locator_item");
$tpl->setVariable("LINK_ITEM","./dateplaner.php?app=".$app);
$tpl->setVariable("LINK_TARGET","bottom");
$tpl->setVariable("ITEM",$lng->txt("app_".$app));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("locator");
$tpl->setVariable("TXT_LOCATOR",$lng->txt("locator"));
$tpl->parseCurrentBlock();
$tpl->setVariable("HEADER", $lng->txt("personal_desktop"));
include ("./include/inc.personaldesktop_buttons.php");
$locator = $tpl->get();
Return $locator;
}
| ilCalInterface::$allUserId |
Definition at line 119 of file class.ilCalInterface.php.
| ilCalInterface::$dbaseCscw |
Definition at line 91 of file class.ilCalInterface.php.
| ilCalInterface::$dbaseIlias |
Definition at line 84 of file class.ilCalInterface.php.
| ilCalInterface::$GroupIds |
Definition at line 175 of file class.ilCalInterface.php.
| ilCalInterface::$host |
Definition at line 98 of file class.ilCalInterface.php.
| ilCalInterface::$ilias |
The following Variables do not need to be kept up to date manually.
This versions should autodetect the needed values automatically. The needed values are read within the Constructor from "/config/conf.dateplaner.php" into teh module dir. Therefore all Values should be edited in conf.dateplaner.php. private copy of the ilias object @ var object @ access private
Definition at line 54 of file class.ilCalInterface.php.
| ilCalInterface::$iliasRootDir |
ilias-root-directory (including the whole path beginning from system-root!) @ var string @ access private
Definition at line 61 of file class.ilCalInterface.php.
| ilCalInterface::$modulDir |
ilias module directory (up to the ilias root dir) @ var string @ access private
Definition at line 68 of file class.ilCalInterface.php.
| ilCalInterface::$mysqlPass |
Definition at line 112 of file class.ilCalInterface.php.
| ilCalInterface::$mysqlUser |
Definition at line 105 of file class.ilCalInterface.php.
| ilCalInterface::$pBuf |
Definition at line 168 of file class.ilCalInterface.php.
| ilCalInterface::$relCSCWDir |
relative path of the cscw dir @ var string @ access private
Definition at line 76 of file class.ilCalInterface.php.
| ilCalInterface::$skinPath |
Definition at line 161 of file class.ilCalInterface.php.
| ilCalInterface::$sock = FALSE |
Constructor fetch userspecific data from ilias and store them in local variables public.
Definition at line 183 of file class.ilCalInterface.php.
| ilCalInterface::$templPath |
Definition at line 154 of file class.ilCalInterface.php.
| ilCalInterface::$uId |
Definition at line 140 of file class.ilCalInterface.php.
| ilCalInterface::$uPrefs |
Definition at line 147 of file class.ilCalInterface.php.
| ilCalInterface::$usingFrames |
Definition at line 129 of file class.ilCalInterface.php.
1.7.1