--- capa/capa51/Discuss/Ver1.3/Attic/capadiscuss 1999/10/18 20:58:33 1.4
+++ capa/capa51/Discuss/Ver1.3/Attic/capadiscuss 2000/01/31 18:34:12 1.7
@@ -1,13 +1,15 @@
#!/usr/ucb/perl
#
# CAPA Discussion Forum
-# version 1.3
+# version 1.3.0
#
# Michigan State University
# Department of Physics and Astronomy
#
# Ryan J. Shaltry
# tech4@msue.msu.edu
+# Guy Albertelli
+# albertel@msu.edu
print "Content-type: text/html\n\n";
@@ -170,6 +172,7 @@ if($debug) {$BenchmarkTb = new Benchmark
}
sub ViewSet {
+ local($hidden);
if ($debug) {print "InsideViewSet
";$BenchmarkTa = new Benchmark;}
&Log("ViewSet");
&CheckAdmin;
@@ -213,6 +216,7 @@ if($debug) {$BenchmarkTb = new Benchmark
$col = 1;
for($probnum=1; $probnum<=$maxprobs; $probnum++) {
+ $hidden=0;
if($col eq "1" && $probnum > $col1size && $bigtable eq "yes") {
$col = 2;
&ViewSetEndColHTML;
@@ -224,13 +228,19 @@ if($debug) {$BenchmarkTb = new Benchmark
closedir(MSG);
foreach $msg(@msgs) {
if(&RemZero(substr($msg,0,6)) eq $probnum) {
- push(@good,$msg);
+ &OpenMsg("$capadir/$class/discussion/$setid/$msg");
+ if(!($status eq "hidden" && $validadmin ne "yes")) {
+ push(@good,$msg);
+ } else { $hidden++; }
}
}
-
- &OpenMsg("$capadir/$class/discussion/$setid/$good[$#good]");
- $lastpost = "$date at $time";
- $posts = $found[$probnum];
+ $posts = $found[$probnum]-$hidden;
+ if ($posts >0) {
+ &OpenMsg("$capadir/$class/discussion/$setid/$good[$#good]");
+ $lastpost = "$date at $time";
+ } else {
+ $lastpost = "--";
+ }
}
else {
$lastpost = "--";
@@ -327,8 +337,8 @@ sub ViewProblem {
$hidebutton = &UnHideButtonHTML;
$messagenote = "Hidden by $hiddenuser on $hiddendate at $hiddentime from $hiddenaddr";
}
- $message =~ s/</g;
- $message =~ s/>/>/g;
+# $message =~ s/</g;
+# $message =~ s/>/>/g;
&ViewProblemGutsHTML;
}
}
@@ -582,10 +592,24 @@ sub WriteMsg {
$filename = shift(@_);
# add sr to grab e-mail address of user
+
+ #