Annotation of loncom/interface/spreadsheet/default_assesscalc, revision 1.8

1.6       matthew     1: <field col=A row=0>
1.7       matthew     2: if ("[stores_0_solved]" eq 'excused') {
1.6       matthew     3:     'excused';
                      4: } elsif (M0) { 
                      5:     if(K0) {
                      6:         if (K0 == M0) {
                      7:             "correct";
1.7       matthew     8:         } elsif (K0 < M0) {
                      9:             K0.'/'.M0.' correct';
1.6       matthew    10:         } else {
1.7       matthew    11:             'correct';
1.6       matthew    12:         }
                     13:     } else {
                     14:         "incorrect";
                     15:     }
                     16: } else {
                     17:     '';
                     18: }
                     19: </field>
                     20: 
1.1       www        21: <field col=B row=0>'Tries:'</field>
1.6       matthew    22: <field col=C row=0>
                     23: if (M0) {
                     24:     [&EXPANDSUM(PART;stores_PART_tries)]/M0;
                     25: } else {
                     26:     '';
                     27: }
                     28: </field>
                     29: 
1.3       www        30: <field col=D row=0>'Timestamp:'</field>
                     31: <field col=E row=0>[timestamp]</field>
1.6       matthew    32: <field col=F row=0>
                     33: if ([timestamp]>100000000) { 
                     34:     $tmp = localtime([timestamp]); 
                     35:     $tmp =~ s/\s/&nbsp;/g;
                     36:     $tmp;
                     37: } else {
                     38:     '';
                     39: }
                     40: </field>
                     41: 
1.8     ! bisitz     42: <field col=G row=0>'Due Date:'</field>
1.6       matthew    43: <field col=H row=0>[parameter_0_duedate]</field>
                     44: <field col=I row=0>
                     45: if ([parameter_0_duedate]>100000000) { 
                     46:     $tmp = localtime([parameter_0_duedate]); 
                     47:     $tmp =~ s/\s/&nbsp;/g;
                     48:     $tmp;
                     49: } else {
                     50:     '';
                     51: }
                     52: </field>
                     53: 
                     54: <field col=J row=0>'Attempted Parts:'</field>
1.7       matthew    55: <field col=K row=0>
                     56: [&EXPANDSUM(PART;(stores_PART_solved !~ /^(\W?excused\W?|)$/ ?1:0))]
                     57: </field>
1.6       matthew    58: 
                     59: <field col=L row=0>'Solved Parts:'</field>
                     60: <field col=M row=0>[&EXPANDSUM(PART;(stores_PART_awarded?1:0))]</field>
                     61: 
1.2       www        62: <field col=W row=0>'Available Points:'</field>
1.6       matthew    63: <field col=X row=0>
1.7       matthew    64: if ("[stores_0_solved]" eq 'excused') {
1.6       matthew    65:     0 
                     66: } else { 
1.7       matthew    67:     [&EXPANDSUM(PART;parameter_PART_weight*(stores_PART_solved !~ /^\W?excused\W?$/ ? 1 : 0))];
1.6       matthew    68: }
                     69: </field>
                     70: 
1.1       www        71: <field col=Y row=0>'Awarded Points:'</field>
1.6       matthew    72: <field col=Z row=0>
1.7       matthew    73: if ("[stores_0_solved]" eq 'excused') { 
1.6       matthew    74:     0 
                     75: } else { 
                     76:     [&EXPANDSUM(PART;parameter_PART_weight*stores_PART_awarded)]
                     77: }
                     78: </field>

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