MDL-47494 ddmarker: OU-2488 Improved English in coordinate validation error messages.
This commit is contained in:
@@ -65,11 +65,14 @@ $string['refresh'] = 'Refresh preview';
|
||||
$string['clearwrongparts'] = 'Move incorrectly placed markers back to default start position below image';
|
||||
$string['shape'] = 'Shape';
|
||||
$string['shape_circle'] = 'Circle';
|
||||
$string['shape_circle_coords'] = 'centerx, centery; radius';
|
||||
$string['shape_circle_lowercase'] = 'circle';
|
||||
$string['shape_circle_coords'] = 'x,y;r (where x,y are the xy coordinates of the center of the circle and r is the radius)';
|
||||
$string['shape_rectangle'] = 'Rectangle';
|
||||
$string['shape_rectangle_coords'] = 'leftx, topy; width, height';
|
||||
$string['shape_rectangle_lowercase'] = 'rectangle';
|
||||
$string['shape_rectangle_coords'] = 'x,y;w,h (where x,y are the xy coordinates of the top left corner of the rectangle and w and h are the width and height of the rectangle)';
|
||||
$string['shape_polygon'] = 'Polygon';
|
||||
$string['shape_polygon_coords'] = 'x1,y1;x2,y2;x3,y3;x4,y4....';
|
||||
$string['shape_polygon_lowercase'] = 'polygon';
|
||||
$string['shape_polygon_coords'] = 'x1,y1;x2,y2;x3,y3;x4,y4....(where x1, y1 are the x,y coordinates of the first vertex, x2, y2 are the x,y coordinates of the second, etc. You do not need to repeat the coordinates for the first vertex to close the polygon)';
|
||||
$string['showmisplaced'] = 'Highlight drop zones which have not had the correct marker dropped on them';
|
||||
$string['shuffleimages'] = 'Shuffle drag items each time question is attempted';
|
||||
$string['stateincorrectlyplaced'] = 'State which markers are incorrectly placed';
|
||||
|
||||
@@ -67,7 +67,7 @@ abstract class qtype_ddmarker_shape {
|
||||
public function get_coords_interpreter_error() {
|
||||
if ($this->error) {
|
||||
$a = new stdClass();
|
||||
$a->shape = self::human_readable_name();
|
||||
$a->shape = self::human_readable_name(true);
|
||||
$a->coordsstring = self::human_readable_coords_format();
|
||||
return get_string('formerror_'.$this->error, 'qtype_ddmarker', $a);
|
||||
} else {
|
||||
@@ -87,8 +87,12 @@ abstract class qtype_ddmarker_shape {
|
||||
|
||||
protected static $classnameprefix = 'qtype_ddmarker_shape_';
|
||||
|
||||
public static function human_readable_name() {
|
||||
return get_string('shape_'.self::name(), 'qtype_ddmarker');
|
||||
public static function human_readable_name($lowercase = false) {
|
||||
$stringid = 'shape_'.self::name();
|
||||
if ($lowercase) {
|
||||
$stringid .= '_lowercase';
|
||||
}
|
||||
return get_string($stringid, 'qtype_ddmarker');
|
||||
}
|
||||
|
||||
public static function human_readable_coords_format() {
|
||||
|
||||
Reference in New Issue
Block a user