Giter Site home page Giter Site logo

yoannchb-pro / moodlegpt Goto Github PK

View Code? Open in Web Editor NEW
33.0 33.0 1.0 3.5 MB

This extension allows you to hide CHAT-GPT in a Moodle quiz.

Home Page: https://chrome.google.com/webstore/detail/moodlegpt/fgiepdkoifhpcgdhbiikpgdapjdoemko

License: MIT License

JavaScript 14.05% HTML 23.34% CSS 5.48% TypeScript 57.07% Shell 0.07%
chatgpt chatgpt-api chatgpt-app edge-extension extension-chrome gpt-3 gpt-4 javascript moodle moodle-plugin quiz-solutions solver typescript

moodlegpt's Introduction

Hello wavehand, I'm Yoann

Passionate about web

yoannchb-pro

  • 📚 I am a poor student
  • ⚡ Fun fact I hate backend

Languages and technologies

JavaScript Java NPM NodeJS HTML5 CSS3 VUEJS TAILWINDCSS FONTAWESOME EXPRESSJS PUPPETEER TYPESCRIPT REACT

Tools

Visual Studio Code Git GitHub Linux Debian Windows

globalstats yoannchb-pro

moodlegpt's People

Contributors

yoannchb-pro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

bitrey

moodlegpt's Issues

ERR_BLOCKED_BY_CLIENT

I encountered a problem when I wanted to try this extension with the following details

Screenshot 2023-09-04 192902

I have topped up my credit balance on OpenAI by $5.00 and the problem still occurs, is there a solution to this problem?

image

Thank you in advance!

MoodleGPT Error and unidentified GPT Model

image

Hello yoannchb-pro, i used to use your extension before and it's great, but recently, i don't know why it having this problem

