Rutang5’s Musings on Life

Writing, Research, Gadgets, and More

Archive for the ‘Academic’ Category

Wired 14.11: Posts: Disco Inferno

Posted by rutang5 on November 8, 2006

 Wired writes of a new hybrid, propane-fueled modification of Dance, Dance Revolution.  Stay on target and you’re free to shake it up like nobody’s business.  Misstep, though, and it’s Krispy-Fried time.

This would be interesting to adapt to the classroom.  I wonder if it’s possible to get funding for a set of 30 flame-retardant suits.  Not paying attention?  WHOOOOOSH.  Miss an easy question?  WHOOOOOSH.  Cell phone ringing?  WHOOOOSH.  WHOOOOSH.

You get the picture.

Link to Wired 14.11: Posts

Posted in Academic, Insanity | 2 Comments »

Student Email Rant

Posted by rutang5 on October 30, 2006

An anonymous student in an anonymous course writes, “I won’t be able to make class today. I was wondering if I will be missing anything.” Now if you’ve been teaching for any amount of time, chances are you’ve seen some variant of this pop up in your own inbox. My response was genial enough, directing the student online to access the notes from the missed lecture. What I wanted to say, though, was this:

“Jeez, you’re not coming? I’d better not put a lecture together, then, if you’re not going to be there. So no, you won’t be missing anything. Nothing important. We’ll likely just sit around and talk about our weekend, and maybe gab about the last episode of Lost for a while. Don’t worry about getting in touch with your classmates, or stopping by office hours to catch up on what you missed. This simple 2 liner email will do just fine. Oh, and when I mentioned on the first day of class that you should always put the course number in the subject of the email so that your note doesn’t get marked as spam? I was kidding about that. Since you didn’t do it, I guess you got the joke.”

Sheesh. Someone needs to read this posting.

Posted in Academic, Rant | 1 Comment »

Course Feedback Tool

Posted by rutang5 on October 19, 2006

The purpose of this post is twofold: first, I want to test out this new code formatting plugin I downloaded, and second, I wanted to share my anonymous course feedback tool with anyone else who wants to adapt it for their own Web site. You can see the end result on my own Web site.

I’m posting this primarily for my friend Jon, who wanted to do something similiar on his site. I says to him, I says, “Hey, Jon, why reinvent the wheel, man? Just use my code and modify it to fit your needs.” And he says, “Yeah man. Cool.”

Note: You’ll need to have the GD Image Library enabled on your PHP server for this to work. Otherwise, you’ll need to come up with an alternate method to authenticate for human-ish users.

You can download the source files from this link.

File 1: feedback.php (main file to display the feedback tool)

<?php

$prof_email = ""; // plug in your email address here
$server = ""; // plug in your server name here

?>

<html>
<head>
    <title>Course Feedback Tool</title>
</head>
<body>

<h1>Anonymous Feedback Tool</h1>

<p>Reasons you may want to use this tool:</p>

<ul>
    <li>To request a special lecture topic
    <li>To ask a question you didn't want to ask in class
    <li>To give me feedback about a particular course
    <li>To gripe or complain about a lecture
    <li>To comment on an especially good or helpful lecture
    <li>To provide a review for one of my courses
    <li>To provide ideas for activities or outside readings
    <li>You get the point, right?
</ul>

<?php

if (isset($_POST["submit"]))
    {
    $usercode = trim($_POST["user-code"]);
    $passcode = trim($_POST["system-code"]);

    if ($usercode == $passcode)
        {
        $message = "Nature of Feedback: ".
        $_POST["nature"]."nnCourse: ".
        $_POST["course"]."nn".
        $_POST["comments"];
        mail($prof_email,"feedback from Web site",$message) or
        die($server." mail appears to be down.  Please let me know ASAP!");
        ?>
        <hr>
        <span class="font-weight: bold">
        Thank you for your feedback!  I appreciate all comments.</span>
        <?php
        }
    else
        {
        ?>
        <hr>
        <span class="font-weight: bold">
        Sorry.  Your user code did not match the verification code.
        Please go back and try again.</span>
        <?php
        }
    }
else
    {
    ?>
    <hr>

    <span class="font-weight: bold">Please complete the form below.</span>

    <form id="feedback" method="post" action="<?php echo $_SERVER["PHP_SELF"]; ?>">

    <table>
    <tr>
        <td>Nature of Feedback:</td>
        <td colspan="2">
            <select name="nature">
                <option>Suggestion for Lecture Topic</option>
                <option>Feedback Concerning Lecture</option>
                <option>Feedback Concerning Class Activity</option>
                <option>General Classroom Issue</option>
                <option>Review of Class</option>
                <option>Feedback Concerning Web site</option>
                <option>Resource Suggestion for Web site</option>
                <option>Other</option>
            </select>
        </td>
    </tr>
    <tr>
        <td>Course:</td>
        <td colspan="2">
            <select name="course">
                <option>DIG3930: ST: Rapid App Web Development</option>
                <option>DIG4716: Internet Interaction</option>
                <option>DIG4922: Media for E-Commerce II</option>
                <option>DIG5647: Sci and Tech of Dynamic Media</option>
                <option>IDS3701: Internet Software Design</option>
                <option>Not Course Related</option>
                <option>Other</option>
            </select>
        </td>
    </tr>
    <tr>
        <td valign="top">Comments:</td>
        <td colspan="2">
            <textarea name="comments" rows="5" cols="35"></textarea>
        </td>
    </tr>

    <?php

    $str = "ABCDEFHJKMNPQRTWXYZabcdefhkmnrtwxz234789";  // removed confusing characters

    $codelen = 4;
    $code = "";

    for ($i=0; $i < $codelen; $i++)
        {
        $num = rand(0,strlen($str)-1);
        $code .= $str[$num];
        }

    ?>

    <tr>
        <td>Verify-Code:</td>
        <td>
            <input type="text" name="user-code" size="5" maxlength="4">
        </td>
        <td align="left">
            <img src="makecode.php?code=<?php echo $code; ?>" style="border: thin solid black">
        </td>
    </tr>
    </table>

    <p>Please copy the <b>case-sensitive</b>
four digit code from the right into the area
to the left to verify you are a human. If you
would like to leave your name or contact details,
you can provide it in the comments area.</p>

    <br>

    <input type="hidden" name="system-code" value="<?php echo $code; ?>">
    <input type="submit" value="Submit Anonymous Feedback" name="submit">

    </form>

</body>
</html>

File 2: makecode.php (used to generate the authentication image code to keep out annoying spam).

1 <?php
2     header ("Content-type: image/png");
3     $img_handle = ImageCreate (65, 20) or die ("Cannot Create image");
4     $back_color = ImageColorAllocate ($img_handle, 255, 255, 255);
5     $txt_color = ImageColorAllocate ($img_handle, 0, 0, 0);
6     ImageString ($img_handle, 40, 5, 5,  $_GET["code"], $txt_color);
7     ImagePng ($img_handle);
8 ?> 

Enjoy, Jon!

Posted in Academic, Programming, Web development, php | Leave a Comment »