Extension:Quiz/hi

This page is a translated version of the page Extension:Quiz and the translation is 36% complete.
मीडियाविकि एक्सटेंशन मैनुअल
OOjs UI icon advanced-invert.svg
Quiz
रिलीज़ की स्थिति: स्थिर
Quiz extension.png
कार्यान्वयन टैग , हुक
विवरण Provides a quiz tool
लेखक Lrbabeचर्चा
नवीनतम संस्करण 1.2.0 (2015-12-08)
MediaWiki 1.25+
लाइसेंस GNU General Public License 2.0 or later
डाउनलोड
उदाहरण: and format documentation: v:Help:Quiz
Translate the Quiz extension if it is available at translatewiki.net

चेक उपयोग और संस्करण मैट्रिक्स.

मुद्दा ओपन कार्य · बग की रिपोर्ट करें

The Quiz extension is the quiz building tool adopted on the Wikiversity. This extension aims at being:

  • Simple in its syntax and its use; powerful in its possibilities.
  • Open to suggestions and improvements (by facilitating the addition of new types of questions).

उपयोग

Other help pages are hosted on the Wikiversities in order to allow for working examples.

स्थापित

  • Download and place the file(s) in a directory called Quiz in your extensions/ folder.
  • अपनी LocalSettings.php के नीचे निम्नलिखित कोड जोड़ें:
    wfLoadExtension( 'Quiz' );
    
  •   पूर्ण – इस बात की पुष्टि करने के लिए अपने विकी पर Special:Version पर नेविगेट करें कि एक्सटेंशन सफलतापूर्वक स्थापित हो गया है।

MediaWiki 1.26 या इससे पहले वाले उपयोगकर्ताओं के लिए:

ऊपर दिए गए निर्देश wfLoadExtension() का उपयोग करके इस एक्सटेंशन को स्थापित करने के नए तरीके का वर्णन करते हैं। यदि आपको इस एक्सटेंशन को इन पिछले संस्करणों (MediaWiki 1.26 और इससे पहले) पर इंस्टॉल करना है, तो wfLoadExtension( 'Quiz' ); के बजाय, आपको यह उपयोग करने की आवश्यकता है:

require_once "$IP/extensions/Quiz/Quiz.php";

विकास

Adding a new question type

Quiz was conceived to facilitate the addition of new question types. If the basic types (multiple choice with single/multiple responses) are not enough for you, you have the possibility of easily creating and integrating the type of questions which you need. For that you must have some knowledge of PHP.

  1. The first thing that you must do is choose a syntax (the simplest possible) for your question type. The restrictions are:
    • The syntax of the question's header is fixed. The question has to be placed between curly brackets - i.e. { and } .
    • For consistency, it is recommended to use || to mark the beginning of the feedback section ("correction").
  2. Choose a new code name for your question type (example: "questionTypeName") as well as a symbol (currently the symbol "()" is used for single response multiple choice because it looks like a radio button, and the symbol "[]" is used for multiple response multiple choice because it looks like a checkbox).
  3. Add a "case" at the beginning of the parseParameters's "switch", as follows :
    case 'symbol':
    	$this->mType = "questionTypeName";
    	break;
    
  4. Add a parser function to Quiz.php
    This function must convert a question object from quiz syntax to HTML and set a state to the question (right, wrong, error, NA or unmarked), according to syntax errors and eventually posted answers. Name the function "questionTypeNameParseObject" and implement as follows :
    /**
     * Convert a basic type object from quiz syntax to HTML.
     * 
     * @param  $input				A question object in quiz syntax
     * 
     * @return $output				A question object in HTML.
     */
    function questionTypeNameParseObject($input) {
    	// your code here.
    	$this->setState(""); // Set the state if needed.
    	return $output;
    }
    
  5. Write down your syntax specifications which will be added to the help. Please read first the existing help.
  6. Once this is all done, contact me to include officially your question type inside the extension.

यह भी देखें