 
         v.sort (a,b) ->
             return misc.cmp(a.sort, b.sort)
+        num_omitted = 0
         if @state.search
             words  = misc.split(@state.search.toLowerCase())
             search = (a) -> ((a.last_name ? '') + (a.first_name ? '') + (a.email_address ? '')).toLowerCase()
             match  = (s) ->
                 for word in words
                     if s.indexOf(word) == -1
+                        num_omitted += 1
                         return false
                 return true
             v = (x for x in v when match(search(x)))
-        for x in v
+
+        return {students:v, num_omitted:num_omitted}
+
+    render_students: (students) ->
+        for x in students
             <Student key={x.student_id} student_id={x.student_id} student={@props.students.get(x.student_id)}
                      user_map={@props.user_map} flux={@props.flux} name={@props.name} />
 
     render :->
-        <Panel header={@render_header()}>
-            {@render_students()}
+        {students, num_omitted} = @compute_student_list()
+        <Panel header={@render_header(num_omitted)}>
+            {@render_students(students)}
         </Panel>
 
 

        if @state.err
            <ErrorDisplay error={@state.err} onClose={=>@setState(err:undefined)} />

    render_header: ->
        <div>
            <Row>
                <Col md=5>
                    <Input
                        ref         = 'student_search_input'
                        type        = 'text'

                        onChange    = {=>@setState(search:@refs.assignment_search_input.getValue())}
                    />
                </Col>
                <Col md=3>
                    {<h5>(Omitting {num_omitted} assignments)</h5> if num_omitted}
                </Col>
                <Col md=5 mdOffset=1>
                    <form onSubmit={@do_add_search}>
                        <Input
                            ref         = 'assignment_add_input'
