Skip to content

Commit

Permalink
Merge pull request #1 from ILIAS-eLearning/release_5-3
Browse files Browse the repository at this point in the history
Release 5 3
  • Loading branch information
Uwe Tesche authored Apr 3, 2019
2 parents 02f637a + 3fe7614 commit c814aad
Show file tree
Hide file tree
Showing 24 changed files with 176 additions and 7 deletions.
12 changes: 11 additions & 1 deletion Services/Authentication/classes/class.ilSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,17 @@ static function _writeData($a_session_id, $a_data)

if (ilSession::_exists($a_session_id))
{
$ilDB->update("usr_session", $fields,
// note that we do this only when inserting the new record
// updating may get us other contexts for the same session, especially ilContextWAC, which we do not want
if (class_exists("ilContext"))
{
if (ilContext::isSessionMainContext())
{
$fields["context"] = array("text", ilContext::getType());
}
}

$ilDB->update("usr_session", $fields,
array("session_id" => array("text", $a_session_id)));
}
else
Expand Down
10 changes: 10 additions & 0 deletions Services/Context/classes/class.ilContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,16 @@ public static function supportsPersistentSessions()
{
return (bool) self::callContext('supportsPersistentSessions');
}

/**
* Context that are not only temporary in a session (e.g. WAC is, Cron is not)
*
* @return bool
*/
public static function isSessionMainContext()
{
return (bool) self::callContext('isSessionMainContext');
}
}

?>
8 changes: 8 additions & 0 deletions Services/Context/classes/class.ilContextApacheSSO.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ public static function supportsPushMessages()
return false;
}

/**
* @inheritdoc
*/
public static function isSessionMainContext()
{
return false;
}

}

?>
8 changes: 8 additions & 0 deletions Services/Context/classes/class.ilContextCron.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ public static function supportsPushMessages()
return false;
}

/**
* @inheritdoc
*/
public static function isSessionMainContext()
{
return true;
}

}

?>
8 changes: 8 additions & 0 deletions Services/Context/classes/class.ilContextIcal.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ public static function supportsPushMessages()
return false;
}

/**
* @inheritdoc
*/
public static function isSessionMainContext()
{
return true;
}

}

?>
8 changes: 8 additions & 0 deletions Services/Context/classes/class.ilContextLTIProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,13 @@ public static function supportsPushMessages()
return false;
}

/**
* @inheritdoc
*/
public static function isSessionMainContext()
{
return false;
}

}
?>
8 changes: 8 additions & 0 deletions Services/Context/classes/class.ilContextRest.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,14 @@ public static function supportsPushMessages()
return false;
}

/**
* @inheritdoc
*/
public static function isSessionMainContext()
{
return true;
}

}

?>
8 changes: 8 additions & 0 deletions Services/Context/classes/class.ilContextRss.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,14 @@ public static function supportsPushMessages()
return false;
}

/**
* @inheritdoc
*/
public static function isSessionMainContext()
{
return true;
}

}

?>
8 changes: 8 additions & 0 deletions Services/Context/classes/class.ilContextRssAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,14 @@ public static function supportsPushMessages()
return false;
}

/**
* @inheritdoc
*/
public static function isSessionMainContext()
{
return true;
}

}

?>
8 changes: 8 additions & 0 deletions Services/Context/classes/class.ilContextSaml.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,12 @@ public static function supportsPushMessages()
return false;
}

/**
* @inheritdoc
*/
public static function isSessionMainContext()
{
return false;
}

}
8 changes: 8 additions & 0 deletions Services/Context/classes/class.ilContextScorm.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ public static function supportsPushMessages()
return false;
}

/**
* @inheritdoc
*/
public static function isSessionMainContext()
{
return false;
}

}

?>
8 changes: 8 additions & 0 deletions Services/Context/classes/class.ilContextSessionReminder.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ public static function supportsPushMessages()
return false;
}

/**
* @inheritdoc
*/
public static function isSessionMainContext()
{
return false;
}

}

?>
9 changes: 9 additions & 0 deletions Services/Context/classes/class.ilContextShibboleth.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,15 @@ public static function supportsPushMessages()
return false;
}

/**
* @inheritdoc
*/
public static function isSessionMainContext()
{
return false;
}


}

?>
8 changes: 8 additions & 0 deletions Services/Context/classes/class.ilContextSoap.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ public static function supportsPushMessages()
return false;
}

