Get session URL when user is subscribed - refs BT#10175

1.10.x
Angel Fernando Quiroz Campos 9 years ago
parent 19b20a440a
commit 4bd87fe82b
  1. 11
      plugin/advanced_subscription/src/AdvancedSubscriptionPlugin.php

@ -1087,6 +1087,17 @@ class AdvancedSubscriptionPlugin extends Plugin implements HookPluginInterface
*/
public function getOpenSessionUrl($userId, $params)
{
$userIsSubscribed = SessionManager::isUserSubscribedAsStudent(
$params['session_id'],
$userId
);
if ($userIsSubscribed) {
return api_get_path(WEB_CODE_PATH)
. 'session/index.php?session_id='
. intval($params['session_id']);
}
$params['secret_key'] = null;
$params['user_id'] = null;
$params['user_field'] = null;

Loading…
Cancel
Save