Commit 1f34561c by Vik Paruchuri

Update examples, fix parsing error, avoid collision with capa template

parent 4dab8f07
......@@ -32,19 +32,22 @@
</openended>
</script>
<script type="text/template" id="simple-editor-cheatsheet">
<article class="simple-editor-cheatsheet">
<script type="text/template" id="simple-editor-open-ended-cheatsheet">
<article class="simple-editor-open-ended-cheatsheet">
<div class="cheatsheet-wrapper">
<div class="row">
<h6>Prompt</h6>
<div class="col prompt">
</div>
<div class="col">
<pre><code>
<pre><code>
[prompt]
Why is the sky blue?
[prompt]
</code></pre>
</code></pre>
</div>
<div class="col">
<p>The student will respond to the prompt. The prompt can contain any html tags, such as paragraph tags and header tags.</p>
</div>
</div>
<div class="row">
......@@ -53,17 +56,21 @@
</div>
<div class="col">
<pre><code>
[rubric]
+ Color Identification
- Incorrect
- Correct
+ Grammar
- Poor
- Acceptable
- Superb
[rubric]
[rubric]
+ Color Identification
- Incorrect
- Correct
+ Grammar
- Poor
- Acceptable
- Superb
[rubric]
</code></pre>
</div>
<div class="col">
<p>The rubric is used for feedback and self-assessment. The rubric can have as many categories (+) and options (-) as desired. </p>
<p>The total score for the problem will be the sum of all the points possible on the rubric. The options will be numbered sequentially from zero in each category, so each category will be worth as many points as its number of options minus one. </p>
</div>
</div>
<div class="row">
<h6>Tasks</h6>
......@@ -71,11 +78,17 @@
</div>
<div class="col">
<pre><code>
[tasks]
(Self), ({2-5}AI), ({4-5}Peer)
[tasks]
[tasks]
(Self), ({1-3}AI), ({2-3}Peer)
[tasks]
</code></pre>
</div>
<div class="col">
<p>The tasks define what feedback the student will get from the problem.</p>
<p>Each task is defined with parentheses around it. Brackets (ie {2-5} above), specify the minimum and maximum score needed to attempt the given task.</p>
<p>In the example above, the student will first be asked to self-assess. If they give themselves greater than or equal to a 1/3 and less than or equal to a 3/3 on the problem, then they will be moved to AI assessment. If they score themselves a 2/3 or 3/3 on AI assessment, they will move to peer assessment.</p>
<p>Students will be given feedback from each task, and their final score for a given attempt of the problem will be their score last task that is completed.</p>
</div>
</div>
</div>
</article>
......
......@@ -39,7 +39,7 @@
}
}
.simple-editor-cheatsheet {
.simple-editor-open-ended-cheatsheet {
position: absolute;
top: 0;
left: 100%;
......
class @OpenEndedMarkdownEditingDescriptor extends XModule.Descriptor
# TODO really, these templates should come from or also feed the cheatsheet
@rubricTemplate : "[rubric]\n+ Color Identification\n- Incorrect\n- Correct\n + Grammar\n- Poor\n- Acceptable\n- Superb \n[rubric]\n"
@tasksTemplate: "[tasks]\n(Self), ({2-5}AI), ({4-5}Peer)\n[tasks]\n"
@promptTemplate: "[prompt]\nWhy is the sky blue?\n[prompt]\n"
@rubricTemplate : """
[rubric]
+ Ideas and Content
- Difficult for the reader to discern the main idea. Too brief or too repetitive to establish or maintain a focus
- Attempts a main idea. Sometimes loses focus or ineffectively displays focus
- Presents a unifying theme or main idea, but may include minor tangents. Stays somewhat focused on topic and task.
- Presents a unifying theme or main idea without going off on tangents. Stays completely focused on topic and task.
+ Organization
- Ideas organized illogically, transitions weak, and response difficult to follow.
- Attempts to logically organize ideas. Attempts to progress in an order that enhances meaning, and demonstrates use of transitions.
- Ideas organized logically. Progresses in an order that enhances meaning. Includes smooth transitions.
+ Style
- Contains limited vocabulary, with many words used incorrectly. Demonstrates problems with sentence patterns.
- Contains basic vocabulary, with words that are predictable and common. Contains mostly simple sentences (although there may be an attempt at more varied sentence patterns).
- Includes vocabulary to make explanations detailed and precise. Includes varied sentence patterns, including complex sentences.
+ Voice
- Demonstrates language and tone that may be inappropriate to task and reader.
- Demonstrates an attempt to adjust language and tone to task and reader.
- Demonstrates effective adjustment of language and tone to task and reader.
[rubric]
"""
@tasksTemplate: "[tasks]\n(Self), ({3-9}AI), ({7-9}Peer)\n[tasks]\n"
@promptTemplate: """
[prompt]\n
<h3>Censorship in the Libraries</h3>
<p>'All of us can think of a book that we hope none of our children or any other children have taken off the shelf. But if I have the right to remove that book from the shelf -- that work I abhor -- then you also have exactly the same right and so does everyone else. And then we have no books left on the shelf for any of us.' --Katherine Paterson, Author
</p>
<p>
Write a persuasive essay to a newspaper reflecting your vies on censorship in libraries. Do you believe that certain materials, such as books, music, movies, magazines, etc., should be removed from the shelves if they are found offensive? Support your position with convincing arguments from your own experience, observations, and/or reading.
</p>
[prompt]\n
"""
constructor: (element) ->
@element = element
......@@ -82,8 +114,8 @@ class @OpenEndedMarkdownEditingDescriptor extends XModule.Descriptor
###
toggleCheatsheet: (e) =>
e.preventDefault();
if !$(@markdown_editor.getWrapperElement()).find('.simple-editor-cheatsheet')[0]
@cheatsheet = $($('#simple-editor-cheatsheet').html())
if !$(@markdown_editor.getWrapperElement()).find('.simple-editor-open-ended-cheatsheet')[0]
@cheatsheet = $($('#simple-editor-open-ended-cheatsheet').html())
$(@markdown_editor.getWrapperElement()).append(@cheatsheet)
setTimeout (=> @cheatsheet.toggleClass('shown')), 10
......@@ -153,14 +185,19 @@ class @OpenEndedMarkdownEditingDescriptor extends XModule.Descriptor
xml = xml.replace(/\[rubric\]\n?([^\]]*)\[\/?rubric\]/gmi, function(match, p) {
var groupString = '<rubric>\n<rubric>\n';
var options = p.split('\n');
var category_open = false;
for(var i = 0; i < options.length; i++) {
if(options[i].length > 0) {
var value = options[i].replace(/^\s+|\s+$/g,'');
if (value.charAt(0)=="+") {
if(i>0){
if(category_open==true){
groupString += "</category>\n";
category_open = false;
}
}
groupString += "<category>\n<description>\n";
category_open = true;
text = value.substr(1);
text = text.replace(/^\s+|\s+$/g,'');
groupString += text;
......@@ -173,7 +210,7 @@ class @OpenEndedMarkdownEditingDescriptor extends XModule.Descriptor
groupString += "\n</option>\n";
}
}
if(i==options.length-1){
if(i==options.length-1 && category_open == true){
groupString += "\n</category>\n";
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment