Giter Site home page Giter Site logo

auto-mark-processing-in-edx's Introduction

auto-mark-processing-in-edX

for a processing IDE within edXs advanced javascript problem

edX problem template:

Note: automarking algorith is in the javascript file and returns "correct", alternatively you can return other values and implement automarking in python within the check_function(e,ans):

<problem>
    <customresponse cfn="check_function">
        <script type="loncapa/python">
<![CDATA[
import json
def check_function(e, ans):
    """
    "response" is a dictionary that contains two keys, "answer" and
    ""state".

    The value of "answer" is the JSON string that "getGrade" returns.
    The value of "state" is the JSON string that "getState" returns.
    Clicking either "Submit" or "Save" registers the current state.

    response = json.loads(ans)

    # You can use the value of the answer key to grade:
    answer = json.loads(response["answer"])
    return answer == "correct"

    # Or you can use the value of the state key to grade:
    """
    response = json.loads(ans)
    state = json.loads(response["state"])
    return state["selectedChoice"] == "correct"
    """
    return True
    """
]]>
        </script>
        <jsinput
            gradefn="JSInputDemo.getGrade"
            get_statefn="JSInputDemo.getState"
            set_statefn="JSInputDemo.setState"
       initial_state='{"default":"background(0);\ntext(\"hello world!\",20,50);","selectedChoice":"incorrect1"}'
            width="600"
            height="480"
            html_file="https://test.madmaker.com.au/processingIDE.html"
            title="Dropdown with Dynamic Text"
            sop="false"/>
    </customresponse>
</problem>

additional info:

Ace editor

textarea-as-ace-editor

Custom grading applications in edX 1

Custom grading applications in edX 2

Based of editor and processing-helper.js found here

preview:

alt text

auto-mark-processing-in-edx's People

Contributors

technisculpt avatar

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.