fixes #1215. Currently, the server throws a "cannot convert null to int"-error on the stats page, when no student has watched any vod or stream of this course yet. This is because there is no entry in the database referring to this specific course.
Description
Null check in SQL, returns 0 instead of null.
Steps for Testing
Prerequisites:
default testing database
Steps:
Before applying changes, go to http://localhost:8081/admin/course/1/stats. See that the "Vod Views" and "Live Views" show a loading indicator and a server error is thrown as described in issue.
Apply change
Reload, note that 0 is shown instead of loading indicator and no error is thrown.
Motivation and Context
fixes #1215. Currently, the server throws a "cannot convert null to int"-error on the stats page, when no student has watched any vod or stream of this course yet. This is because there is no entry in the database referring to this specific course.
Description
Null check in SQL, returns 0 instead of null.
Steps for Testing
Prerequisites: default testing database
Steps: