[LON-CAPA-users] Spreadsheet Help!

Gerd Kortemeyer lon-capa-users@mail.lon-capa.org
Sat, 16 Dec 2006 16:54:04 -0500


Hi,

On Dec 15, 2006, at 6:25 PM, Todd Ruskell wrote:

> I swear I had this working earlier in the semester, but it's not  
> now.  I
> need to find the number of parts in a problem that have *not* been
> excused.  I tried pulling some code from the default spreadsheet, and
> this is what I'm trying:
>
> [&EXPANDSUM(PART;1*(stores_PART_solved !~ /^(\W?excused\W?|)$/ ? 
> 1:0))];
>
> The problem is, this seems to always return the total number of parts.
> I'm not a perl genius, so it's probably (hopefully?) something simple.
> What am I missing/doing wrong?

Hmm ... what happens if you do the simpler

[&EXPANDSUM(PART;1*(stores_PART_solved !~ /excused/ ?1:0))];

- I don't think we have a return code that includes "excused" but  
isn't excused.

- Gerd.