Assignments can now be marked as graded.
authorSteven Schronk <[email protected]>
Fri, 25 May 2012 17:09:15 +0000 (25 12:09 -0500)
committerbob <bob@dev.(none)>
Thu, 31 May 2012 02:48:16 +0000 (30 21:48 -0500)
comment.php
graded.php [new file with mode: 0644]
header.php
style.css

index 1a9e422..cce1c22 100644 (file)
@@ -27,11 +27,38 @@ $result = mysql_query($sql);
 
 if (!$result) { die("SQL ERROR"); } else {
 
+// send message to user as reciept of file
+
+$uid = md5(uniqid(time()));
+
+/*
+$from_name = "Assignment Trapper";
+$from_mail = "[email protected]";
+
+$message  = "Comment about Assignment<br><br>";
+$message .= '<a href=http://opentextbook.info/at/detail_root.php?sched='.$_GET["sched"].'>Click Here</a> to view.';
+
+$header = "From: ".$from_name." <".$from_mail.">\r\n";
+$header .= "Reply-To: ".$replyto."\r\n";
+$header .= "MIME-Version: 1.0\r\n";
+$header .= "Content-Type: multipart/mixed; boundary=\"".$uid."\"\r\n\r\n";
+$header .= "This is a multi-part message in MIME format.\r\n";
+$header .= "--".$uid."\r\n";
+$header .= "Content-type:text/html; charset=iso-8859-1\r\n";
+$header .= "Content-Transfer-Encoding: 7bit\r\n\r\n";
+$header .= $message;
+
+//mail($user_email, "Comment About Assignment", "", $header);
+mail("[email protected]", "Comment About Assignment", "", $header);
+
+*/
+
+echo "<br>".$header."<br>";
+
 echo "Data Posted Sucessfully<br><br>";
 
 echo 'Click <a href=detail_root.php?sched='.$_GET["sched"].'>Here</a> To Return to Assignment Details';
 
-
 //echo '<html><meta http-equiv="refresh" content="0; detail.php?sched='.$_GET["sched"].'" /></html>';
 
 }
