Exemple #1
0
         $taglist .= "</table>";
     }
     //	printpre($tags);
     $content = $taglist;
     /******************************************************************************
      * Participant type pages 
      ******************************************************************************/
 } else {
     if ($o->getField("type") == 'participants') {
         $url = "'{$PHPSELF}?{$sid}&amp;site={$site}&amp;section={$section}&amp;page={$p}&amp;action={$action}'";
         //$text = $o->getField("text");
         $url = "#";
         $director_uname = $thisSite->getField('addedby');
         $director = db_get_value("user", "user_fname", "user_uname = '" . addslashes($director_uname) . "'");
         $editors = $thisSite->getEditors();
         $participants = getclassstudents($site);
         $director = "<div class='nav'><strong>Site Owner</strong><br />" . $director . " <br /></div>";
         if ($participants) {
             $participantslist = "<table cellspacing='3' cellpadding='0' width='100%'>";
             $participantslist .= "<tr><td><div class='nav'><strong><i>Roster</i></strong></div></td></tr>";
             foreach ($participants as $key => $value) {
                 $fname = $value[fname];
                 $uname = $value[uname];
                 $email = $value[email];
                 $urlname = urlencode($fname);
                 $utype = $value[type];
                 /******************************************************************************
                  * get participation info including:
                  * associated site
                  * contributions
                  * discussion posts
            $ugroup_name = $_REQUEST[name];
            $class_id = $ugroup_name;
        }
    } else {
        $ugroup_name = $_REQUEST[name];
        $class_id = $ugroup_name;
    }
    $_REQUEST[ugroup_id] = $ugroup_id;
    $participants = getclassstudents($class_id);
    /******************************************************************************
     * Admin add student UI: get students in the class
     ******************************************************************************/
} else {
    $ugroup_id = $_REQUEST[ugroup_id];
    $class_id = db_get_value("ugroup", "ugroup_name", "ugroup_id = '" . addslashes($ugroup_id) . "'");
    $participants = getclassstudents($class_id);
}
/******************************************************************************
 * Get site id for links to participation section
 ******************************************************************************/
$siteObj =& new site($class_id);
$siteid = $siteObj->id;
/******************************************************************************
 * Sort alphabetically usernames from userlookup and participant names
 ******************************************************************************/
if (count($usernames)) {
    asort($usernames);
    reset($usernames);
}
/* if (count($participants)) { */
/* 	asort($participants); */
Exemple #3
0
        //add to class roster only if not currently a student
        if (!in_array($studentid, $currentstudents)) {
            //print "Participants added to roster";
            $user_id = $studentid;
            $ugroup_id = getClassUGroupId($class_id);
            // add them to the ugroup
            $query = "\n\t\t\t\tINSERT INTO\n\t\t\t\t\tugroup_user\n\t\t\t\tSET\n\t\t\t\t\tFK_user='******',\n\t\t\t\t\tFK_ugroup='" . addslashes($ugroup_id) . "'\t\t\t\n\t\t\t";
            //printpre($query);
            db_query($query);
        }
    }
    unset($_SESSION[editors]);
    unset($_SESSION[roster_ids]);
    unset($_SESSION[non_roster_ids]);
    unset($_SESSION[logged_participants_ids]);
    $students = getclassstudents($class_id);
    foreach (array_keys($students) as $key) {
        $roster_ids[] = $students[$key][id];
    }
}
/******************************************************************************
 * Query: WHERE clause
 * story, site, and/or user or 
 * all users, all sites
 ******************************************************************************/
if ($_REQUEST['findall'] && !$_REQUEST['find']) {
    $where = "user_id > 0";
} else {
    if ($_REQUEST['find']) {
        $useruname = $_REQUEST['useruname'];
        $userid = db_get_value("user", "user_id", "user_uname = '" . addslashes($useruname) . "'");