~ubuntu-branches/ubuntu/trusty/moodle/trusty

« back to all changes in this revision

Viewing changes to lib/completionlib.php

  • Committer: Package Import Robot
  • Author(s): Thijs Kinkhorst
  • Date: 2014-01-21 13:40:52 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20140121134052-ym2qvsp2cd9vq0p6
Tags: 2.5.4-1
* New upstream release, fixing security issues:
  - MSA-14-0001 Config passwords visibility issue [CVE-2014-0008]
  - MSA-14-0002 Group constraints lacking in "login as" [CVE-2014-0009]
  - MSA-14-0003 CSRF vulnerability in profile fields [CVE-2014-0010]
* Move /var/lib/moodle directory into package.
* Revert back to bundled yui3. Unfortunately, version in Debian and
  of upstream are not compatible (closes: #735312).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1264
1264
     * @return int Completion state e.g. COMPLETION_INCOMPLETE
1265
1265
     */
1266
1266
    public static function internal_get_grade_state($item, $grade) {
1267
 
        if (!$grade) {
 
1267
        // If no grade is supplied or the grade doesn't have an actual value, then
 
1268
        // this is not complete.
 
1269
        if (!$grade || (is_null($grade->finalgrade) && is_null($grade->rawgrade))) {
1268
1270
            return COMPLETION_INCOMPLETE;
1269
1271
        }
 
1272
 
1270
1273
        // Conditions to show pass/fail:
1271
1274
        // a) Grade has pass mark (default is 0.00000 which is boolean true so be careful)
1272
1275
        // b) Grade is visible (neither hidden nor hidden-until)