I really need your help in next 4 hour, hope you can reply me soon :((

Latest Moodle version

Greetings,
It does not work with the latest Moodle versions, even with the fake test index.html there's no answer by the API (but the extension commands work). What could I do?

Thank you, have a nice day

Can you explane to me how to make it work?

look, I am a bit tech savy but I don't understan where to enter the code to activate it

i need this extention to work in the next few hours. LOVE the extention, but I can't make it work

Can you help me make it work please

I tried to configure it, but it doesn't work. Also, could you please tell me how to activate the code? Should I just type it randomly in the navigator?
When I refresh the gptmodel it says : undefined can you help me please ?

Console logs not working

I did everything according to the instructions and even saw other issues, but I still didn’t understand what my problem was!
My openai api key is fully working, but the extension shows no signs of life, help me understand what the problem is please! Ask any questions you want

Error 404 on POST https://api.openai.com/v1/chat/completions

Hello,

I have followed the instruction from the Set Up on GitHub page.
My API key provided on the extension doesnt seems to enable the connection to my GPT Account.

Some screeshots :

My extension config :
image

Console error :
image

Web error from the link given by console :
image

If u can help me please :)

Thanks !

Difficult to let the app work

I added the extension and inserted the API, I wrote the code and the version of gpt: "gpt-3.5-turbo". Now I opened the moodle test file but nothing happens, when I write the code the console stays empty.

TypeError

image_2023-11-01_182354009
I have this error. I've seen that I'm not the only one, they say I have to solve it by changing the model or something, but I don't know how to do it. Maybe it would be easier if we had to log in openai, instead of putting the key.

First Time User Errors

Hello yoannchb-pro.
First time user here. And i'm having errors when i try to get it to work

Firstly,
Err3
The extension shows these errors, when i load the unpacked folder

Then,
when i click on the reload button after getting my API, it says gpt model undefined

and finally, when i run the index.html in the fake-moodle folder and i run my code to inject the extension and click a question
nothing comes up, and when i inspected the element, i found this
err2

Any help or advice that can be given or helped in solving this issues would be deeply appreciated
Thank you in advance

Not working when having true / false as radio buttons

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>

Undefined

Hello. I have a problem when I enter the chatgpt API key. It says undefined, I bought the gpt4 version if its for interest. I have tried with the dev version and with the normal one.
I don't know if it can be done, but it might be easier if we log in to chatgpt directly without having to enter the keys.
Thanks in advance
moodlegpt

MoodleGPT isn't working

Good morning,

I can’t get moodleGPT to work even on the index.html you provided locally. I don’t understand how the code, defined beforehand, can be entered into the moodle test. Could you please help me?

Have a nice evening,
Gabriel

Injection?

Hey just following up with this project. I open up the test page and press the code number on my keyboard but it doesn't do anything? Just wondering what im doing wrong or I guess i dont understand how to inject it? Is this project still in development?

Edit: got it working. You're amazing. Will be following for future updates and donating

Unable to find a GPT Model

Hello,

I'm trying to install the extension but when I type my API Key, my code and I want to refresh the model, it's saying "undefined"

Capture d’écran du 2023-11-28 17-32-38

Do you have a solution ? Thanks !

Error API Key

Hi, your extension returns the following error:

{
"error": {
"message": "You didn't provide an API key. You need to provide your API key in an Authorization header using Bearer auth (i.e. Authorization: Bearer YOUR_KEY), or as the password field (with blank username) if you're accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.",
"type": "invalid_request_error",
"param": null,
"code": null
}
}

No answers are filled : UPDATE : answer replace thequestion

Hello / bonjour

I put my apikey, code and write "gpt-3.5-turbo-0613" for gpt model. with all the steps checked, in the moodle text html, when i click on questions, nothing seems to made (also test on official moodle website, same problem) the blue circle icon replace my mouse icon 1-2sec and answers arent filled. Do you have any idea?
(im on "questions to answer" mod)

Moodle Error

Hey, not sure what I'm doing wrong or my current moodle is not supported. Getting these errors, it will inject but does not answer the questions.

Not sure if you need a moodlelink? https://moodle.lsua.edu/
err

Trojan detected : wacatac.b ml

Defender block the download cause trojan detection for "wacatac.b ml".

Would you mind to tell more ?
(I know turning off the anti-virus is the solution)

[BUG] Marche pas

Hello !

J'ai cette erreur dans la console quand je teste l'extension localement avec le faux quiz moodle :

Failed to load resource: the server responded with a status of 404 ()
MoodleGPT.js:1 TypeError: Cannot read properties of undefined (reading '0')
at MoodleGPT.js:1:8845
at Generator.next ()
at s (MoodleGPT.js:1:269)

J'ai vu que ca pouvait être du au fait que je n'avais pas de fonds sur mon compte OpenAI. J'ai pourtant mis 5$ dessus donc je ne comprends pas.. Peux-tu m'aider stp ? Merci !

Dont choose an answer

Rebonjour, tant qu'on y est je t'embête encore un peu
FR Ici, l'extension n'a pas choisi de réponse, elle m'a juste fait un copier-coller : voici (c'est moi qui ai cliqué sur la réponse a, après avoir demandé de choisir une réponse)

ENG Here, the extension did not choose an answer, it just made me a copy-paste: here (it is me who clicked on the answer a, after asking to choose an answer)

image_2024-03-08_182004680

Merci

[HELP]

Is this still working as of today? cant seem to get it to work despite it injecting

429 - (Too Many Requests)

Any and all questions that I press after injecting MoodleGPT into the current webpage return the error mentioned above.

The error itself states in the console:

POST https://api.openai.com/v1/chat/completions 429 (Too Many Requests)

TypeError: Cannot read properties of undefined (reading '0')
at MoodleGPT.js:1:5703
at Generator.next ()
at i (MoodleGPT.js:1:269)

And this is the case for any question regardless of formatting.

Error, while starting GPT by the code

Console log:

MoodleGPT.js:1 Uncaught TypeError: Cannot read properties of null (reading 'style')
    at MoodleGPT.js:1:6979
    at HTMLBodyElement.<anonymous> (MoodleGPT.js:1:7110)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.