Uploaded image for project: 'LAMS Development'
  1. LAMS Development
  2. LDEV-2821

Q&A issue with rates enabled gives exception

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: Tool QA
    • Labels:
      None

      Description

      I came across this almost by accident.

      When two learners jump on a Q&A with rates enable, both users can rate each other's answers no problems.

      But for some reason, after the second user clicks on "Next Activity" he sees the attached pic. If I click on "Next activity" again, i get :

      java.lang.NumberFormatException: For input string:

        Activity

        ernieg Ernie Ghiglione created issue -
        ernieg Ernie Ghiglione made changes -
        Field Original Value New Value
        Attachment Picture 3.png [ 12164 ]
        Hide
        ernieg Ernie Ghiglione added a comment -
        I can show you this issue if you like if you can't reproduce this. It's rather tricky
        Show
        ernieg Ernie Ghiglione added a comment - I can show you this issue if you like if you can't reproduce this. It's rather tricky
        Hide
        dronych Andrey Balan added a comment -
        Done.

        The issue can simply be replicated by creating a plain Q&A without rating. Just enter answer in learner then proceed to all responses and do refresh.
        After that you won't be able to submit the form.

        reason:
        due to Ozgur there are 2 jsps in LearnerRep.jsp.
        First one you see when you just first land on the page, second - after you refresh it (as odd as that!).

        the problem is in the second page's Next Activity button:
        <html:link href="#" property="endLearning" styleId="finishButton"
        onclick="javascript:submitMethod('endLearning');"
        styleClass="button">
        <span class="nextActivity"><fmt:message key="button.endLearning" /></span>
        </html:link>
        which onclick method misses return false;.
        So it should be like this:
        onclick="javascript:submitMethod('endLearning'); return false;"

        And so the question is:
        what is the reason we use <html:link styleClass="button"> over regular <html:button>? Is there any benefits?

        and the next steps:
        I think about going through all tools and checking for that particular error and fixing it.
        We could also change links into buttons for code consistency...
        Show
        dronych Andrey Balan added a comment - Done. The issue can simply be replicated by creating a plain Q&A without rating. Just enter answer in learner then proceed to all responses and do refresh. After that you won't be able to submit the form. reason: due to Ozgur there are 2 jsps in LearnerRep.jsp. First one you see when you just first land on the page, second - after you refresh it (as odd as that!). the problem is in the second page's Next Activity button: <html:link href="#" property="endLearning" styleId="finishButton" onclick="javascript:submitMethod('endLearning');" styleClass="button"> <span class="nextActivity"><fmt:message key="button.endLearning" /></span> </html:link> which onclick method misses return false;. So it should be like this: onclick="javascript:submitMethod('endLearning'); return false;" And so the question is: what is the reason we use <html:link styleClass="button"> over regular <html:button>? Is there any benefits? and the next steps: I think about going through all tools and checking for that particular error and fixing it. We could also change links into buttons for code consistency...
        Hide
        ernieg Ernie Ghiglione added a comment -
        We are done now
        Show
        ernieg Ernie Ghiglione added a comment - We are done now
        ernieg Ernie Ghiglione made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        ernieg Ernie Ghiglione made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            dronych Andrey Balan
            Reporter:
            ernieg Ernie Ghiglione
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development