Getting maxscore while creating content or onload the activity
Submitted by samchinnu on Thu, 10/20/2022 - 08:37
Forums:
Hi,
Is it possible to calculate max score when creating the content with the editor or during viewing the content before submiting the answer.
What i need to achieve from my end is i need to send total score of the activity so student can see total score.
otacke
Thu, 10/20/2022 - 17:56
Permalink
Hi!The maximum score is not
Hi!
The maximum score is not available when creating the content, but when the content is viewed (see getMaxScore function, should be implemented by most to all contents that deal with scores).
Best,
Oliver
samchinnu
Fri, 10/21/2022 - 07:42
Permalink
Hi
Yeah but for some contants getMaxScore is not available. For that what we need to do?
otacke
Fri, 10/21/2022 - 11:16
Permalink
If `getMaxScore` is not
If `getMaxScore` is not available, then either that content type does not generate scores at all and and thus does not need that function or the author did not implement that function. In the latter case, you'd have to implement that function and create a pull-request.