| High Point University
home | WebAssign | textbook | AST 121 Calendar course calendar
0) mkdir($dir, $rights); } } if (isset($_POST["Submit"])) { if ($_POST["course"]==$COURSEPREFIX) { $comments=$_POST["comments"]; $comments=str_replace("\n\r", " ", $comments); $comments=str_replace("\n", " ", $comments); $comments=str_replace("\r", " ", $comments); $values = $_POST["semester"]."\t".$_POST["year"]."\t". $_POST["stars"]. "\t" . $comments ."\n"; #. "\t" .$_POST["interest"] . "\t" . $_POST["effectiveness"] . "\t" . $_POST["email"] ."\n"; $feedbackFilename=getFeedbackPath($section)."feedback.txt"; $feedbackPath=getFeedbackPath($section); if(!file_exists($feedbackFilename)) { mkdir_r($feedbackPath,0775); } $open = fopen( $feedbackFilename, "a" ); fwrite( $open, $values); fclose( $open ); $message="

 

Your feedback was received. THANK YOU!

 

"; } else { $message="

 

You submitted feedback but did not include the course name. You must include the course name in the feedback.

 

"; } print $message; } ?>

"; } else { $commentsTable=$commentsTable.""; } } $aveStars=$totalStars/$responses; $roundedAveStars=round(2*$aveStars)/2; $starsImage="./images/ratingstars/stars-".$roundedAveStars.".gif"; print "

Average Rating:

"; $commentsTable=$commentsTable."

 

 

 

 

"; while (($data = fgetcsv($handle, 5000, "\t")) !== FALSE) { $thisStar=$data[2]; if($thisStar!="") { $thisComment=$data[3]; $totalStars=$totalStars+$thisStar; $responses++; $commentsTable=$commentsTable."
$thisComment
 $thisComment
"; print $commentsTable; } } } ?>