Skip to content

Commit

Permalink
Merge pull request #342 from oat-sa/feat/TR-4839/ruby-make-inline_legacy
Browse files Browse the repository at this point in the history
Legacy: Allow ruby tag be possible to add on InlineColletions
  • Loading branch information
kilatib authored Nov 10, 2022
2 parents 9378bc2 + 2bf76e0 commit aa9cba8
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 16 deletions.
4 changes: 1 addition & 3 deletions qtism/data/content/xhtml/html5/Figcaption.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@

namespace qtism\data\content\xhtml\html5;

use qtism\data\content\FlowStatic;

class Figcaption extends Html5LayoutElement implements FlowStatic
class Figcaption extends Html5LayoutElement
{
public const QTI_CLASS_NAME_FIGCAPTION = 'figcaption';

Expand Down
5 changes: 3 additions & 2 deletions qtism/data/content/xhtml/html5/Figure.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@

namespace qtism\data\content\xhtml\html5;

use qtism\data\content\FlowStatic;
use qtism\data\content\Inline;
use qtism\data\content\TextOrVariable;

/**
* The XHTML figure class.
*/
class Figure extends Html5LayoutElement implements FlowStatic
class Figure extends Html5LayoutElement implements Inline, TextOrVariable
{
public const QTI_CLASS_NAME_FIGURE = 'figure';

Expand Down
4 changes: 1 addition & 3 deletions qtism/data/content/xhtml/html5/Rb.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@

namespace qtism\data\content\xhtml\html5;

use qtism\data\content\FlowStatic;

class Rb extends Html5LayoutElement implements FlowStatic
class Rb extends Html5LayoutElement
{
public const QTI_CLASS_NAME = 'rb';

Expand Down
4 changes: 1 addition & 3 deletions qtism/data/content/xhtml/html5/Rp.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@

namespace qtism\data\content\xhtml\html5;

use qtism\data\content\FlowStatic;

class Rp extends Html5LayoutElement implements FlowStatic
class Rp extends Html5LayoutElement
{
public const QTI_CLASS_NAME = 'rp';

Expand Down
4 changes: 1 addition & 3 deletions qtism/data/content/xhtml/html5/Rt.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@

namespace qtism\data\content\xhtml\html5;

use qtism\data\content\FlowStatic;

class Rt extends Html5LayoutElement implements FlowStatic
class Rt extends Html5LayoutElement
{
public const QTI_CLASS_NAME = 'rt';

Expand Down
8 changes: 6 additions & 2 deletions qtism/data/content/xhtml/html5/Ruby.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@

namespace qtism\data\content\xhtml\html5;

use qtism\data\content\FlowStatic;
use qtism\data\content\Inline;
use qtism\data\content\InlineStatic;
use qtism\data\content\TextOrVariable;

class Ruby extends Html5LayoutElement implements FlowStatic
class Ruby extends Html5LayoutElement implements Inline, TextOrVariable, InlineStatic
{
public const QTI_CLASS_NAME = 'ruby';

Expand All @@ -33,3 +35,5 @@ public function getQtiClassName()
return self::QTI_CLASS_NAME;
}
}


2 changes: 2 additions & 0 deletions qtism/data/storage/xml/marshalling/GapChoiceMarshaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
use DOMElement;
use InvalidArgumentException;
use qtism\data\content\FlowStaticCollection;
use qtism\data\content\xhtml\html5\Ruby;
use qtism\data\QtiComponent;
use qtism\data\QtiComponentCollection;
use qtism\data\ShowHide;
Expand Down Expand Up @@ -65,6 +66,7 @@ class GapChoiceMarshaller extends ContentMarshaller
'textRun',
'tt',
'var',
Ruby::QTI_CLASS_NAME
];

/**
Expand Down

0 comments on commit aa9cba8

Please sign in to comment.