Use Grading or Pass Fail labels instead of Marks percentages

In this tip, we’ll change the reference to Course marks to Grades or Pass Fail status only. We’ve added filters in the theme which allow us to set custom grading system for specific courses or all courses. Here’s how we can do it :

1. Go to WP Admin -> Plugins -> Editor -> WPLMS Customizer -> customizer_class.php

2. Add the following line of code in the function _construct function :

PHP Code:

3 a. for PASS/FAIL STATUS : Add the following code in the class :

PHP Code:


3 b. for GRADING : Add the following code in the class :

PHP Code:

$marks_html is of the format 30/100 where 30 is the marks in the course

The grade array signifies grades as follow: 100-80 : Grade A, 80-60 : Grade B, 60-40 : Grade C, 40-0 : Grade D

Note: It requires WPLMS version 1.7.2 and above.

Was this article helpful?

Related Articles