Khan Academy Multiple Choice Activity

Here is a starter page for multiple choice answers. It uses the same wordlist as the free response activity.

<!DOCTYPE html>
<html data-require="math">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>RetVortoj</title>
        <script src="../khan-exercise.js"></script>
    </head>
    <body>
        <div class="exercise">

            <div class="vars">
                <var>wordlist=[ 
                    [ "aktualaĵo", "current events" ],
                    [ "ligiloj", "links" ],
                    [ "presable", "printable" ],
                    [ "ensaluti", "login" ],
                    [ "elsaluti", "logout" ],
                    [ "dosiero", "file" ],
                    [ "alŝulti", "upload" ],
                    [ "uzantaro", "users" ],
                    [ "retpoŝtadreso", "email address" ],
                    [ "pasvorto", "password" ],
                    [ "registriĝi", "register" ],
                    [ "salutnomo", "login name" ],
                    [ "ĉefpaĝo", "homepage" ]
                    ]</var>
                <var id="eo,en">randFromArray(wordlist)</var>

            </div>

            <div class="problems">
                <div id="EnglishToEoMultChoice">

                     <div class="question">
                        <p>Translate to Esperanto: <strong><var>en</var></strong></p>
                    </div>

                    <div class="solution" data-type="radio">                     
                        <var>eo</var>
                    </div>
                    
                    <ul class="choices" data-show="5" data-none="true">
                        <li data-each="wordlist as value">
                        <var>value[0]</var>
                        </li>
                    </ul>

                    <div class="hints">
                        <div>
                            <span data-each="wordlist as value">
                                <var>value[0]</var>-
                            </span>
                        </div>
                        
                        <div>
                            <span data-each="wordlist as value">
                                <var>value[0]</var>:<var>value[1]</var>-
                            </span>
                        </div>
                        
                    </div>                       
                </div>                
            </div>                
        </div>
    </body>
</html>

Leave a comment