Skip to content

Commit 8b4b139

Browse files
Merge pull request #5737 from christianbeeznest/ofaj-21604-2
Internal: Fix session visibility and assignment import issues - refs BT#21604
2 parents d882386 + 2b5fac0 commit 8b4b139

File tree

7 files changed

+15
-14
lines changed

7 files changed

+15
-14
lines changed

assets/vue/components/assignments/TeacherAssignmentList.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
>
2727
<template #body="slotProps">
2828
<div class="flex items-center">
29-
<BaseIcon v-if="isAllowedToEdit && getSessionId(slotProps.data)" icon="session-star" size="small" class="mr-2" />
3029
{{ slotProps.data.title }}
3130
</div>
3231
</template>

public/main/course_description/course_description_controller.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ public function listing($history = false, $messages = [])
8585
'resourceNode' => $description->getResourceNode(),
8686
'sessionId' => $description->getFirstResourceLink()->getSession() ? $description->getFirstResourceLink()->getSession()->getId() : null,
8787
];
88+
$description_data['icon_session'] = api_get_session_image($description->getFirstResourceLink()->getSession()?->getId(), api_get_user_entity());
8889
$data['descriptions'][] = $description_data;
8990
}
9091

@@ -109,6 +110,8 @@ function confirmation(name) {
109110

110111
$actions = self::getToolbar();
111112

113+
114+
112115
$tpl = new Template(get_lang('Description'));
113116
$tpl->assign('listing', $data);
114117
$tpl->assign('is_allowed_to_edit', $is_allowed_to_edit);

public/main/forum/index.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,7 @@ function hidecontent(content){
345345
} else {
346346
}*/
347347
//$forumCategoryInfo['extra_fields'] = $forumCategory['extra_fields'];
348-
//$forumCategoryInfo['icon_session'] = api_get_session_image($categorySessionId, $_user['status']);
349-
$forumCategoryInfo['icon_session'] = '';
348+
$forumCategoryInfo['icon_session'] = api_get_session_image($forumCategory->getFirstResourceLink()->getSession()?->getId(), $user);
350349

351350
// Validation when belongs to a session
352351
$forumCategoryInfo['description'] = $forumCategory->getCatComment();
@@ -450,11 +449,11 @@ function hidecontent(content){
450449
}
451450
}*/
452451
// Validation when belongs to a session
453-
/*$forumInfo['icon_session'] = api_get_session_image(
454-
$forum->getSessionId(),
452+
$forumInfo['icon_session'] = api_get_session_image(
453+
$forum->getFirstResourceLink()->getSession()?->getId(),
455454
$user
456-
);*/
457-
$forumInfo['icon_session'] = '';
455+
);
456+
//$forumInfo['icon_session'] = '';
458457
if ('0' != $forum->getForumOfGroup()) {
459458
$forumOfGroup = $forum->getForumOfGroup();
460459
$my_all_groups_forum_name = $all_groups[$forumOfGroup]['name'] ?? null;

public/main/template/default/course_description/index.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<div>
99
{{ description.title }}
1010
{% if description.sessionId %}
11-
<i class="mdi mdi-star text-yellow-500"></i>
11+
{{ description.icon_session }}
1212
{% endif %}
1313
</div>
1414
{% if is_allowed_to_edit %}

src/CoreBundle/Controller/CourseController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ public function checkTermsAndConditionJson(
8585
];
8686

8787
if ($user && $user->hasRole('ROLE_STUDENT')
88-
&& 'true' === $settingsManager->getSetting('allow_terms_conditions')
89-
&& 'course' === $settingsManager->getSetting('load_term_conditions_section')
88+
&& 'true' === $settingsManager->getSetting('registration.allow_terms_conditions')
89+
&& 'course' === $settingsManager->getSetting('platform.load_term_conditions_section')
9090
) {
9191
$termAndConditionStatus = false;
9292
$extraValue = $extraFieldValuesRepository->findLegalAcceptByItemId($user->getId());

src/CoreBundle/Resources/views/Layout/vue_js_setup.html.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script>
2-
window.user = {{ user_json | raw }};
3-
window.access_url_id = {{ access_url_id }};
4-
window.languages = {{ languages_json | raw }};
2+
window.user = {{ user_json is defined ? user_json | raw : '{}' }};
3+
window.access_url_id = {{ access_url_id | default(1) }};
4+
window.languages = {{ languages_json is defined ? languages_json | raw : '{}' }};
55
{% if legacy_breadcrumb is defined %}
66
window.breadcrumb = {{ legacy_breadcrumb | raw }};
77
{% else %}

src/CourseBundle/Entity/CStudentPublication.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
)]
7171
#[ApiFilter(filterClass: CidFilter::class)]
7272
#[ApiFilter(filterClass: SidFilter::class)]
73-
class CStudentPublication extends AbstractResource implements ResourceInterface, ResourceShowCourseResourcesInSessionInterface, Stringable
73+
class CStudentPublication extends AbstractResource implements ResourceInterface, Stringable
7474
{
7575
#[Groups(['c_student_publication:write'])]
7676
public bool $addToGradebook = false;

0 commit comments

Comments
 (0)