first commit

This commit is contained in:
CHIEFSOFT\ameye
2024-09-30 18:11:26 -04:00
commit e592ca6823
27270 changed files with 5002257 additions and 0 deletions
@@ -0,0 +1,54 @@
@qformat @qformat_gift
Feature: Test importing questions from GIFT format.
In order to reuse questions
As an teacher
I need to be able to import them in GIFT format.
Background:
Given the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "users" exist:
| username | firstname |
| teacher | Teacher |
And the following "course enrolments" exist:
| user | course | role |
| teacher | C1 | editingteacher |
And I am on the "Course 1" "core_question > course question import" page logged in as "teacher"
@javascript @_file_upload
Scenario: import some GIFT questions
When I set the field "id_format_gift" to "1"
And I upload "question/format/gift/tests/fixtures/questions.gift.txt" file to "Import" filemanager
And I press "id_submitbutton"
Then I should see "Parsing questions from import file."
And I should see "Importing 9 questions from file"
And I should see "What's between orange and green in the spectrum?"
When I press "Continue"
Then I should see "colours"
# Now export again.
And I am on the "Course 1" "core_question > course question export" page
And I set the field "id_format_gift" to "1"
And I press "Export questions to file"
And following "click here" should download a file that:
| Has mimetype | text/plain |
| Contains text | What's between orange and green in the spectrum? |
@javascript @_file_upload
Scenario: import a GIFT file which specifies the category
When I set the field "id_format_gift" to "1"
And I upload "question/format/gift/tests/fixtures/questions_in_category.gift.txt" file to "Import" filemanager
And I press "id_submitbutton"
Then I should see "Parsing questions from import file."
And I should see "Importing 4 questions from file"
And I should see "Match the activity to the description."
When I press "Continue"
Then I should see "Moodle activities"
@javascript @_file_upload
Scenario: import some GIFT questions with unsupported encoding
When I set the field "id_format_gift" to "1"
And I upload "question/format/gift/tests/fixtures/questions_encoding_windows-1252.gift.txt" file to "Import" filemanager
And I press "id_submitbutton"
Then I should see "The file you selected does not use UTF-8 character encoding. GIFT format files must use UTF-8."
+49
View File
@@ -0,0 +1,49 @@
// essay
::Q8:: How are you? {}
// question: 2 name: Moodle activities
::Moodle activities::[html]Match the <b>activity</b> to the description.{
=[html]An activity supporting asynchronous discussions. -> Forum
=[moodle]A teacher asks a question and specifies a choice of multiple responses. -> Choice
=[plain]A bank of record entries which participants can add to. -> Database
=[markdown]A collection of web pages that anyone can add to or edit. -> Wiki
= -> Chat
}
// multiple choice with specified feedback for right and wrong answers
::Q2:: What's between orange and green in the spectrum?
{
=yellow # right; good!
~red # [html]wrong, it's yellow
~[plain]blue # wrong, it's yellow
}
// multiple choice, multiple response with specified feedback for right and wrong answers
::colours:: What's between orange and green in the spectrum?
{
~%50%yellow # right; good!
~%-100%red # [html]wrong
~%50%off-beige # right; good!
~%-100%[plain]blue # wrong
}
// math range question
::Q5:: What is a number from 1 to 5? {#3:2~#Completely wrong}";
// question: 666 name: Shortanswer
::Shortanswer::Which is the best animal?{
=Frog#Good!
=%50%Cat#What is it with Moodlers and cats?
=%0%*#Completely wrong
}
// true/false, with general feedback
::Q1:: 42 is the Absolute Answer to everything.{
FALSE#42 is the Ultimate Answer.#You gave the right answer.
####This is, of course, a Hitchiker's Guide to the Galaxy reference.}";
// name 0-11
::2-08 TSL::TSL is blablabla.{T}
// name 0-11
::2-08 TSL::TSL is blablabla.{TRUE}
@@ -0,0 +1,18 @@
// question: 0 name: Switch category to $course$/top/Default for LTTEST
$CATEGORY: $course$/top/Default for LTTEST
// question: 19756780 name: asdf
::asdf::[html]<p>asdf<br></p>{}
// question: 19756810 name: test daniel
::test daniel::[html]<p>asdfasdf</p>{}
// question: 19756750 name: asdf
::asdf::[html]<p>asdf<br></p>{
=<p>aödf<br></p> -> asdf
=<p>asdf<br></p> -> asdf
=<p>asdf<br></p> -> asdf
}
@@ -0,0 +1,27 @@
// question: 0 name: switch category to $course$/Default for New Features
$CATEGORY: $course$/Default for New Features
// question: 44 name: Moodle activities
::Moodle activities::[html]Match the activity to the description.{
=An activity supporting asynchronous discussions. -> Forum
=A teacher asks a question and specifies a choice of multiple responses. -> Choice
=A bank of record entries which participants can add to. -> Database
=A collection of web pages that anyone can add to or edit. -> Wiki
= -> Chat
}
// question: 43 name: Greeting
::Greeting::[html]<a href\="http\://demo.moodle.net/file.php/5/media/bonjour.mp3">Listen to this greeting\:</a><br /><br />What language is being spoken?{
~English#Sorry, listen again.
=French#Yes, well done!
~German#Sorry, listen again.
~Spanish#Sorry, listen again.
}
// question: 46 name: Moodle user
::Moodle user::[html]Anyone who uses Moodle is a ...{
=%100%Moodler#
}
// question: 45 name: Moodle acronym
::Moodle acronym::[html]Moodle is an acronym for <span style\="font-style\: italic;">Modular Object-Oriented Dynamic Learning Environment</span>.{TRUE}
File diff suppressed because it is too large Load Diff