Skip to content

Commit 216fd7d

Browse files
committed
Plugin: LTI: Fix message when replying tool in session courses
1 parent a6ce8fb commit 216fd7d

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

plugin/ims_lti/lang/english.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,4 @@
7575
$strings['AddInCourses'] = 'Add in courses';
7676
$strings['AddInAllCourses'] = 'Add in all courses';
7777
$strings['AddInSessions'] = 'Add in sessions';
78+
$strings["BaseToolsCanBeAddedInSessionsOnly"] = "Base tools can be added in sessions only";

plugin/ims_lti/lang/french.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,4 @@
7575
$strings['AddInCourses'] = 'Ajouter aux cours';
7676
$strings['AddInAllCourses'] = 'Ajouter à tous les cours';
7777
$strings['AddInSessions'] = 'Ajouter aux sessions';
78+
$strings["BaseToolsCanBeAddedInSessionsOnly"] = "Base tools can be added in sessions only";

plugin/ims_lti/lang/spanish.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,4 @@
7575
$strings['AddInCourses'] = 'Añadir a cursos';
7676
$strings['AddInAllCourses'] = 'Aãndir a todos los cursos';
7777
$strings['AddInSessions'] = 'Añadir a sesiones';
78+
$strings["BaseToolsCanBeAddedInSessionsOnly"] = "Base tools can be added in sessions only";

plugin/ims_lti/multiply_session.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@
3232
}
3333

3434
if ($tool->getParent()) {
35-
throw new Exception($plugin->get_lang('NoAllowed'));
35+
throw new Exception($plugin->get_lang('BaseToolsCanBeAddedInSessionsOnly'));
3636
}
3737

3838
$session = api_get_session_entity($sessionId);
3939

4040
if (!$session) {
41-
api_not_allowed(true);
41+
throw new Exception(get_lang('SessionNotFound'));
4242
}
4343

4444
$content = '';

plugin/ims_lti/session.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
}
3232

3333
if ($tool->getParent()) {
34-
throw new Exception($plugin->get_lang('NoAllowed'));
34+
throw new Exception($plugin->get_lang('BaseToolsCanBeAddedInSessionsOnly'));
3535
}
3636

3737
$content = '';
@@ -60,7 +60,7 @@
6060

6161
if (!$formValues['sessions']) {
6262
Display::addFlash(
63-
Display::return_message($plugin->get_lang('NeedToSelectASession'), 'error', false)
63+
Display::return_message(get_lang('SessionNotFound'), 'error', false)
6464
);
6565
header('Location:'.api_get_self());
6666
exit;

0 commit comments

Comments
 (0)