Changeset 30376 for trunk/ippTasks/survey.pro
- Timestamp:
- Jan 26, 2011, 10:13:30 AM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippTasks/survey.pro (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/survey.pro
r30257 r30376 367 367 # user functions to manipulate publish labels 368 368 macro survey.add.publish 369 if ($0 != 3)370 echo "USAGE: survey.add.publish ( label) (client_id)"369 if ($0 != 5) 370 echo "USAGE: survey.add.publish (tag) (label) (client_id) (comment)" 371 371 break 372 372 end 373 373 book newpage SURVEY_PUBLISH $1 374 book setword SURVEY_PUBLISH $1 CLIENT_ID $2 374 book setword SURVEY_PUBLISH $1 LABEL $2 375 book setword SURVEY_PUBLISH $1 CLIENT_ID $3 376 book setword SURVEY_PUBLISH $1 COMMENT $4 375 377 book setword SURVEY_PUBLISH $1 STATE PENDING 376 378 end … … 1089 1091 endif 1090 1092 1091 book getpage SURVEY_PUBLISH 0 -var label -key STATE NEW 1092 if ("$label" == "NULL") 1093 # All labels have been done --- reset 1094 # echo "Resetting labels" 1093 # survey.publish allows multiple entries per label. 1094 # The key is called tag and must be unique 1095 book getpage SURVEY_PUBLISH 0 -var tag -key STATE NEW 1096 if ("$tag" == "NULL") 1097 # All tags have been done --- reset 1098 # echo "Resetting tags" 1095 1099 for i 0 $N 1096 book getpage SURVEY_PUBLISH $i -var label1097 book setword SURVEY_PUBLISH $ labelSTATE NEW1100 book getpage SURVEY_PUBLISH $i -var tag 1101 book setword SURVEY_PUBLISH $tag STATE NEW 1098 1102 end 1099 book getpage SURVEY_PUBLISH 0 -var label-key STATE NEW1103 book getpage SURVEY_PUBLISH 0 -var tag -key STATE NEW 1100 1104 1101 1105 # Select different database … … 1104 1108 end 1105 1109 1106 book setword SURVEY_PUBLISH $label STATE DONE 1107 book getword SURVEY_PUBLISH $label CLIENT_ID -var client_id 1110 book setword SURVEY_PUBLISH $tag STATE DONE 1111 book getword SURVEY_PUBLISH $tag LABEL -var label 1112 book getword SURVEY_PUBLISH $tag CLIENT_ID -var client_id 1113 book getword SURVEY_PUBLISH $tag COMMENT -var comment 1108 1114 1109 1115 $run = pubtool -definerun -label $label -client_id $client_id 1116 1117 if ("$comment" != "NULL") 1118 $run = $run -comment $comment 1119 end 1110 1120 1111 1121 if ($DB:n == 0) … … 1116 1126 end 1117 1127 1118 #echo $run 1128 echo $run 1129 1119 1130 command $run 1131 1120 1132 end 1121 1133
Note:
See TracChangeset
for help on using the changeset viewer.
