mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #68365
[Bug 2004852] [NEW] LTI grading not working for some locales
Public bug reported:
With a LTI to a Moodle instance, when the teachers grades a submission,
the grade is not sent to Moodle in some cases. I think it has to do with
my server's locale set to french. The grade of 94%, for example, si
translated to 0,94 instead of 0.94.
I printed some debug and was able to see the error "Score must be
numeric". I also printed the xml from the $body variable (see
attachment).
I made a few changes in function publish_lti_outcome of
htdocs/module/lti/lib.php around line 1001 and it now works correctly.
$grade = $this->grade / 100;
$grade = str_replace(',', '.', $grade);
$smarty->assign('score', $grade);
This was tested with Mahara 22.10 and Moodle 3.11.
** Affects: mahara
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/2004852
Title:
LTI grading not working for some locales
Status in Mahara:
New
Bug description:
With a LTI to a Moodle instance, when the teachers grades a
submission, the grade is not sent to Moodle in some cases. I think it
has to do with my server's locale set to french. The grade of 94%, for
example, si translated to 0,94 instead of 0.94.
I printed some debug and was able to see the error "Score must be
numeric". I also printed the xml from the $body variable (see
attachment).
I made a few changes in function publish_lti_outcome of
htdocs/module/lti/lib.php around line 1001 and it now works correctly.
$grade = $this->grade / 100;
$grade = str_replace(',', '.', $grade);
$smarty->assign('score', $grade);
This was tested with Mahara 22.10 and Moodle 3.11.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/2004852/+subscriptions
Follow ups
-
[Bug 2004852] Re: LTI 1.1 grading not working for some locales
From: Kristina Hoeppner, 2023-05-15
-
[Bug 2004852] Re: LTI 1.1 grading not working for some locales
From: Robert Lyon, 2023-05-01
-
[Bug 2004852] Re: LTI 1.1 grading not working for some locales
From: Doris Tam, 2023-05-01
-
[Bug 2004852] Re: LTI 1.1 grading not working for some locales
From: Robert Lyon, 2023-04-30
-
[Bug 2004852] Re: LTI 1.1 grading not working for some locales
From: Robert Lyon, 2023-04-30
-
[Bug 2004852] A change has been merged
From: Mahara Bot, 2023-02-15
-
[Bug 2004852] Re: LTI 1.1 grading not working for some locales
From: Robert Lyon, 2023-02-15
-
[Bug 2004852] A change has been merged
From: Mahara Bot, 2023-02-15
-
[Bug 2004852] A change has been merged
From: Mahara Bot, 2023-02-15
-
[Bug 2004852] A patch has been submitted for review
From: Mahara Bot, 2023-02-14
-
[Bug 2004852] A patch has been submitted for review
From: Mahara Bot, 2023-02-14
-
[Bug 2004852] A patch has been submitted for review
From: Mahara Bot, 2023-02-14
-
[Bug 2004852] A change has been merged
From: Mahara Bot, 2023-02-14
-
[Bug 2004852] Re: LTI 1.1 grading not working for some locales
From: Robert Lyon, 2023-02-14
-
[Bug 2004852] Re: LTI 1.1 grading not working for some locales
From: Marie-Eve Lévesque, 2023-02-09
-
[Bug 2004852] Re: LTI 1.1 grading not working for some locales
From: Gold, 2023-02-09
-
[Bug 2004852] A patch has been submitted for review
From: Mahara Bot, 2023-02-08
-
[Bug 2004852] Re: LTI 1.1 grading not working for some locales
From: Gold, 2023-02-06
-
[Bug 2004852] Re: LTI grading not working for some locales
From: Kristina Hoeppner, 2023-02-06
-
[Bug 2004852] Re: LTI grading not working for some locales
From: Marie-Eve Lévesque, 2023-02-03