XimeraProject / ximeraLatex

Author tools for creating Ximera activities
LaTeX Project Public License v1.3c
40 stars 35 forks source link

Fixed shuffle environment #51

Closed xronosuf closed 7 years ago

xronosuf commented 7 years ago

I fixed the shuffle environment so that it correctly pulls only the first question in the environment and suppresses the rest. It also correctly numbers other problems that follow, to avoid the suppressed problems from jumping the counter. Still remains to implement the shuffling code from javascript.

bartsnapp commented 7 years ago

Hi,

Can you explain how it was "broken?"

To suppress the other exercises/problems/ etc, use the documentclass option "handout"

-Bart

On Dec 5, 2016 5:03 PM, "XronosUF" notifications@github.com wrote:

I fixed the shuffle environment so that it correctly pulls only the first question in the environment and suppresses the rest. It also correctly numbers other problems that follow, to avoid the suppressed problems from jumping the counter. Still remains to implement the shuffling code from javascript.

You can view, comment on, or merge this pull request online at:

https://github.com/XimeraProject/ximeraLatex/pull/51 Commit Summary

  • reallytrying
  • test
  • debug text
  • debug
  • debug
  • debug
  • It works!
  • Shuffle Code Implemented
  • Fixed Shuffle and Environment Numbering

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/XimeraProject/ximeraLatex/pull/51, or mute the thread https://github.com/notifications/unsubscribe-auth/ABUBv6l5PjkrQcOgEvEOOexE_PAQNaHwks5rFIongaJpZM4LExAm .

xronosuf commented 7 years ago

Hey!

The environment Shuffle was defined in the ximera.cls, but then renewed into a blank environment in ximra.4ht. This appears to be an artifact of changing over the ConfigEnv command to apply to a lot of environments (like problem, exercise, etc) and then using the same command for Shuffle, which is a fundamentally different style environment so it was being configured improperly.

As a result, the options were eliminated before they would take effect. Using the parameter [handout] in the activity document is necessary for the logic checks, but this didn't help this as the logic checks were all in the .cls file, which were eliminated by the renew environment in the 4ht file.

To fix this, I transferred over the code to the .4ht file, but when I did so the logic checks for the numbering were slightly off. Specifically they would either not number the first problem, or number the first problem as 2 and iterate from there. I adjusted them to correct for the numbering issue.

To clarify: The shuffle environment was broken, but the problem/exercise/etc environments also lost all the shuffle related code. The majority of code changes were re-adding the shuffle code to the various question environments in the .4ht file with the shuffle logic check to make sure they were properly configured to detect and utilize the shuffle environment.

xronosuf commented 7 years ago

UF Syle files have been uploaded as well. There is an instruction file included, but in short the style files should support the manipulation, filtering, and permutation of very large banks of questions.

Our current question bank is approximately 325,000 (unique) questions. Using this system we can filter and select 10 problems from the database in about 20 seconds on a typical laptop.

bartsnapp commented 7 years ago

I was unable to merge this without conflicts. Email me directly and maybe we can make it work.