ATutor

Learning Management Tools







Pages:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


Students pending approval


  • 2005-05-02 04:30:56

    Students pending approval

    Hi,

    I've given access to a student to "Enrollment Manager" : she can grant roles and permission but she does not have that line :
    [blue] Enrolled: 36, 1 pending approval. Alumni: 0
    [/blue] with the link to validate new users. That is the job she will have to do...

    How can she access to that line without being Tutor ?

  • 2005-05-02 05:33:36

    Found it !

    I've managed to do what I wanted, adding this to users/index.php :

    [green] if ($row['privileges'] == 2592) {
    echo '<br />'."\n";
    echo '· '._AT('access').': ';
    $pending = '';
    switch ($row['access']){
    case 'public':
    echo _AT('public');
    break;
    case 'protected':
    echo _AT('protected');
    break;
    case 'private':
    echo _AT('private');
    $sql = "SELECT COUNT(*) FROM ".TABLE_PREFIX."course_enrollment WHERE course_id=$row[course_id] AND approved='n'";
    $c_result = mysql_query($sql, $db);
    $c_row = mysql_fetch_array($c_result);
    $num_rows_c = mysql_num_rows($c_result);
    if($c_row[0] > 0){
    $pending = ', '.$c_row[0].' <em><strong>'._AT('pending_approval2').' <a href="bounce.php?course='.$row['course_id'].SEP.'p='.urlencode('tools/enrollment/index.php?current_tab=1').'"> '._AT('pending_approval3').'</a></strong></em>.';
    }
    break;
    }
    $c_sql = "SELECT COUNT(*) FROM ".TABLE_PREFIX."course_enrollment WHERE course_id=$row[course_id] AND approved='y'";
    $c_result = mysql_query($c_sql, $db);
    $c_row = mysql_fetch_array($c_result);

    /* minus 1 because the instructor doesn't count */
    echo "<br />\n· "._AT('enrolled').": ".($c_row[0]-1).$pending." ";
    } [/green]

    Privileges are given a code in AT_course_enrollment.
    I'd be interested have the list of that code according to the privileges...
    Exemple :
    32 = File Manager
    2592 = File Manager + Enrollment Manager

    Maybe we could work this out together and put this somewhere on that site ? I'm sure it could be useful to other developpers...