Line breaks were gone when checking answers

Home Forums Legacy Support Support queries Styling issues Line breaks were gone when checking answers

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #242699
    hoanganftu
    Spectator
    When I took a quiz, if I clicked "Check answer", the explanation was a mess because I couldn't see any line breaks. http://prntscr.com/r2s9gc I checked the back-end composer and line breaks were fine. http://prntscr.com/r2sbmd This was confusing. Besides, there was a problem with the timer. When I set unlimited duration (9999), the timer showed something like this: http://prntscr.com/r2sfbq It was not a big issue but it was misleading at first.    
    #242700
    hoanganftu
    Spectator
    This reply has been marked as private.
    #242783
    Diana
    Participant
    @hoanganftu I hope you are using wordpress editor Line break for breaking the lines and alignment purpose. Paste this custom code in wp-admin > Plugins > editor > select wplms customizer plugin > wplms-customizer.php function add_linebreak_shortcode() { return '<br />'; } add_shortcode('br', 'add_linebreak_shortcode' );   NOw you have a shortcode [br] which you can use anywhere for line breaks. It will work with any kind of page editor. The timer issue: The timer screenshot you shared is actually quiz timer not course timer. Can you please share that course link on which you were checking. The 9999 duration is meant to set course for an unlimited duration not for quizzes
    #242801
    hoanganftu
    Spectator
    I'm afraid this will be very inconvenient for me. I guess it means I will need to add a shortcode manually for every line break I have. However, I use the import feature to import hundreds of questions. And every question has explanation with 4 or 5 line breaks. So it means I need to manually add 1000 line breaks. Is that feasible for now and the future? For the timer, I think I can set the limit to 9999 days instead of 9999 hours and it will solve the problem.
    #242921
    Diana
    Participant
    This reply has been marked as private.
    #243201
    hoanganftu
    Spectator
    Is your setup with react quizzes? Before I used react quizzes, everything was fine (the explanation has breaks automatically). It seems to me that the screen you shared didn't have the react quizzes enabled. When I turned on the react quizzes, the speed was amazing but the explanation was a mess.
    #243202
    hoanganftu
    Spectator
    This reply has been marked as private.
    #243296
    Diana
    Participant
    @hoanganftu There is a plugin activated on your site to disable right-click. Whenever I try to access your plugins page it returen error 500. Can you please deactivate that plugin for me so I can check the issue of this line break
    #243495
    hoanganftu
    Spectator
    I disabled the plugin "WP Content Copy Protection & No Right Click". Could you check the plugins?
    #243595
    Diana
    Participant
    This reply has been marked as private.
    #243647
    hoanganftu
    Spectator
    I think this is a problem with react quizzes. I tried unchecking the option "Enable React Quizzes" and the explanation was fine again with clear line breaks: http://prntscr.com/r6wk5r And this is the same quiz when I turned the react option on again: http://prntscr.com/r6wme I guess somehow the react quizzes have been rendered without line breaks. Do you know any other way to fix that option? I think the real culprit is the react option itself The solution right now is just temporary, not to the real nature of the problem. If it takes time, please solve it. To add those tags manually to thousands of questions is impossible for me.  
    #243723
    Diana
    Participant
    @hoanganftu, Yes, I got the fix using CSS. This will work for you. Just pick the class of the wrapper of the message and then add this property white-space: pre-line;
    #243724
    hoanganftu
    Spectator
    Thanks. That's exactly what I have been looking for. I have resolved the issue with your css. Thank you very much. You can close the case here.
    #243757
    Diana
    Participant
    @hoanganftu, Thanks for confirming
Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Line breaks were gone when checking answers’ is closed to new replies.