Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Public Attributes | List of all members
qtype_ddmarker_drop_zone Class Reference

Represents one of the places (drop zones). More...

Public Member Functions

 __construct ($no, $shape, $coords)
 Setup a drop zone object. More...
 
 correct_coords ()
 Gets the center point of this zone. More...
 
 drop_hit ($xy)
 Indicates if the it coordinates are in this drop zone. More...
 
 summarise ()
 Creates summary text of for the drop zone. More...
 

Public Attributes

array $coords
 Location of the item.
 
int $group = 1
 Group of the item.
 
int $no
 Number of the item.
 
object $shape
 Shape of the item.
 

Detailed Description

Represents one of the places (drop zones).

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

qtype_ddmarker_drop_zone::__construct (   $no,
  $shape,
  $coords 
)

Setup a drop zone object.

Parameters
int$noWhich number drop zone this is
int$shapeShape of the drop zone
array$coordsCoordinates of the zone

Member Function Documentation

◆ correct_coords()

qtype_ddmarker_drop_zone::correct_coords ( )

Gets the center point of this zone.

Return values
arrayX and Y location

◆ drop_hit()

qtype_ddmarker_drop_zone::drop_hit (   $xy)

Indicates if the it coordinates are in this drop zone.

Parameters
array$xyArray of X and Y location
Return values
bool

◆ summarise()

qtype_ddmarker_drop_zone::summarise ( )

Creates summary text of for the drop zone.

Return values
string

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