Skip to content

Commit

Permalink
MDL-47494 ddimageortext: Fix import/export and unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
timhunt authored and jamiepratt committed Dec 9, 2011
1 parent 6c6fc62 commit 48b3936
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions question/type/ddimageortext/question.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ class qtype_ddimageortext_drag_item {
public $text;
public $no;
public $group;
public $isinfinite;
public $infinite;

public function __construct($alttextlabel, $no, $group = 1, $isinfinite = false, $id = 0) {
public function __construct($alttextlabel, $no, $group = 1, $infinite = false, $id = 0) {
$this->id = $id;
$this->text = $alttextlabel;
$this->no = $no;
$this->group = $group;
$this->isinfinite = $isinfinite;
$this->infinite = $infinite;
}
public function choice_group() {
return $this->group;
Expand Down
3 changes: 2 additions & 1 deletion question/type/ddimageortext/questiontype.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,8 @@ public function import_from_xml($data, $question, $format, $extra=null) {
}

$format->import_combined_feedback($question, $data, true);
$format->import_hints($question, $data, true);
$format->import_hints($question, $data, true, false,
$format->get_format($question->questiontextformat));

return $question;
}
Expand Down
2 changes: 1 addition & 1 deletion question/type/ddimageortext/rendererbase.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function formulation_and_controls(question_attempt $qa,
'draghome',
"dragitemhomes{$dragimage->no}",
"choice{$choiceno}");
if ($dragimage->isinfinite) {
if ($dragimage->infinite) {
$classes[] = 'infinite';
}
if ($dragimageurl === null) {
Expand Down

0 comments on commit 48b3936

Please sign in to comment.