How to pass models method value to Views

Side note - you should enclose your code between lines of three backticks -`, not single quotes. If you change your quotes, it’ll be formatted as you posted it.

Now, what you’re seeing is caused by:

StudentResult is a reference to the model and not a reference to an instance of the model.
If you want the total scores from result, the reference would be to result.get_total_scores.