File:  [LON-CAPA] / loncom / homework / templates / custompartial.problem
Revision 1.2: download - view: text, annotated - select for diffs
Mon Jul 6 17:12:47 2009 UTC (15 years ago) by bisitz
Branches: MAIN
CVS tags: version_2_9_99_0, version_2_10_X, version_2_10_1, version_2_10_0_RC2, version_2_10_0_RC1, version_2_10_0, loncapaMITrelate_1, bz6209-base, bz6209, bz2851, PRINT_INCOMPLETE_base, PRINT_INCOMPLETE, HEAD, GCI_3
Consistent problem templates:
- New line after each tag (not for texts in foils)
- One empty row after each end tag and before new start tag for second level tags
- No indentation for second level tags, e.g. <script>
- Four white spaces as indentation for each further sub level
    Exceptions:
        -Content (mostly text) in separate line(s): no indentation
        - Concept groups: same indentation as foilgroup
          (allows to insert code from problems without concept groups without changing the indentation and vice versa)
- No new line at end of template
- Removed new lines from within the middle of default texts
- Added one blank each after "<m>$" and before "$</m>" to ensure no misinterpretation neither by human nor by machine (e.g. "<m>$x" is not "<m>$ $x")
- Replaced deprecated font tag in <instructorcomment> by CSS
- Removed dos line endings
- dos2unix conversion
  (ClickImageExample.problem, RandomLabelExample.problem, SimpleMatching.problem)

    1: <problem>
    2: 
    3: <startouttext />
    4: Complete the sentence:
    5: <endouttext />
    6: 
    7: <customresponse id="11">
    8:     <notsolved>
    9:         <startouttext />
   10: The q<textline readonly="no" size="5" /> brown fox jum<textline readonly="no" size="3" /> over the <textline readonly="no" size="3" />zy d<textline readonly="no" size="3" />.
   11:         <endouttext />
   12:     </notsolved>
   13:     <solved>
   14:         <startouttext />
   15: The q<b>uick</b> brown fox jum<b>ps</b> over the <b>la</b>zy d<b>og</b>.
   16:         <endouttext />
   17:     </solved>
   18:     <answer type="loncapa/perl">
   19: @answer=('uick','ps','la','og');
   20: $correct=0;
   21: for ($i=0;$i<=$#$submission;$i++) {
   22:     $$submission[$i]=~s/\s//gs;
   23:     if ($$submission[$i] eq $answer[$i]) { $correct++; }
   24: }
   25: if ($correct==$#answer+1) { return 'EXACT_ANS'; }
   26: if ($correct==0) { return 'INCORRECT'; }
   27: return('ASSIGNED_SCORE',$correct/($#answer+1));
   28:     </answer>
   29: </customresponse>
   30: 
   31: </problem>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>