Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle structured drag and drop #118

Open
darrensiegel opened this issue Jan 6, 2023 · 0 comments
Open

Handle structured drag and drop #118

darrensiegel opened this issue Jan 6, 2023 · 0 comments
Assignees

Comments

@darrensiegel
Copy link
Contributor

The Discrete Math Primer course includes a drag and drop activity whose layout file structure the course digest tool does not support. We need to extend the digest tool to detect instances of these layout files and convert them to the Torus drag and drop questions.

In this branch of the course:

https://svn.oli.cmu.edu/svn/content/principles_of_computing/discrete_math_primer/branches/v_1_7-echo

In this file:

content/x-oli-inline-assessment/simplifyinged910f36bd6f4ded910db99c90244fd3.xml

You will see the first question has in its stem:

<body>
                <p id="de187e55735144589ded38de1bfca9f3">Practice completing a conversion of \(\neg
                    p \vee q) \wedge (p \vee \neg q)\) to a disjunction of conjunctions by dragging
                    and dropping each of the blue intermediate steps below into the correct order.</p>
                <custom id="d7076c00a1d54915bdbbd71cc0040632" type="javascript" logging="false"
                    src="../webcontent/DynaDrop/DynaDropHTML.js" width="100" height="100"
                    layout="../webcontent/DynaDrop/d7076c00a1d54915bdbbd71cc0040632_layout.xml">
                    <param name="showInputs">false</param>
                </custom>
            </body>

That layout file uses a different structure than other layout files:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dragdrop PUBLIC "-//Carnegie Mellon University//DTD Dynadrop Layout 3.8//EN" "http://oli.cmu.edu/dtd/oli_dynadrop_layout_1_0.dtd">
<dragdrop>
  <targetGroup>
    <contentRow>
      <text>
        <span fontWeight="normal" fontSize="12" fontStyle="normal" textDecoration="none">(¬p ∨ q) ∧ (p ∨ ¬q)</span>
      </text>
      <text>
        <span fontWeight="normal" fontSize="12" fontStyle="normal" textDecoration="none">Step 1</span>
      </text>
    </contentRow>
    <contentRow>
      <target assessmentId="b3d22ec525534709b3646746de8c7045" />
      <text>
        <span fontWeight="normal" fontSize="12" fontStyle="normal" textDecoration="none">Step 2</span>
      </text>
    </contentRow>
    <contentRow>
      <target assessmentId="c993e0722fc7463d9b4b88c741e33b99" />
      <text>
        <span fontWeight="normal" fontSize="12" fontStyle="normal" textDecoration="none">Step 3</span>
      </text>
    </contentRow>
    <contentRow>
      <target assessmentId="cdd17333e6d840ccb6c651037ddd03e5" />
      <text>
        <span fontWeight="normal" fontSize="12" fontStyle="normal" textDecoration="none">Step 4</span>
      </text>
    </contentRow>
    <contentRow>
      <target assessmentId="e67dc99b4e794842bfd606a83e25a688" />
      <text>
        <span fontWeight="normal" fontSize="12" fontStyle="normal" textDecoration="none">Step 5</span>
      </text>
    </contentRow>
    <contentRow>
      <text>
        <span fontWeight="normal" fontSize="12" fontStyle="normal" textDecoration="none">(p ∧ q) ∨ (¬p ∧ ¬q)</span>
      </text>
      <text>
        <span fontWeight="normal" fontSize="12" fontStyle="normal" textDecoration="none">Step 6</span>
      </text>
    </contentRow>
  </targetGroup>
  <initiatorGroup shuffle="false" useInitiatorMaxWidth="false">
    <initiator assessmentId="afa772fc8d9b4e5898eeba4fe73cf14a">
      <span fontSize="12" fontWeight="normal" fontStyle="normal" textDecoration="none">((¬p ∨ q) ∧ p) ∨ ((¬p ∨ q) ∧ ¬q)</span>
    </initiator>
    <initiator assessmentId="eae55509030b435ea0e44f3a9e83436e">
      <span fontSize="12" fontWeight="normal" fontStyle="normal" textDecoration="none">(¬p ∧ p) ∨ (q ∧ p) ∨ (¬p ∧ ¬q) ∨ (q ∧ ¬q)</span>
    </initiator>
    <initiator assessmentId="d42c071ba4204c5bb662249d37bfa3b7">
      <span fontSize="12" fontWeight="normal" fontStyle="normal" textDecoration="none">⊥ ∨ (q ∧ p) ∨ (¬p ∧ ¬q) ∨ ⊥</span>
    </initiator>
    <initiator assessmentId="fd2e597826b443b9b208fa1dcde63425">
      <span fontSize="12" fontWeight="normal" fontStyle="normal" textDecoration="none">(q ∧ p) ∨ (¬p ∧ ¬q)</span>
    </initiator>
  </initiatorGroup>
</dragdrop>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants