diff --git a/src/CourseBundle/EventListener/CourseListener.php b/src/CourseBundle/EventListener/CourseListener.php
index 1cb9536079..d22afb98bc 100644
--- a/src/CourseBundle/EventListener/CourseListener.php
+++ b/src/CourseBundle/EventListener/CourseListener.php
@@ -102,7 +102,7 @@ class CourseListener
if (empty($sessionId)) {
$sessionHandler->remove('session_name');
$sessionHandler->remove('sid');
- $sessionHandler->remove('sessionObj');
+ $sessionHandler->remove('session');
// Check if user is allowed to this course
// See CourseVoter.php
if (false === $checker->isGranted(CourseVoter::VIEW, $course)) {
@@ -293,8 +293,8 @@ class CourseListener
$sessionHandler->remove('_real_cid');
$sessionHandler->remove('_course');
$sessionHandler->remove('_locale_course');
- $sessionHandler->remove('courseObj');
- $sessionHandler->remove('sessionObj');
+ $sessionHandler->remove('course');
+ $sessionHandler->remove('session');
$sessionHandler->remove('course_url_params');
$sessionHandler->remove('origin');
diff --git a/src/ThemeBundle/Resources/views/Resource/index.html.twig b/src/ThemeBundle/Resources/views/Resource/index.html.twig
index 17511c3773..500fe05876 100644
--- a/src/ThemeBundle/Resources/views/Resource/index.html.twig
+++ b/src/ThemeBundle/Resources/views/Resource/index.html.twig
@@ -4,15 +4,15 @@
{% if is_granted('EDIT', course) %}
+ href="{{ url('chamilo_core_resource_new_folder', {'tool': tool, 'type': type, 'cid': course.id, 'sid': session.id, 'id': id }) }}">
{{ 'New folder' | trans }}
+ href="{{ url('chamilo_core_resource_new', { 'tool': tool, 'type': type, 'cid': course.id, 'sid': session.id, 'id': id }) }}">
{{ 'Create new document' | trans }}
+ href="{{ url('chamilo_core_resource_upload', { 'tool': tool, 'type': type, 'cid': course.id, 'sid': session.id, 'id': id }) }}">
{{ 'Upload' | trans }}
diff --git a/src/ThemeBundle/Resources/views/Resource/preview.html.twig b/src/ThemeBundle/Resources/views/Resource/preview.html.twig
index bbe4456a83..6cec2d810f 100644
--- a/src/ThemeBundle/Resources/views/Resource/preview.html.twig
+++ b/src/ThemeBundle/Resources/views/Resource/preview.html.twig
@@ -12,7 +12,7 @@
'chamilo_core_resource_view', {
'id': resource.resourceNode.id,
'cid': course.id,
- 'sid': sessionObj.id,
+ 'sid': session.id,
'type' : type,
'tool' : tool,
'filter' : 'resource_show_preview'
@@ -27,7 +27,7 @@
href="{{ url('chamilo_core_resource_view', {
'id': resource.resourceNode.id,
'cid': course.id,
- 'sid': sessionObj.id,
+ 'sid': session.id,
'type' : type,
'tool' : tool,
'mode' : 'download'
diff --git a/src/ThemeBundle/Resources/views/Resource/show.html.twig b/src/ThemeBundle/Resources/views/Resource/show.html.twig
index 7370ac2f4a..093881d265 100644
--- a/src/ThemeBundle/Resources/views/Resource/show.html.twig
+++ b/src/ThemeBundle/Resources/views/Resource/show.html.twig
@@ -8,7 +8,7 @@