Multiple Choice questions not saving all answer options

Multiple Choice questions 4, 5 and 8 on PAGE 5 are not saving all answer options.
Course: The Coach's Guide to Youth Soccer Injury Recognition
Unit: Chapter 1: The SAFE Method- Initial Evaluation of an On-Field Injury
Please address ASAP. Course demo with client tomorrow. I have granted support access.

  • Michael Bissett

    The limit specified for max_input_vars has come up as a problem in the past (speaking from experience), but I can have a further look at this, and see if there's something more to the situation. :slight_smile:

    I'm going to need to have a course to work with (where I can see this in action), and I'll also need the following from you, via our secure contact form:

    - Mark to my attention, the subject line should contain only: ATTN: Michael Bissett
    - Do not include anything else in the subject line, doing so may delay our response due to how email filtering works.
    - Link back to this thread
    - Include FTP log-in details (hostname, username & password)
    - Include hosting control panel access details (login address, username & password)
    -- cPanel's usually the control panel used for this, but your provider may use something else
    - Include any relevant URLs for your site

    IMPORTANT: Please make sure you select "I have a different question" for your topic, so it doesn't go back to the forums - this and the subject line ensure that it gets assigned to me.

    https://premium.wpmudev.org/contact/

    Thanks in advance! :slight_smile:

    Kind Regards,
    Michael

  • Michael Bissett

    Hey Lisa,

    Here's what I have so far, going on your email, plus a lot of digging around (including a conflict test):

    The problem is with the Course: The Coach’s Guide to Youth Soccer Injury Recognition. Specifically Chapter 1: The SAFE Method - multiple choice questions 5 and 8. The questions are not number so you will have to count to find them.

    From what I gather, it'd be these questions:

    5. "E" means "Effort". Possible Red Flags in Effort include (check all possible correct answers)
    8. The SAFE Method (check all possible correct answers)

    However, the only thing I'm noticing so far is that when I add an answer, it has the checkbox checked. Upon saving, though, it's not checked (if I save it a 2nd time, though, then it'll register that the box has been checked).

    Trying to do things like:
    - Unchecking a correct answer
    - Modifying the answer text, as well as the annotation (which I see you mentioned having custom developed in your email)

    Does not result in not being able to save the changes.

    Same thing with this one:

    Also, today Chapter 3: Concussion has the same saving problem - Fifth question- Answer option B is not saving.

    Which I take to be this question:

    5. Some of the common signs the coach or assistant should look for in Appearance with mild heat illness include (choose the single best answer):

    Is this the behavior you're referring to? And speaking of the customizations:

    Also note that we have custom coded annotations for each question. This has not caused the saving problem. The saving problem existed before we added the annotations for each question.

    Annotations aren't the only customization that I'm seeing here, and I would like to ask if this started to happen after any customization?

    Right now, I've been testing in Google Chrome (version 49), on Windows 8.1. I've only been able to get this behavior to occur on your site (on my own test site, which has a fresh copy of CoursePress Pro 1.3.2, I've not been able to reproduce this there, it's acting properly for me).

    Please advise,
    Michael

  • Michael Bissett

    Hey Lisa,

    I've gone ahead and created an example course, and have been doing some testing in there. So far, in the process of testing, which consisted of:

    - Creating the two pages in the 1st unit (and the initial content, which for the 2nd page, consisted of only the answers, as annotation doesn't appear until the changes are saved)
    - Adding in the annotation in the 2nd page of the 1st unit, for each answer

    It wasn't until I took the second step, and tried saving the content, that I noticed that all of the checkboxes in the 2nd page were unchecked. Afterwards, I'd also noticed that when I tried adding in a new answer (in 5. "E" means "Effort". Possible Red Flags in Effort include (check all possible correct answers)), that I once again ran into the issue mentioned earlier, the checkbox not being saved on the first save.

    As you mentioned that the max_input_vars could be increased further, could you try increasing it to 9000? Right now, it's not acting like this until a lot of content is being inserted into the unit (something I also found on your site), and I'd really like to know if that does help.

    I tried to see if I could set up a custom php.ini file of my own, but it doesn't look like your host allows for that (otherwise, I'd have information from my own attempts at increasing this).

    Please advise,
    Michael

  • Michael Bissett

    Hey Lisa,

    I'm going to need to bring in one of my colleagues from SLS for this, I've tried to look at this as much as I can for you, but this is really going to require their expertise.

    In the process of trying to look into this further for your tonight, though, I accidentally deleted the annotation for the answers in the "4. “F” means “Feel”. Possible Red Flags in Feel include (check single best answer)" quiz question.

    (I was referencing your course, and recreating it on my site, but in the process of switching tabs, and working on a case for reproducing this for my colleague in SLS, I accidentally started working on a quiz section from the course on your site, instead of the one on mine)

    I do apologize for this error on my part. :slight_frown:

    Kind Regards,
    Michael

    P.S. For my colleague in SLS, can you please extend the Support Access to your site? I see that it's going to expire in a few hours.

  • Ivan Shulev

    Hey Lisa ,

    I hope you are having a nice day so far!

    I am sorry for the late reply and I will kindly ask you to either extend the support access or send over WP Admin credentials for an admin user.

    You can send that privately through our contact form: https://premium.wpmudev.org/contact/

    Select "I have a different question" for your topic.

    Send in:

    Subject: "Attn: Ivan Shulev"
    -WordPress admin username
    -WordPress admin password
    -login url

    I see you've sent FTP/DB login credentials and I thank you for that, but will need admin access as well.

    Thank you and I wish you an awesome day ahead!

    Ivan

  • Ivan Shulev

    Hey Lisa ,

    I hope you are having a nice day so far!

    I did some testing and it appears the annotation input element has the same "checkbox_answer" class as the regular answer input field and that is confusing the system. The following JS code is assigning the value to the checkbox based on input field changes:

    jQuery( document.body ).on( 'input', '.checkbox_answer', function () {
            jQuery( this ).closest( 'td' ).find( ".checkbox_answer_check" ).val( jQuery( this ).val() );
    } );

    This means that whenever the value of an input with the class "checkbox_answer" gets changed, it is also assigned to the checkbox value. This way when you enter annotation after answer, the checkbox value is that of the annotation and not the answer - hence the confusion.

    If you enter the annotation first and then enter the answer to the question, the checkbox state will be saved accordingly. The important part is to have the answer input field changed last before save.

    So what I would suggest is to change the class of the annotation input field. I could do it for you and for that I will need you to specify how exactly you add the annotation functionality.

    I hope this helps and I wish you an awesome day ahead!

    Ivan

  • Ivan Shulev

    Hey Lisa ,

    I hope you are having a nice day so far!

    I made this change but responses for questions simply disappear still.

    I logged into your site and was able to save checkbox choice and answer successfully. Please point to the course and unit where you've experienced the issue again.

    does coursepress do anything periodically to itself, like a cron job or some sort?

    The only thing CP does is check for updates. Any changes to content should be man-made. I have no explanation for that. Does it happen often? Does it happen for a specific unit? Which one?

    Thank you for clarifying and I wish you an awesome day ahead!

    Ivan

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.