Ejemplo n.º 1
0
function get_student_tutor_busy($tutor_id, $student_id = 0)
{
    global $days, $periods;
    $tutor_busy = get_tutor_busy($tutor_id);
    $student_busy = get_student_busy($student_id);
    $common_times = get_common_times($tutor_id, $student_id);
    $result = array();
    foreach ($common_times as $common_time) {
        $day = $common_time[0];
        $period = $common_time[1];
        array_push($result, array($day, $period, 2));
    }
    foreach ($days as $day) {
        foreach ($periods as $period) {
            if ($tutor_busy[$day][$period] == 1) {
                array_push($result, array($day, $period, 1));
            }
        }
    }
    return $result;
}
Ejemplo n.º 2
0
        <td align=right>Subject:</td>
        <td>
            <?php 
echo $request_info['subject_name'];
?>
        </td>
    </tr>
    <tr>
        <td align=right>Start Date:<br>(mm-dd-yy)</td>
        <td>
            <input name="start_date" size=8>
        </td>
    </tr>
    <tr>
        <td align=right>Times:</td>
        <td>
            <?php 
match_times_matrix(get_common_times($tutor_id, $student_id));
?>
        </td>
    </tr>
    <tr>
        <td align=right>Notes:</td>
        <td>
            <textarea name="notes" rows=5 cols=40></textarea>
        </td>
    </tr>
</table>
<input type="submit" value="Submit"/>
</form>
Ejemplo n.º 3
0
        </td>
    </tr>
    <tr>
        <td align=right>Active:</td>
        <td>
            <input name="active" type="checkbox" <?php 
echo $match_info['active'] ? 'checked' : '';
?>
 />
        </td>
    </tr>
    <tr>
        <td align=right>Times:</td>
        <td>
            <?php 
match_times_matrix(get_common_times($tutor_info['id'], $student_info['id']), get_match_times($match_id));
?>
        </td>
    </tr>
    <tr>
        <td align=right>Notes:</td>
        <td>
            <textarea name="notes" rows=5 cols=40><?php 
echo $match_info['notes'];
?>
</textarea>
        </td>
    </tr>
</table>
<input type="submit" value="Submit">
</form>