Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter billjojo

    (@billjojo)

    Dan,

    Oh, typo, my bad. I removed the pre tag and that does look much better!

    There are intentional line breaks in the choices, but without tags. The link will show a sample of how my book is written. The top (Test) is a sample bit of code displayed by PrismJS.

    Then in the Qwizcards example I show the question and the same code format for each choice. The choices are multiline answers that match the top two versions, but they are displaying flat and all on one line.

    I love the way this coming together and I think the line breaks in choices are the last piece.

    Thank you so much for your patience!

    Bill

    Thread Starter billjojo

    (@billjojo)

    Dan,

    This looks better! Again, apologies for the delay, been swamped with writing projects.

    If you look here: My Qwiz Test You will see that it is nearly perfect. The only issue right now is it does not preset line breaks. All of the answers would look like the top two.

    Thank you so much for your attention to this. My students love the embedded quizzes and you have been so responsive to my requests!

    Bill

    Thread Starter billjojo

    (@billjojo)

    Dan,

    I tried out Prismatic. Unfortunately it does not have all the pieces I need for my site. I have a customized Prism.js from their site plus some CSS I have added for formatting based on my textbook needs.

    I am also guilty in forgetting to escape all of my less-than and ampersands (like the docs say to!), so I have some personal cleanup I need to do throughout my site. (Ugh!)

    If need be, I could resort to simply pre tags, but I would prefer the colorization in the choices. ??

    Thank you for everything!
    Bill

    Thread Starter billjojo

    (@billjojo)

    Dan,
    Apologies for the delay. Got called away on another project.

    I am adding prism.js directly through my theme with:

    function add_prism()
    {
        wp_enqueue_style( 'prism-css',  get_stylesheet_directory_uri() . '/prism.css' );
        wp_enqueue_script( 'prism-js',  get_stylesheet_directory_uri() . '/prism.js', [], false, true );
    }
    add_action( 'wp_enqueue_scripts', 'add_prism' );

    I may have made a bad assumption with the Base64 encoding. When I look at the page source, this is what I see:

    [c]Cg==<pre class="language-java"><code>Zm9yICggaW50IGkgPSAxOyBpIA==<= 10; i++ )
      ia[i] = i * 3;</code></pre>Cg==[Qq][c]<code>Zm9yICggaW50IGkgPSAxOyBpIA==< 11; i++ )
      ia[i] = i * 3;</code></p>Cg==[Qq][c]<code>Zm9yICggaW50IG kgPSAwOyBpIA==< 10; i++ )
      ia[i] = i * 3;</code></p>Cg==[Qq][c]<code>Zm9yICggaW50IGkgPSAwOyBpIA==<= 10; i++ )
      ia[i] = i * 3;</code><br />CltmeF1ubw==</p>Cg==[Qq][x]The quiz is now complete. Click the button below to repeat this quiz.<br />

    I had assumed the plugin was producing the encoding (based on reading through the plugin source – which is rather voluminous! ?? ) when you are scanning the question text there are calls to base64_encode.

    Thank you for the update!

    Bill

    • This reply was modified 3 years, 6 months ago by billjojo.
    Thread Starter billjojo

    (@billjojo)

    Dan,

    Is there more testing we need to do?

    Thank you!

    Bill

    Thread Starter billjojo

    (@billjojo)

    Dan,

    Beta 2 looks much better!

    My test is a Quiz that uses a LOT of markup.

    Bill

    Thread Starter billjojo

    (@billjojo)

    Dan,

    Just rolled back to 3.56 and everything is as it was. The text is formatting correctly. (Sorry!)

    Bill

    Thread Starter billjojo

    (@billjojo)

    Dan,

    Apologies – I replied to the emails rather than posting here:

    Dan,
    
    This seems to fix the radio buttons. I noticed that if I have code tags in the question or answer, the whole question is in that format.
    
    Also, you mentioned paragraphs earlier. I am using the Classic Editor, so not sure if that is contributing in some way, but it has not been an issuing the past - only with the most recent update.
    
    If you try quiz 1:
    
    https://programmingby.design/java-book/chapter-3-objects-input-and-output/#quiz1
    
    You will notice the text all becomes mono-spaced, but this was only to be for the noted text:
    
    [qwiz style="width: 60%; min-height: 0px;" repeat_incorrect="false" random="true"]
    [h]Packages, Classes, Methods and Randomness
    [i]Answer all the questions by selecting the best possible answer.
    
    [q]Which of the following is not a valid java package?
    [c] <code>java.lang</code>
    [c*] <code>java.Scanner</code>
    [c] <code>java.util</code>
    [c] <code>javax.swing</code>
    [fx]The <code>Scanner</code> class is not a package.
    
    [q]Which of the following produces a random number in the range 1-10, inclusive?
    [c]<code>(int)(Math.random()*9+1)</code>
    [c*]<code>(int)(Math.random()*10+1)</code>
    [c]<code>(int)(Math.random()*11)</code>
    [c]<code>(int)(Math.random()*10)</code>
    [fx]When converted to <code>int</code>, the multiplier will produce a value in the range 0 to one less than the multiplier.
    
    [q]Which of the following produces a random number in the range 30-45, inclusive?
    [c]<code>(int)(Math.random()*30+15)</code>
    [c]<code>(int)(Math.random()*30+16)</code>
    [c*]<code>(int)(Math.random()*16+30)</code>
    [c]<code>(int)(Math.random()*15+30)</code>
    [fx]When converted to <code>int</code>, the multiplier will produce a value in the range 0 to one less than the multiplier. Then we add the offset.
    
    [q]The <code>Scanner</code> class is provided by which package?
    [c]<code>java.lang</code>
    [c]<code>javax.swing</code>
    [c*]<code>java.util</code>
    [c]None of the above.
    [fx]The <code>Scanner</code> class is available in the package <code>java.util</code>.
    
    [q]Which class is comprised primarily of static methods?
    [c*]<code>Math</code>
    [c]<code>System</code>
    [c]<code>String</code>
    [c]<code>Scanner</code>
    [fx]The <code>Math</code> class is comprised of all static methods.
    
    [q]The <code>System.in</code> reference variable points to which kind of object?
    [c*]<code>InputStream</code>
    [c]<code>PrintStream</code>
    [c]<code>String</code>
    [c]<code>Scanner</code>
    [fx]The <code>InputStream</code> object is our default input device.
    
    [q]The <code>System.out</code> reference variable points to which kind of object?
    [c]<code>InputStream</code>
    [c*]<code>PrintStream</code>
    [c]<code>String</code>
    [c]<code>Scanner</code>
    [fx]The <code>PrintStream</code> object is our default output device.
    
    [x]The quiz is now complete. Click the button below to repeat this quiz.
    [restart]
    [/qwiz]

    Dan,

    Something is definitely off with the text formatting. I cannot find a reason why this is so different. Do you have a 3.56 zip file handy? I am going to try rolling back using my backup and just pulling the directory tree.

    Bill

    Thread Starter billjojo

    (@billjojo)

    Dan,

    I also noticed the gap between question and list of choices seems larger. Not sure if that is related.

    Bill

    Thread Starter billjojo

    (@billjojo)

    Sa-Weet! I love the quick response!

    Bill

    Thread Starter billjojo

    (@billjojo)

    This quiz looks like the following:

    <h3 id="quiz1">Quiz 1</h3>
    [qwiz style="width: 60%; min-height: 0px;" repeat_incorrect="false" random="true"]
    [h] Components of the Language
    [i]Answer all the questions by selecting the best possible answer.
    
    [q] The rules that govern how the language is written are called:
    
    [c] semantics
    [c*] syntax
    [c] keywords
    [c] identifiers
    [fx] Rules governing the structure of how the language may written is known as <em>syntax</em>.
    
    [q] The meaning behind a written statement in any language is called:
    
    [c*] semantics
    [c] syntax
    [c] keywords
    [c] identifiers
    [fx] <em>Semantics</em> refers to the meaning behind the written text.
    
    [q] The Java language contains a small set of words that are used to describe the language. These are called:
    
    [c] methods
    [c] classes
    [c*] keywords
    [c] identifiers
    [fx] The set of <em>keywords</em> or <em>reserved words</em> is used to instruct the compiler on how the work is to be done.
    
    [q] Which of the following is not a valid identifier:
    
    [c] next
    [c] Table_27
    [c*] 9ex
    [c] for$
    [fx] Identifiers may contain letters, digits, the underscore (_) and the dollar sign ($), but may not begin with a digit.
    
    [q] To the best of your knowledge, which of the following is not a reserved word:
    
    [c] for
    [c] while
    [c*] main
    [c] else
    [fx] We may be tempted to think of the main method as reserved, but it is only an <em>identifier</em>, albeit one with a specific purpose.
    
    [x]The quiz is now complete. Click the button below to repeat this quiz.
    [restart]
    [/qwiz]
    Thread Starter billjojo

    (@billjojo)

    Thank you for the quick feedback! Apologies for the delay on testing – was prepping for start of semester.

    Ok, that did work. I did not realize it was undocumented. I inferred from here:

    https://www.qwizcards.com/quizzes-quickstart/#Custom%20feedback

    that is was applicable to MC-style questions.

    • This reply was modified 4 years, 2 months ago by billjojo.
    billjojo

    (@billjojo)

    @ninjazhai I noticed you are using an Enfold child theme. Does it do this in the base theme? I tried 5 themes on my test 5.3.2 and cannot recreate this. I do not have Enfold as it is premium.

    Bill

Viewing 13 replies - 1 through 13 (of 13 total)