Skip to content

Instantly share code, notes, and snippets.

View wilenius's full-sized avatar

Heikki Wilenius wilenius

  • University of Helsinki
  • Finland
View GitHub Profile
Video of the presentation (recorded 29.2.) here: https://www.helsinki.fi/fi/unitube/video/ca11a81c-93b3-4efc-87af-3779c759d5bd
(IN FINNISH – English subtitles coming soon)
@wilenius
wilenius / gist:46998574f2f38c60f7021caf90563212
Created February 28, 2024 13:44
Prompt for remixing SBAs in Moodle's GIFT format
I will paste you some multiple choice questions in Moodle's GIFT format. I need you to modify them a little bit, so that they appear different, while still measuring roughly the same kind of knowledge. One of the wrong answers should be quite close to the correct answer. Here is an example:
// question: 6440847 name: Capitalism and history (Sahlins)
::Capitalism and history (Sahlins)::[html]How does Sahlins propose we view the historical course of Western capitalism in indigenous societies?{
=[moodle]As a cultural process where the forces of capitalism are realized in forms and finalities of exotic cultural logics.#[moodle]Correct. Sahlins suggests viewing the historical course of Western capitalism as a cultural process integrated into local systems.
~[moodle]As a deterministic system that overpowers and replaces indigenous cultures without exception.#[moodle]Incorrect. Sahlins argues against a deterministic view and suggests a more integrative approach.
~[moodle]As a completely separate phenomenon that
@wilenius
wilenius / gist:29640bc9bbe06de7e09da0df1152cef0
Created February 28, 2024 13:42
Prompt for making multilang SBAs for Moodle with a natural language description of the questions
I need you to create multiple choice questions in Moodle's XML format, and I need to make them bilingual, written both in English and in Finnish, according to this example:
<?xml version="1.0" encoding="UTF-8"?>
<quiz>
<!-- question: 6408196 -->
<question type="multichoice">
<name>
<text>Land's End - land ownership</text>
</name>
<questiontext>
@wilenius
wilenius / moodle_multilang_prompt.xml
Last active February 8, 2024 13:44
Prompt for making Moodle quiz XML content bilingual
I have multiple choice questions in Moodle's XML format, and I need to make them bilingual, written both in English and in Finnish, according to this example.
Here's the original question:
<question type="multichoice">
<name>
<text>Land's End - land ownership</text>
</name>
<questiontext format="moodle_auto_format">
<text>Based on the text, what is a significant concern regarding the indigenous highlanders and land ownership?</text>
@wilenius
wilenius / gist:3d2d8c512bf8e251288e1e9b5f935a6f
Last active February 2, 2024 11:04
GPT prompt for creating SBA questions in GIFT format

I need you to output 20 single best answer multiple choice questions in Moodle's GIFT format, based on a text given to you. GIFT format uses an equal sign for a right answer and a tilde sign for a wrong answer at the beginning of answers. Answer feedback is given after a hash sign. Give each question a descriptive name, which is entered between double colons in the beginning of the line. Please have a blank line between questions. One of the answers should be clearly the right one. One of the wrong answers should be close to the right answer, but still clearly wrong. Answering the questions correctly should require application, analysis, or evaluation, as defined in Bloom's taxonomy. Here is an example prompt: "Indexicality and iconicity according to Peirce". A good output for that prompt would be the following:

::Indexicality and iconicity 1:: Imagine that you are standing on a lake shore. A wind rises, creating waves on the lake surface. According to C.S. Peirce, in what way the waves signify the wind? { =

@wilenius
wilenius / moodle-quiz-xml-creator.py
Last active March 12, 2024 08:43
ChatGPT Moodle Quiz XML creator
import sys
import openai
openai.api_key = "YOUR API KEY HERE"
topic = str(sys.argv[1])
iterations = int(sys.argv[2])
response = openai.ChatCompletion.create(
model="gpt-3.5-turbo-0301",