forked from trampgeek/moodle-qtype_coderunner
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update unsupported C# DOTNET prototypes and examples.
- Loading branch information
Showing
5 changed files
with
537 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
152 changes: 152 additions & 0 deletions
152
unsupportedquestiontypes/examples/dotnet_c#_method_example.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<quiz> | ||
<!-- question: 53194 --> | ||
<question type="coderunner"> | ||
<name> | ||
<text>C# sqr method</text> | ||
</name> | ||
<questiontext format="html"> | ||
<text><![CDATA[<p>Write a static C# method <code>static int sqr(int n)</code> that returns the square of its parameter <code>n</code>. Write only the method, not the test class - your method will be wrapped in a class when tested.</p>]]></text> | ||
</questiontext> | ||
<generalfeedback format="html"> | ||
<text></text> | ||
</generalfeedback> | ||
<defaultgrade>1</defaultgrade> | ||
<penalty>0</penalty> | ||
<hidden>0</hidden> | ||
<idnumber></idnumber> | ||
<coderunnertype>csharpdotnetmethod</coderunnertype> | ||
<prototypetype>0</prototypetype> | ||
<allornothing>1</allornothing> | ||
<penaltyregime>10, 20, ...</penaltyregime> | ||
<precheck>0</precheck> | ||
<hidecheck>0</hidecheck> | ||
<showsource>0</showsource> | ||
<answerboxlines>8</answerboxlines> | ||
<answerboxcolumns>100</answerboxcolumns> | ||
<answerpreload></answerpreload> | ||
<globalextra></globalextra> | ||
<useace></useace> | ||
<resultcolumns></resultcolumns> | ||
<template></template> | ||
<iscombinatortemplate></iscombinatortemplate> | ||
<allowmultiplestdins></allowmultiplestdins> | ||
<answer>static int sqr(int n) { | ||
return n * n; | ||
}</answer> | ||
<validateonsave>1</validateonsave> | ||
<testsplitterre></testsplitterre> | ||
<language></language> | ||
<acelang></acelang> | ||
<sandbox></sandbox> | ||
<grader></grader> | ||
<cputimelimitsecs></cputimelimitsecs> | ||
<memlimitmb></memlimitmb> | ||
<sandboxparams></sandboxparams> | ||
<templateparams></templateparams> | ||
<hoisttemplateparams>1</hoisttemplateparams> | ||
<extractcodefromjson>1</extractcodefromjson> | ||
<templateparamslang>None</templateparamslang> | ||
<templateparamsevalpertry>0</templateparamsevalpertry> | ||
<templateparamsevald><![CDATA[{"total_time_budget":10,"warnings_are_errors":true,"profiling":false}]]></templateparamsevald> | ||
<twigall>0</twigall> | ||
<uiplugin></uiplugin> | ||
<uiparameters></uiparameters> | ||
<attachments>0</attachments> | ||
<attachmentsrequired>0</attachmentsrequired> | ||
<maxfilesize>10240</maxfilesize> | ||
<filenamesregex></filenamesregex> | ||
<filenamesexplain></filenamesexplain> | ||
<displayfeedback>1</displayfeedback> | ||
<giveupallowed>0</giveupallowed> | ||
<prototypeextra></prototypeextra> | ||
<testcases> | ||
<testcase testtype="0" useasexample="1" hiderestiffail="0" mark="1.0000000" > | ||
<testcode> | ||
<text>Console.WriteLine(sqr(-11));</text> | ||
</testcode> | ||
<stdin> | ||
<text></text> | ||
</stdin> | ||
<expected> | ||
<text>121</text> | ||
</expected> | ||
<extra> | ||
<text></text> | ||
</extra> | ||
<display> | ||
<text>SHOW</text> | ||
</display> | ||
</testcase> | ||
<testcase testtype="0" useasexample="1" hiderestiffail="0" mark="1.0000000" > | ||
<testcode> | ||
<text>Console.WriteLine(sqr(100));</text> | ||
</testcode> | ||
<stdin> | ||
<text></text> | ||
</stdin> | ||
<expected> | ||
<text>10000</text> | ||
</expected> | ||
<extra> | ||
<text></text> | ||
</extra> | ||
<display> | ||
<text>SHOW</text> | ||
</display> | ||
</testcase> | ||
<testcase testtype="0" useasexample="0" hiderestiffail="0" mark="1.0000000" > | ||
<testcode> | ||
<text>Console.WriteLine(sqr(-100));</text> | ||
</testcode> | ||
<stdin> | ||
<text></text> | ||
</stdin> | ||
<expected> | ||
<text>10000</text> | ||
</expected> | ||
<extra> | ||
<text></text> | ||
</extra> | ||
<display> | ||
<text>SHOW</text> | ||
</display> | ||
</testcase> | ||
<testcase testtype="0" useasexample="0" hiderestiffail="0" mark="1.0000000" > | ||
<testcode> | ||
<text>Console.WriteLine(sqr(0));</text> | ||
</testcode> | ||
<stdin> | ||
<text></text> | ||
</stdin> | ||
<expected> | ||
<text>0</text> | ||
</expected> | ||
<extra> | ||
<text></text> | ||
</extra> | ||
<display> | ||
<text>SHOW</text> | ||
</display> | ||
</testcase> | ||
<testcase testtype="0" useasexample="0" hiderestiffail="0" mark="1.0000000" > | ||
<testcode> | ||
<text>Console.WriteLine(sqr(-17));</text> | ||
</testcode> | ||
<stdin> | ||
<text></text> | ||
</stdin> | ||
<expected> | ||
<text>289</text> | ||
</expected> | ||
<extra> | ||
<text></text> | ||
</extra> | ||
<display> | ||
<text>HIDE</text> | ||
</display> | ||
</testcase> | ||
</testcases> | ||
</question> | ||
|
||
</quiz> |
File renamed without changes.
Oops, something went wrong.