[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/availability/condition/grade/classes/ -> condition.php (summary)

Condition on grades of current user.

Copyright: 2014 The Open University
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 300 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

condition:: (10 methods):
  __construct()
  save()
  get_json()
  is_available()
  get_description()
  get_debug_string()
  get_cached_grade_name()
  get_cached_grade_score()
  update_after_restore()
  update_dependency_id()


Class: condition  - X-Ref

Condition on grades of current user.

__construct($structure)   X-Ref
Constructor.

param: \stdClass $structure Data structure from JSON decode

save()   X-Ref
No description

get_json($gradeitemid, $min = null, $max = null)   X-Ref
Returns a JSON object which corresponds to a condition of this type.

Intended for unit testing, as normally the JSON values are constructed
by JavaScript code.

param: int $gradeitemid Grade item id
param: number|null $min Min grade (or null if no min)
param: number|null $max Max grade (or null if no max)
return: stdClass Object representing condition

is_available($not, \core_availability\info $info, $grabthelot, $userid)   X-Ref
No description

get_description($full, $not, \core_availability\info $info)   X-Ref
No description

get_debug_string()   X-Ref
No description

get_cached_grade_name($courseid, $gradeitemid)   X-Ref
Obtains the name of a grade item, also checking that it exists. Uses a
cache. The name returned is suitable for display.

param: int $courseid Course id
param: int $gradeitemid Grade item id
return: string Grade name or empty string if no grade with that id

get_cached_grade_score($gradeitemid, $courseid,$grabthelot=false, $userid=0)   X-Ref
Obtains a grade score. Note that this score should not be displayed to
the user, because gradebook rules might prohibit that. It may be a
non-final score subject to adjustment later.

param: int $gradeitemid Grade item ID we're interested in
param: int $courseid Course id
param: bool $grabthelot If true, grabs all scores for current user on
param: int $userid Set if requesting grade for a different user (does
return: float Grade score as a percentage in range 0-100 (e.g. 100.0

update_after_restore($restoreid, $courseid, \base_logger $logger, $name)   X-Ref
No description

update_dependency_id($table, $oldid, $newid)   X-Ref
No description



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1