/**
* @inheritdoc
*/
public static function isSessionMainContext()
{
return true;
}

}

?>
8 changes: 8 additions & 0 deletions Services/Context/classes/class.ilContextSoapNoAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,12 @@ public static function supportsPushMessages()
return false;
}

/**
* @inheritdoc
*/
public static function isSessionMainContext()
{
return true;
}

}
8 changes: 8 additions & 0 deletions Services/Context/classes/class.ilContextSoapWithoutClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ public static function supportsPushMessages()
return false;
}

/**
* @inheritdoc
*/
public static function isSessionMainContext()
{
return true;
}

}

?>
8 changes: 8 additions & 0 deletions Services/Context/classes/class.ilContextUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ public static function supportsPushMessages()
return false;
}

/**
* @inheritdoc
*/
public static function isSessionMainContext()
{
return true;
}

}

?>
8 changes: 8 additions & 0 deletions Services/Context/classes/class.ilContextWAC.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ public static function supportsPushMessages()
return false;
}

/**
* @inheritdoc
*/
public static function isSessionMainContext()
{
return false;
}

}

?>
8 changes: 8 additions & 0 deletions Services/Context/classes/class.ilContextWeb.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ public static function supportsPushMessages()
return true;
}

/**
* @inheritdoc
*/
public static function isSessionMainContext()
{
return true;
}

}

?>
8 changes: 8 additions & 0 deletions Services/Context/classes/class.ilContextWebdav.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ public static function supportsPushMessages()
return false;
}

/**
* @inheritdoc
*/
public static function isSessionMainContext()
{
return true;
}

}

?>
8 changes: 8 additions & 0 deletions Services/Context/interfaces/interface.ilContextTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,12 @@ public static function supportsPersistentSessions();
*/
public static function supportsPushMessages();

/**
* Context that are not only temporary in a session (e.g. WAC is, Cron is not)
*
* @return bool
*/
public static function isSessionMainContext();


}
6 changes: 0 additions & 6 deletions Services/News/classes/class.ilNewsForContextBlockGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -689,12 +689,6 @@ function showNews()
$tpl->setVariable("VAL_CONTENT", $renderer->getDetailContent());
$tpl->parseCurrentBlock();
}
if (trim($item["content_long"]) != "") // long content
{
$tpl->setCurrentBlock("long");
$tpl->setVariable("VAL_LONG_CONTENT", $this->makeClickable($item["content_long"]));
$tpl->parseCurrentBlock();
}
if ($item["update_date"] != $item["creation_date"]) // update date
{
$tpl->setCurrentBlock("ni_update");
Expand Down
1 change: 1 addition & 0 deletions lang/ilias_de.lang
Original file line number Diff line number Diff line change
Expand Up @@ -11548,6 +11548,7 @@ skmg#:#skmg_usage_type_info_gen#:#Allgemeiner Gebrauch in Magazinobjekten
skmg#:#skmg_usage_type_info_mat#:#Benutzer haben Material zugeordnet
skmg#:#skmg_usage_type_info_user#:#Zuordnung zu Benutzern
skmg#:#skmg_usage_type_info_pers#:#Von Benutzern als persönliche Kompetenz ausgewählt
skmg#:#skmg_usage_type_info_seval#:#Selbsteinschätzungen
skmg#:#skmg_usage_type_info_prof#:#Nutzung in Kompetenzprofilen
skmg#:#skmg_usage_type_info_res#:#Zuordnung zu Magazinobjekten
skmg#:#skmg_usage_obj_objects#:#Objekt(e)
Expand Down
1 change: 1 addition & 0 deletions lang/ilias_en.lang
Original file line number Diff line number Diff line change
Expand Up @@ -11553,6 +11553,7 @@ skmg#:#skmg_usage_type_info_gen#:#General Use in Repository Objects
skmg#:#skmg_usage_type_info_mat#:#Users assigned material from their personal workspace
skmg#:#skmg_usage_type_info_user#:#Assigned to Users
skmg#:#skmg_usage_type_info_pers#:#Selected by Users as Personal Skill
skmg#:#skmg_usage_type_info_seval#:#Self Evaluations
skmg#:#skmg_usage_type_info_prof#:#Used in Skill Profiles
skmg#:#skmg_usage_type_info_res#:#Repository Objects Assigned as Suggested Resource
skmg#:#skmg_usage_obj_objects#:#Object(s)
Expand Down

0 comments on commit c814aad

Please sign in to comment.