diff --git a/graded.php b/graded.php
new file mode 100644 (file)
index 0000000..2f32671
--- /dev/null
@@ -0,0 +1,19 @@
+<?php
+
+include_once("auth.php");
+include_once("header.php");
+include_once("time.php");
+
+if($role != 0) { die("Account \"".$user_name."\" Is Not Authorized To View This Page.<br><br>This Event Will Be Logged And Reported."); }
+
+// set assignment to graded if link on page is clicked
+if(isset($_GET['action']) && isset($_GET['sched'])  )
+{
+       //echo "Update schedule";
+       $sql = 'update schedule set graded = 1 where sched_id = '.$_GET['sched'];
+
+       $result = mysql_query($sql);
+}
+
+
+
index b94afbc..0f5eac2 100644 (file)
@@ -10,7 +10,7 @@ if($user_id != '') {
                                <li><a href="manage.php">Manage Accounts</a></li>
                                <li><a href="workflow.php">Workflows</a></li>
                                <li><a href="#" onClick="logout();">Logout</a></li>
-                               <li>'.$_COOKIE["username"].'</li>
+                               <li><a href="#">'.$_COOKIE["username"].'</a></li>
                        </ul></div>';
 
        } else {
@@ -20,7 +20,7 @@ if($user_id != '') {
                                <li><a href="index.php">Classes</a></li>
                                <li><a href="manage.php">Manage Account</a></li>
                                <li><a href="#" onClick="logout();">Logout</a></li>
-                               <li>'.$_COOKIE["username"].'</li>
+                               <li><a href="#">'.$_COOKIE["username"].'</a></li>
                        </ul></div>';
 
        }
@@ -31,6 +31,9 @@ if($user_id != '') {
 ?>
 
 <html>
+<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
+<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
+<META HTTP-EQUIV="EXPIRES" CONTENT="<?php echo gmdate('D, d M Y H:i:s') . ' GMT' ?>">
 <script type="text/javascript" src="ajax.js"></script>
 <script type="text/javascript" src="debugger.js"></script>
 <script type="text/javascript" src="general.js"></script>
dissimilarity index 83%
index f2bc0df..27df791 100644 (file)
--- a/style.css
+++ b/style.css
-/*
-
-red    = #ffb2d2 code
-blue   = #c5bcff comments
-yellow = #ffefb2 faculty
-green  = #deffb2 students
-lt grey= #666
-
-*/
-
-body {
-       padding: 10px;
-       margin: 10px;
-       font-family: Tahoma, Arial, Helvetica, sans-serif;
-       font-size: 15px;
-}
-
-.col1 {
-       position: relative;
-       overflow: hidden;
-       float: left;
-       width: 20%;
-       left: 10%;
-}
-
-.col2 {
-       position: relative;
-       overflow: hidden;
-       float: left;
-       width: 48%;
-       left: 3%;
-}
-
-pre { margin: 0px; }
-
-table.gridtable {
-       color:#333333;
-       border-width: 1px;
-       border-color: #666666;
-       border-collapse: collapse;
-}
-table.gridtable th {
-       border-width: 1px;
-       padding: 8px;
-       border-style: solid;
-       border-color: #666666;
-       background-color: #dedede;
-}
-table.gridtable td {
-       border-width: 1px;
-       padding: 8px;
-       border-style: solid;
-       border-color: #666666;
-       background-color: #ffffff;
-}
-
-.menu {
-       width: 100%;
-       margin: 10px;
-       background: #eee none;
-}
-
-.menu ul {
-       margin: 0;
-       padding: 0;
-       list-style-type: none;
-}
-
-.menu li {
-       margin: 10px;
-       padding: 0px;
-       float: left;
-}
-
-.menu a {
-       display: block;
-       width: 100%;
-       text-decoration: none;
-}
-
-.menu a:hover {
-       color: #000;
-       border-bottom: 2px solid #000;
-}
-
-.header { position: absolute; top: 5px; right: 20px; }
-.highlight{background:#fff;}
-.line_numbers{background-color:#ececec; color:#aaa; padding:1em .5em; border-right:1px solid #ddd; text-align:right;}
-
-/* .file {border:1px solid #ddd; } */
-.file_head {  padding-left: 15px; padding-top: 3px; border: 1px solid #000; background-color: #c5bcff; }
-
-/*.comment {border:1px solid #ddd; width: 95%; margin-left: 10px; margin-right: 10px;}*/
-.com_body { padding-left: 15px; }
-/*.com_date_human { position: relative; left: 100px; top: -8px; color: #666;}*/
-.com_name { position: absolute; left: 100px; padding-top: 7px;  }
-.com_head     { padding-left: 15px; padding-top: 3px; border: 1px solid #000; background-color: #deffb2; }
-.com_head_fac { padding-left: 15px; padding-top: 3px; border: 1px solid #000; background-color: #ffefb2; }
-.com_date { position: absolute; left: 500px; padding-top: 7px; }
-.com_human { position: absolute; left: 300px; padding-top: 7px;  }
-
-.comment_username { position: relative; right: 100px; top: -8px; }
-.comment_time { position: relative; right: 0px; top: -8px;  }
-
-.fname { position: absolute; left: 100px; padding-top: 7px;}
-.fsize { position: absolute;  right: 500px;  padding-top: 7px; color: #666; }
-.fdate { position: absolute;  right: 250px;  padding-top: 7px; color: #666;  }
-.fedit { position: relative;  left: 240px; top: -8px;  }
-.fraw  { position: relative;  left: 340px; top: -8px;  }
-.fhuman { position: absolute;  right: 100px;  padding-top: 7px; color: #666;  }
-.class_block { border:1px solid #000; width: 85%; margin: 20px; padding: 20px; background-color: #eee; }
-
-.cmnt_count { padding: 20px; }
-
-#top_bar {
-       position: absolute;
-       background-color: #004890;
-       color: #fff;
-       border-bottom: 1px solid #000;
-       padding: 3px;
-       top: 0px;
-       left: 0px;
-       width: 100%;
-}
-
-.input {
-       background-color: #ddf;
-       border: 1px solid #bbb;
-       padding: 10px;
-       margin: 20px;
-}
-
-.input_form {
-       text-align: right;
-       padding-right: 20px;
-}
-
-.input_error {
-       color: #d00;
-}
-
-.input_name {
-       font-family: Tahoma, Arial, Helvetica, sans-serif;
-       font-size: 15px;
-       font-weight: bold;
-}
-
-.input_description {
-       font-family: sans-serif;
-       font-size: 14px;
-       color: #555;
-}
-
-#line:hover {
-       background-color: #ff0;
-}
-
-.line_add {
-       float: left;
-}
-
-.line_num {
-       width: 40px;
-       float: left;
-       background-color: #ddd;
-       padding-left: 5px;
-       color: #666;
-       }
-
-.line_dat {
-       margin: 1px;
-       }
-
-.line_comment_stu {
-       border-top: 1px solid #000;
-       display: none;
-       padding-left: 40px;
-       padding-top: 8px;
-       padding-bottom: 5px;
-       color: #1782b8;
-       background-color: #deffb2;
-}
-
-.line_comment_fac {
-       border-top: 1px solid #000;
-       display: none;
-       padding-left: 40px;
-       padding-top: 8px;
-       padding-bottom: 5px;
-       color: #1782b8;
-       background-color: #ffefb2;
-}
-
-.line_comment_display_fac {
-       border-top: 1px solid #000;
-       padding-left: 40px;
-       padding-top: 8px;
-       padding-bottom: 5px;
-       color: #1782b8;
-       background-color: #ffefb2;
-}
-
-.line_comment_display_stu {
-       border-top: 1px solid #000;
-       padding-left: 40px;
-       padding-top: 8px;
-       padding-bottom: 5px;
-       color: #1782b8;
-       background-color: #deffb2;
-}
-
-.line_comment_name {
-       color: #666;
-       position: absolute;
-       right: 55px;
-}
-
-.line_comment_time {
-       color: #666;
-       position: absolute;
-       right: 200px;
-}
-
-.comment_box {
-       color: #000;
-       border: 1px solid #000;
-       background-color: #dedede;
-       padding: 20px;
-       font-size: 20px;
-}
+/*
+
+red    = #ffb2d2 code
+blue   = #c5bcff comments
+yellow = #ffefb2 faculty
+green  = #deffb2 students
+lt grey= #666
+
+*/
+body {
+    padding: 10px;
+    margin: 10px;
+    font-family: Tahoma, Arial, Helvetica, sans-serif;
+    font-size: 15px;
+}
+.col1 {
+    position: relative;
+    overflow: hidden;
+    float: left;
+    width: 20%;
+    left: 10%;
+}
+.col2 {
+    position: relative;
+    overflow: hidden;
+    float: left;
+    width: 48%;
+    left: 3%;
+}
+pre { margin: 0px }
+table.gridtable {
+    color: #333333;
+    border-width: 1px;
+    border-color: #666666;
+    border-collapse: collapse;
+}
+table.gridtable th {
+    border-width: 1px;
+    padding: 8px;
+    border-style: solid;
+    border-color: #666666;
+    background-color: #dedede;
+}
+table.gridtable td {
+    border-width: 1px;
+    padding: 8px;
+    border-style: solid;
+    border-color: #666666;
+    background-color: #ffffff;
+}
+.menu {
+       /*background-color: #333;*/
+}
+
+.menu ul {
+       margin: 0;
+       padding: 0;
+       float: left;
+}
+
+.menu ul li {
+       display: inline;
+}
+
+.menu ul li a {
+       float: left; 
+       text-decoration: none;
+       margin-left: 25px;
+}
+
+.menu ul li a:visited {
+
+       text-decoration: none;
+}
+
+.menu ul li a:hover, .menu ul li .current {
+    color: #000;
+    border-bottom: 2px solid #000;
+}
+
+/*
+.menu {
+    width: 100%;
+    margin: 10px;
+    background: #eee none;
+}
+.menu ul {
+    margin: 0;
+    padding: 0;
+    list-style-type: none;
+    float: left;
+}
+.menu li {
+    margin: 10px;
+    padding: 0px;
+    float: left;
+}
+.menu a {
+    display: block;
+    width: 100%;
+    text-decoration: none;
+}
+.menu a:hover {
+    color: #000;
+    border-bottom: 2px solid #000;
+}
+*/
+
+
+.header {
+    position: absolute;
+    top: 5px;
+    right: 20px;
+}
+.highlight { background: #fff }
+.line_numbers {
+    background-color: #ececec;
+    color: #aaa;
+    padding: 1em .5em;
+    border-right: 1px solid #ddd;
+    text-align: right;
+}
+/* .file {border:1px solid #ddd; } _NO__DOTCOMMA__AFTER__*/
+.file_head {
+    padding-left: 15px;
+    padding-top: 3px;
+    border: 1px solid #000;
+    background-color: #c5bcff;
+}
+/*.comment {border:1px solid #ddd; width: 95%; margin-left: 10px; margin-right: 10px;}_NO__DOTCOMMA__AFTER__*/
+.com_body { padding-left: 15px }
+/*.com_date_human { position: relative; left: 100px; top: -8px; color: #666;}_NO__DOTCOMMA__AFTER__*/
+.com_name {
+    position: absolute;
+    left: 100px;
+    padding-top: 7px;
+}
+.com_head {
+    padding-left: 15px;
+    padding-top: 3px;
+    border: 1px solid #000;
+    background-color: #deffb2;
+}
+.com_head_fac {
+    padding-left: 15px;
+    padding-top: 3px;
+    border: 1px solid #000;
+    background-color: #ffefb2;
+}
+.com_date {
+    position: absolute;
+    left: 500px;
+    padding-top: 7px;
+}
+.com_human {
+    position: absolute;
+    left: 300px;
+    padding-top: 7px;
+}
+.comment_username {
+    position: relative;
+    right: 100px;
+    top: -8px;
+}
+.comment_time {
+    position: relative;
+    right: 0px;
+    top: -8px;
+}
+.fname {
+    position: absolute;
+    left: 100px;
+    padding-top: 7px;
+}
+.fsize {
+    position: absolute;
+    right: 500px;
+    padding-top: 7px;
+    color: #666;
+}
+.fdate {
+    position: absolute;
+    right: 250px;
+    padding-top: 7px;
+    color: #666;
+}
+.fedit {
+    position: relative;
+    left: 240px;
+    top: -8px;
+}
+.fraw {
+    position: relative;
+    left: 340px;
+    top: -8px;
+}
+.fhuman {
+    position: absolute;
+    right: 100px;
+    padding-top: 7px;
+    color: #666;
+}
+.class_block {
+    border: 1px solid #000;
+    width: 85%;
+    margin: 20px;
+    padding: 20px;
+    background-color: #eee;
+}
+.cmnt_count { padding: 20px }
+#top_bar {
+    position: absolute;
+    background-color: #004890;
+    color: #fff;
+    border-bottom: 1px solid #000;
+    padding: 3px;
+    top: 0px;
+    left: 0px;
+    width: 100%;
+}
+.input {
+    background-color: #ddf;
+    border: 1px solid #bbb;
+    padding: 10px;
+    margin: 20px;
+}
+.input_form {
+    text-align: right;
+    padding-right: 20px;
+}
+.input_error { color: #d00 }
+.input_name {
+    font-family: Tahoma, Arial, Helvetica, sans-serif;
+    font-size: 15px;
+    font-weight: bold;
+}
+.input_description {
+    font-family: sans-serif;
+    font-size: 14px;
+    color: #555;
+}
+#line:hover { background-color: #ff0 }
+.line_add { float: left }
+.line_num {
+    width: 40px;
+    float: left;
+    background-color: #ddd;
+    padding-left: 5px;
+    color: #666;
+}
+.line_dat { margin: 1px }
+.line_comment_stu {
+    border-top: 1px solid #000;
+    display: none;
+    padding-left: 40px;
+    padding-top: 8px;
+    padding-bottom: 5px;
+    color: #1782b8;
+    background-color: #deffb2;
+}
+.line_comment_fac {
+    border-top: 1px solid #000;
+    display: none;
+    padding-left: 40px;
+    padding-top: 8px;
+    padding-bottom: 5px;
+    color: #1782b8;
+    background-color: #ffefb2;
+}
+.line_comment_display_fac {
+    border-top: 1px solid #000;
+    padding-left: 40px;
+    padding-top: 8px;
+    padding-bottom: 5px;
+    color: #1782b8;
+    background-color: #ffefb2;
+}
+.line_comment_display_stu {
+    border-top: 1px solid #000;
+    padding-left: 40px;
+    padding-top: 8px;
+    padding-bottom: 5px;
+    color: #1782b8;
+    background-color: #deffb2;
+}
+.line_comment_name {
+    color: #666;
+    position: absolute;
+    right: 55px;
+}
+.line_comment_time {
+    color: #666;
+    position: absolute;
+    right: 200px;
+}
+.comment_box {
+    color: #000;
+    border: 1px solid #000;
+    background-color: #dedede;
+    padding: 20px;
+    font-size: 20px;
+}