From 2861c0ac5afe0f83b7041bce08a80892e0e51465 Mon Sep 17 00:00:00 2001 From: Cheese Cookie Date: Fri, 8 Nov 2013 17:37:55 +0530 Subject: initial commit --- cloud_comments.info | 3 ++ cloud_comments.module | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+) create mode 100755 cloud_comments.info create mode 100755 cloud_comments.module diff --git a/cloud_comments.info b/cloud_comments.info new file mode 100755 index 0000000..be16916 --- /dev/null +++ b/cloud_comments.info @@ -0,0 +1,3 @@ +name = Cloud comments +description = A module to view and reply to Scilab on Cloud comments. +core = 6.x diff --git a/cloud_comments.module b/cloud_comments.module new file mode 100755 index 0000000..cbabf54 --- /dev/null +++ b/cloud_comments.module @@ -0,0 +1,116 @@ +" . t("Displays the Comments on cloud and enables the admin to reply to them via e-mail: textbook@scilab.in") . "
"; + break; + } + return $output; +} // function cloud_comments_help + +function cloud_comments_perm() { + return array("access cloud_comments", "reply cloud_comments"); +} // function cloud_comments_perm + +function cloud_comments_all() { + $types = array( + "None", + "Blank Code / Incorrect code", + "Output error", + "Execution error", + "Missing example(s)", + "None", + "Blank output", + "Any other" + ); + $categories = array( + "Others", + "Fluid Mechanics", + "Control Theory & Control Systems", + "Chemical Engineering", + "Thermodynamics", + "Mechanical Engineering", + "Signal Processing", + "Digital Communications", + "Electrical Technology", + "Mathematics & Pure Science", + "Analog Electronics", + "Digital Electronics", + "Computer Programming", + "Others" + ); + + $page_content = ""; + $query = "SELECT * FROM {scilab_cloud_comment}"; + $query_result = db_query($query); + + while ($row = db_fetch_object($query_result)) { + $q = "SELECT book from {textbook_companion_preference} where id = '%d'"; + $qr = db_query($q, $row->books); + $obj = db_fetch_object($qr); + + $page_content .= t("
") . $row->comment . t("