curriculum_get_output_cookie

one of the documented procedures in this installation of the ACS
Usage:
curriculum_get_output_cookie
What it does:
Returns the value of the CurriculumProgress cookie that will be written to the client, or empty string if none is in the outputheaders ns_set
Defined in: /web/philip/tcl/curriculum.tcl

Source code:


    if [empty_string_p [ns_conn outputheaders]] {
	return ""
    }
    set set_id [ns_conn outputheaders]
    for {set i 0} {$i<[ns_set size $set_id]} {incr i} {
	if { [string compare [ns_set key $set_id $i] "Set-Cookie"] == 0 } {
	    # it is a Set-Cookie header 
	    if { [regexp {CurriculumProgress=([^;]+)} [ns_set value $set_id $i] {} curriculum_progress] } {
		# it IS for the CurriculumProgress cookie
		return $curriculum_progress
	    }
	}
    }
    # if we got here, means we didn't find anything 
    return ""


philg@mit.edu