ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilUserAgreement Class Reference

Helper class for user agreement. More...

+ Collaboration diagram for ilUserAgreement:

Public Member Functions

 ilUserAgreement ()
 Constructor public.
 _getText ()
 get user agreement text (static)

Data Fields

 $ilias

Detailed Description

Helper class for user agreement.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
Id:
class.ilUserAgreement.php 14579 2007-08-23 12:06:19Z akill

Definition at line 32 of file class.ilUserAgreement.php.

Member Function Documentation

ilUserAgreement::_getText ( )

get user agreement text (static)

public

Definition at line 58 of file class.ilUserAgreement.php.

References $ilias, $ilLog, and $lng.

Referenced by ilAccountRegistrationGUI\__initForm(), and ilStartUpGUI\showUserAgreement().

{
global $lng, $ilias, $ilLog;
// 1st try: client specific / user language agreement
$agreement = "./Customizing/clients/".CLIENT_ID."/agreement/".
"agreement_".$lng->lang_key.".html";
// 2nd try: client specific / default language
if (!file_exists($agreement))
{
$agreement = "./Customizing/clients/".CLIENT_ID."/agreement/".
"agreement_".$lng->lang_default.".html";
}
// 3rd try: client specific / english
if (!file_exists($agreement))
{
$agreement = "./Customizing/clients/".CLIENT_ID."/agreement/".
"agreement_en.html";
}
// 4th try: global / user language
if (!file_exists($agreement))
{
$agreement = "./Customizing/global/agreement/".
"agreement_".$lng->lang_key.".html";
}
// 5th try: global / default language
if (!file_exists($agreement))
{
$agreement = "./Customizing/global/agreement/".
"agreement_".$lng->lang_default.".html";
}
// last try: global / english
if (!file_exists($agreement))
{
$ilLog->write("view_usr_agreement.php: Agreement file "."agreement_".$lng->lang_default.".html"." has not been found (system language).");
$agreement = "./Customizing/global/agreement/".
"agreement_en.html";
}
if (file_exists($agreement))
{
if ($content = file($agreement))
{
foreach ($content as $key => $val)
{
$text .= trim(nl2br($val));
}
return $text;
}
}
return "<br />".$lng->txt("no_agreement_description")."<br /><br />";
}

+ Here is the caller graph for this function:

ilUserAgreement::ilUserAgreement ( )

Constructor public.

Definition at line 46 of file class.ilUserAgreement.php.

References $ilias.

{
global $ilias;
$this->ilias = &$ilias;
}

Field Documentation

ilUserAgreement::$ilias

Definition at line 39 of file class.ilUserAgreement.php.

Referenced by _getText(), and ilUserAgreement().


The documentation for this class was generated from the following file: