Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
gradereport_summary\local\entities\grade_items Class Reference
Inheritance diagram for gradereport_summary\local\entities\grade_items:
core_reportbuilder\local\entities\base

Public Member Functions

 __construct (stdClass $course)
 Entity constructor.
 
 add_join (string $join)
 Add join clause required for this entity to join to existing tables/entities.
 
 add_joins (array $joins)
 Add multiple join clauses required for this entity {.
 
 get_column (string $name)
 Returns an entity column.
 
 get_columns ()
 Returns entity columns.
 
 get_condition (string $name)
 Returns an entity condition.
 
 get_conditions ()
 Returns entity conditions.
 
 get_entity_name ()
 Return entity name.
 
 get_entity_title ()
 Get entity title.
 
 get_filter (string $name)
 Returns an entity filter.
 
 get_filters ()
 Returns entity filters.
 
 get_joins ()
 Return entity joins.
 
 get_table_alias (string $tablename)
 Returns an alias used in the queries for a given table.
 
 get_table_aliases ()
 Returns aliases used in the queries for all tables.
 
 has_table_join_alias (string $tablename)
 Determine whether defined table join alias was specified.
 
 initialise ()
 Initialise the entity.
 
 set_entity_name (string $entityname)
 Set entity name.
 
 set_entity_title (lang_string $title)
 Set entity title.
 
 set_table_alias (string $tablename, string $alias)
 Override the default alias for given database table used in entity queries, for instance when the same table is used by multiple entities and you want them each to refer to it by the same alias.
 
 set_table_aliases (array $aliases)
 Override multiple default database table aliases used in entity queries as per {.
 
 set_table_join_alias (string $tablename, string $alias)
 Set the alias for given database table that has already been added to the report.
 

Public Attributes

stdClass $course
 Course.
 
grade_report_summary $report
 Grade report.
 
array $ungradedcounts
 Ungraded grade items counts with sql info.
 

Protected Member Functions

 add_column (column $column)
 Add a column to the entity.
 
 add_condition (filter $condition)
 Add a condition to the entity.
 
 add_filter (filter $filter)
 Add a filter to the entity.
 
 get_all_columns ()
 Returns list of all available columns.
 
 get_all_filters ()
 Return list of all available filters.
 
 get_default_entity_title ()
 The default title for this entity in the list of columns/conditions/filters in the report builder.
 
 get_default_table_aliases ()
 Database tables that this entity uses and their default aliases (note that these aliases are now ignored)
 
 get_default_tables ()
 Database tables that this entity uses.
 
 get_tag_joins_for_entity (string $component, string $itemtype, string $itemidfield)
 Helper method for returning joins necessary for retrieving tags related to the current entity.
 

Constructor & Destructor Documentation

◆ __construct()

gradereport_summary\local\entities\grade_items::__construct ( stdClass $course)

Entity constructor.

Parameters
stdClass$course

Member Function Documentation

◆ add_column()

core_reportbuilder\local\entities\base::add_column ( column $column)
finalprotectedinherited

Add a column to the entity.

Parameters
column$column
Return values
self

◆ add_condition()

core_reportbuilder\local\entities\base::add_condition ( filter $condition)
finalprotectedinherited

Add a condition to the entity.

Parameters
filter$condition
Return values
$this

◆ add_filter()

core_reportbuilder\local\entities\base::add_filter ( filter $filter)
finalprotectedinherited

Add a filter to the entity.

Parameters
filter$filter
Return values
self

◆ add_join()

core_reportbuilder\local\entities\base::add_join ( string $join)
finalinherited

Add join clause required for this entity to join to existing tables/entities.

Parameters
string$join
Return values
self

◆ add_joins()

core_reportbuilder\local\entities\base::add_joins ( array $joins)
finalinherited

Add multiple join clauses required for this entity {.

See also
add_join}
Parameters
string[]$joins
Return values
self

◆ get_all_columns()

gradereport_summary\local\entities\grade_items::get_all_columns ( )
protected

Returns list of all available columns.

Return values
column[]

◆ get_all_filters()

gradereport_summary\local\entities\grade_items::get_all_filters ( )
protected

Return list of all available filters.

Return values
filter[]

◆ get_column()

core_reportbuilder\local\entities\base::get_column ( string $name)
finalinherited

Returns an entity column.

Parameters
string$name
Return values
column
Exceptions
coding_exceptionFor invalid column name

◆ get_columns()

core_reportbuilder\local\entities\base::get_columns ( )
finalinherited

Returns entity columns.

Return values
column[]

◆ get_condition()

core_reportbuilder\local\entities\base::get_condition ( string $name)
finalinherited

Returns an entity condition.

Parameters
string$name
Return values
filter
Exceptions
coding_exceptionFor invalid condition name

◆ get_conditions()

core_reportbuilder\local\entities\base::get_conditions ( )
finalinherited

Returns entity conditions.

Return values
filter[]

◆ get_default_entity_title()

gradereport_summary\local\entities\grade_items::get_default_entity_title ( )
protected

The default title for this entity in the list of columns/conditions/filters in the report builder.

Return values
lang_string

Reimplemented from core_reportbuilder\local\entities\base.

◆ get_default_table_aliases()

core_reportbuilder\local\entities\base::get_default_table_aliases ( )
protectedinherited

Database tables that this entity uses and their default aliases (note that these aliases are now ignored)

Return values
string[]Array of $tablename => $alias
Deprecated
since Moodle 4.4 - aliases are now autogenerated, please implement {
See also
get_default_tables} instead

◆ get_default_tables()

gradereport_summary\local\entities\grade_items::get_default_tables ( )
protected

Database tables that this entity uses.

Return values
string[]

Reimplemented from core_reportbuilder\local\entities\base.

◆ get_entity_name()

core_reportbuilder\local\entities\base::get_entity_name ( )
finalinherited

Return entity name.

Return values
string

◆ get_entity_title()

core_reportbuilder\local\entities\base::get_entity_title ( )
finalinherited

Get entity title.

Return values
lang_string

◆ get_filter()

core_reportbuilder\local\entities\base::get_filter ( string $name)
finalinherited

Returns an entity filter.

Parameters
string$name
Return values
filter
Exceptions
coding_exceptionFor invalid filter name

◆ get_filters()

core_reportbuilder\local\entities\base::get_filters ( )
finalinherited

Returns entity filters.

Return values
filter[]

◆ get_joins()

core_reportbuilder\local\entities\base::get_joins ( )
finalinherited

Return entity joins.

Return values
string[]

◆ get_table_alias()

core_reportbuilder\local\entities\base::get_table_alias ( string $tablename)
finalinherited

Returns an alias used in the queries for a given table.

Parameters
string$tablenameOne of the tables set by {
See also
get_default_tables}
Return values
string
Exceptions
coding_exceptionFor invalid table name

◆ get_table_aliases()

core_reportbuilder\local\entities\base::get_table_aliases ( )
finalinherited

Returns aliases used in the queries for all tables.

Return values
string[]

◆ get_tag_joins_for_entity()

core_reportbuilder\local\entities\base::get_tag_joins_for_entity ( string $component,
string $itemtype,
string $itemidfield )
finalprotectedinherited

Helper method for returning joins necessary for retrieving tags related to the current entity.

Both 'tag' and 'tag_instance' aliases must be returned by the entity {

See also
get_default_tables} method
Parameters
string$component
string$itemtype
string$itemidfield
Return values
string[]

◆ has_table_join_alias()

core_reportbuilder\local\entities\base::has_table_join_alias ( string $tablename)
finalinherited

Determine whether defined table join alias was specified.

Call {

See also
get_table_alias} to retrieve said value
Parameters
string$tablename
Return values
bool

◆ initialise()

gradereport_summary\local\entities\grade_items::initialise ( )

Initialise the entity.

Return values
base

Reimplemented from core_reportbuilder\local\entities\base.

◆ set_entity_name()

core_reportbuilder\local\entities\base::set_entity_name ( string $entityname)
finalinherited

Set entity name.

Parameters
string$entityname
Return values
self

◆ set_entity_title()

core_reportbuilder\local\entities\base::set_entity_title ( lang_string $title)
finalinherited

Set entity title.

Parameters
lang_string$title
Return values
self

◆ set_table_alias()

core_reportbuilder\local\entities\base::set_table_alias ( string $tablename,
string $alias )
finalinherited

Override the default alias for given database table used in entity queries, for instance when the same table is used by multiple entities and you want them each to refer to it by the same alias.

Parameters
string$tablenameOne of the tables set by {
See also
get_default_tables}
Parameters
string$alias
Return values
self
Exceptions
coding_exceptionFor invalid table name

◆ set_table_aliases()

core_reportbuilder\local\entities\base::set_table_aliases ( array $aliases)
finalinherited

Override multiple default database table aliases used in entity queries as per {.

See also
set_table_alias}
Parameters
array$aliasesArray of tablename => alias values
Return values
self

◆ set_table_join_alias()

core_reportbuilder\local\entities\base::set_table_join_alias ( string $tablename,
string $alias )
finalinherited

Set the alias for given database table that has already been added to the report.

Enables entities to avoid additional joins on the same table by allowing re-use of existing table aliases in their own queries, {

See also
has_table_join_alias}
Parameters
string$tablename
string$alias
Return values
self

The documentation for this class was generated from the following file: