yoannchb-pro/MoodleGPT

Not working when having true / false as radio buttons

Waradu opened this issue · 4 comments

Not working it just always selects the second option.

image

Wahr = true
Falsch = false
(its german)

<section id="region-main" class="has-blocks mb-3" aria-label="Inhalt">
  <span class="notifications" id="user-notifications"></span>
  <div role="main">
    <span id="maincontent"></span>
    <form
      action="https://moodle.xxx.ch/mod/quiz/processattempt.php?cmid=199359"
      method="post"
      enctype="multipart/form-data"
      accept-charset="utf-8"
      id="responseform"
      autocomplete="off"
    >
      <div>
        <div
          id="question-250645-4"
          class="que mtf deferredfeedback notyetanswered"
        >
          <div class="info">
            <h3 class="no">Frage <span class="qno">4</span></h3>
            <div class="state">Bisher nicht beantwortet</div>
            <div class="grade">Erreichbare Punkte: 1,00</div>
            <div
              class="questionflag editable"
              aria-atomic="true"
              aria-relevant="text"
              aria-live="assertive"
              id="yui_3_17_2_1_1701185370004_87"
            >
              <input
                type="hidden"
                name="q250645:4_:flagged"
                value="0"
                id="yui_3_17_2_1_1701185370004_32"
              /><input
                type="hidden"
                value="qaid=2742973&amp;qubaid=250645&amp;qid=1801762&amp;slot=4&amp;checksum=89e067daa5b11a53fbe0f143d3f9f7bc&amp;sesskey=tHEF56VSa8&amp;newstate="
                class="questionflagpostdata"
                id="yui_3_17_2_1_1701185370004_33"
              />
              <input
                type="hidden"
                class="questionflagvalue"
                id="q250645:4_:flaggedcheckbox"
                name="q250645:4_:flagged"
                value="0"
              /><input
                type="image"
                class="questionflagimage"
                src="https://moodle.xxx.ch/theme/image.php/rebel/core/1692289195/i/unflagged"
                title="Diese Frage als Referenz markieren"
                alt="nicht markiert"
              /><span
                class="questionflagtext"
                title="Diese Frage als Referenz markieren"
                >Frage markieren</span
              >
            </div>
          </div>
          <div class="content">
            <div class="formulation clearfix">
              <h4 class="accesshide">Fragetext</h4>
              <input
                type="hidden"
                name="q250645:4_:sequencecheck"
                value="1"
                id="yui_3_17_2_1_1701185370004_34"
              />
              <div class="qtext">
                Welche Behauptungen zur JRE sind wahr/falsch.
              </div>
              <table class="generaltable">
                <thead>
                  <tr>
                    <th class="header c0" style="" scope="col">Wahr</th>
                    <th class="header c1 lastcol" style="" scope="col">
                      Falsch
                    </th>
                  </tr>
                </thead>
                <tbody>
                  <tr class="qtype_mtf_row" data-id="2">
                    <td class="mtfresponsebutton cell c0" style="">
                      <label
                        ><input
                          type="radio"
                          id="qtype_mtf_q250645:4_option0"
                          name="q250645:4_option0"
                          value="1"
                          data-mtf="qtype_mtf_1801762"
                          data-multimtf="1"
                      /></label>
                    </td>
                    <td class="mtfresponsebutton cell c1" style="">
                      <label
                        ><input
                          type="radio"
                          id="qtype_mtf_q250645:4_option0"
                          name="q250645:4_option0"
                          value="2"
                          data-mtf="qtype_mtf_1801762"
                          data-multimtf="1"
                      /></label>
                    </td>
                    <td class="optiontext cell c2" style="">
                      <span class="optiontext"
                        ><p dir="ltr" style="text-align: left">
                          Das JRE kann Programme kompilieren
                        </p></span
                      >
                    </td>
                    <td class="cell c3 lastcol" style=""><div></div></td>
                  </tr>
                  <tr class="qtype_mtf_row" data-id="2">
                    <td class="mtfresponsebutton cell c0" style="">
                      <label
                        ><input
                          type="radio"
                          id="qtype_mtf_q250645:4_option1"
                          name="q250645:4_option1"
                          value="1"
                          data-mtf="qtype_mtf_1801762"
                          data-multimtf="1"
                      /></label>
                    </td>
                    <td class="mtfresponsebutton cell c1" style="">
                      <label
                        ><input
                          type="radio"
                          id="qtype_mtf_q250645:4_option1"
                          name="q250645:4_option1"
                          value="2"
                          data-mtf="qtype_mtf_1801762"
                          data-multimtf="1"
                      /></label>
                    </td>
                    <td class="optiontext cell c2" style="">
                      <span class="optiontext"
                        ><p dir="ltr" style="text-align: left">
                          Das JRE kann Programme ausführen
                        </p></span
                      >
                    </td>
                    <td class="cell c3 lastcol" style=""><div></div></td>
                  </tr>
                  <tr class="qtype_mtf_row" data-id="2">
                    <td class="mtfresponsebutton cell c0" style="">
                      <label
                        ><input
                          type="radio"
                          id="qtype_mtf_q250645:4_option2"
                          name="q250645:4_option2"
                          value="1"
                          data-mtf="qtype_mtf_1801762"
                          data-multimtf="1"
                      /></label>
                    </td>
                    <td class="mtfresponsebutton cell c1" style="">
                      <label
                        ><input
                          type="radio"
                          id="qtype_mtf_q250645:4_option2"
                          name="q250645:4_option2"
                          value="2"
                          data-mtf="qtype_mtf_1801762"
                          data-multimtf="1"
                      /></label>
                    </td>
                    <td class="optiontext cell c2" style="">
                      <span class="optiontext"
                        ><p dir="ltr" style="text-align: left">
                          Das JRE wird auf Entwickler-Computern installiert.
                        </p></span
                      >
                    </td>
                    <td class="cell c3 lastcol" style=""><div></div></td>
                  </tr>
                  <tr class="qtype_mtf_row" data-id="2">
                    <td class="mtfresponsebutton cell c0" style="">
                      <label
                        ><input
                          type="radio"
                          id="qtype_mtf_q250645:4_option3"
                          name="q250645:4_option3"
                          value="1"
                          data-mtf="qtype_mtf_1801762"
                          data-multimtf="1"
                      /></label>
                    </td>
                    <td class="mtfresponsebutton cell c1" style="">
                      <label
                        ><input
                          type="radio"
                          id="qtype_mtf_q250645:4_option3"
                          name="q250645:4_option3"
                          value="2"
                          data-mtf="qtype_mtf_1801762"
                          data-multimtf="1"
                      /></label>
                    </td>
                    <td class="optiontext cell c2" style="">
                      <span class="optiontext"
                        ><p dir="ltr" style="text-align: left">
                          Das JRE wird auf Endbenutzer-Computern installiert.
                        </p></span
                      >
                    </td>
                    <td class="cell c3 lastcol" style=""><div></div></td>
                  </tr>
                  <tr class="qtype_mtf_row" data-id="2">
                    <td class="mtfresponsebutton cell c0" style="">
                      <label
                        ><input
                          type="radio"
                          id="qtype_mtf_q250645:4_option4"
                          name="q250645:4_option4"
                          value="1"
                          data-mtf="qtype_mtf_1801762"
                          data-multimtf="1"
                      /></label>
                    </td>
                    <td class="mtfresponsebutton cell c1" style="">
                      <label
                        ><input
                          type="radio"
                          id="qtype_mtf_q250645:4_option4"
                          name="q250645:4_option4"
                          value="2"
                          data-mtf="qtype_mtf_1801762"
                          data-multimtf="1"
                      /></label>
                    </td>
                    <td class="optiontext cell c2" style="">
                      <span class="optiontext"
                        ><p dir="ltr" style="text-align: left">
                          Das JRE kann nicht ohne das JDK installiert werden
                        </p></span
                      >
                    </td>
                    <td class="cell c3 lastcol" style=""><div></div></td>
                  </tr>
                  <tr class="qtype_mtf_row lastrow" data-id="2">
                    <td class="mtfresponsebutton cell c0" style="">
                      <label
                        ><input
                          type="radio"
                          id="qtype_mtf_q250645:4_option5"
                          name="q250645:4_option5"
                          value="1"
                          data-mtf="qtype_mtf_1801762"
                          data-multimtf="1"
                      /></label>
                    </td>
                    <td class="mtfresponsebutton cell c1" style="">
                      <label
                        ><input
                          type="radio"
                          id="qtype_mtf_q250645:4_option5"
                          name="q250645:4_option5"
                          value="2"
                          data-mtf="qtype_mtf_1801762"
                          data-multimtf="1"
                      /></label>
                    </td>
                    <td class="optiontext cell c2" style="">
                      <span class="optiontext"
                        ><p dir="ltr" style="text-align: left">
                          Das JRE gehört zum JDK
                        </p></span
                      >
                    </td>
                    <td class="cell c3 lastcol" style=""><div></div></td>
                  </tr>
                </tbody>
              </table>
            </div>
          </div>
        </div>
        <div class="submitbtns">
          <input
            type="submit"
            name="previous"
            value="Vorherige Seite"
            class="mod_quiz-prev-nav btn btn-secondary"
            id="yui_3_17_2_1_1701185370004_35"
          /><input
            type="submit"
            name="next"
            value="Nächste Seite"
            class="mod_quiz-next-nav btn btn-primary"
            id="yui_3_17_2_1_1701185370004_36"
          />
        </div>
        <input
          type="hidden"
          name="attempt"
          value="153259"
          id="yui_3_17_2_1_1701185370004_37"
        /><input
          type="hidden"
          name="thispage"
          value="3"
          id="followingpage"
        /><input
          type="hidden"
          name="nextpage"
          value="4"
          id="yui_3_17_2_1_1701185370004_38"
        /><input type="hidden" name="timeup" value="0" id="timeup" /><input
          type="hidden"
          name="sesskey"
          value="tHEF56VSa8"
          id="yui_3_17_2_1_1701185370004_39"
        /><input type="hidden" name="scrollpos" value="" id="scrollpos" /><input
          type="hidden"
          name="slots"
          value="4"
          id="yui_3_17_2_1_1701185370004_40"
        />
      </div>
    </form>
    <div id="connection-error" style="display: none" role="alert">
      <p>
        Netzwerkverbindung verloren. Das automatische Speichern ist
        fehlgeschlagen.
      </p>

      <p>
        Notieren Sie sich alle in den letzten Minuten eingegebenen Antworten und
        versuchen Sie, die Verbindung wieder herzustellen.
      </p>

      <p>
        Sobald die Verbindung wiederhergestellt wurde, sollten Sie die Antworten
        erneut speichern. Diese Nachricht verschwindet dann.
      </p>
    </div>
    <div id="connection-ok" style="display: none" role="alert">
      <p>
        Die Netzwerkverbindung wurde wieder hergestellt. Arbeiten Sie nun
        vorsichtig weiter.
      </p>
    </div>
  </div>
</section>

Could you active the logs and then show me the console by pressing F12 -> Console

[QUESTION]: Gegeben sind folgende Variablen:int a;byte b;char c;double d;Markieren Sie die korrekten Wertzuweisungen.Richtig Falsch d = 15;a = 15;b = 15;c = 'A';
MoodleGPT.js:1 Original:
Richtig
MoodleGPT.js:1 Normalized:
richtig
(8) MoodleGPT.js:1 [CHECKING]: 

image

and btw would be cool if i had a way to give it some context (like in the popup and i can change every time i have a new test). Like in this example gpt doesnt know that this is in JAVA

Hummm I have no idea where it came from but I will try to see for a fix in the next version of moodlegpt. I should work on it in some months :)

Okey thanks maybe i'll have a look myself if i find some free time.