(1) Exclude empty grades
This is the method we usually recommend. It gives your students a consistent running total for their grades based on the number of points they have attempted at a specific point in time. It works well for instructors who keep their grades updated in Moodle throughout the term, and it tends to be preferred by most students. For this to properly calculate, the instructor must fill in a zero point (0) for every assignment that was not, or will not be give credit in order to count against the student. This is why percentages can appear artificially inflated if each grade item does not have a numerical value and shows a dash (-).
(2) Include empty grades
This method works well if an instructor doesn't wish to enter in a zero grade as Moodle treats each empty grade as a 0; however, students do not receive an accurate grade percentage displayed in Moodle until the end of the term. As you can imagine, this can cause problems (and sometimes panic!) as students do not have an accurate idea of where they stand in the course.
Both methods must be fully understood by the instructor, and grades should be regularly updated as doing so will best benefit the student.