Ejemplo n.º 1
0
$_pages['logout.php']['parent']    = AT_NAV_PUBLIC;

/* my start page pages */
$_pages['users/index.php']['title_var'] = 'my_courses';
$_pages['users/index.php']['parent']    = AT_NAV_START;
$_pages['users/index.php']['guide']     = 'general/?p=my_courses.php';
if (isset($_SESSION['member_id']) && $_SESSION['member_id'] && (!isset($_SESSION['course_id']) || !$_SESSION['course_id'])) {
	//$_pages['users/index.php']['children']  = array_merge(array('mods/_core/courses/users/create_course.php'), isset($_pages['users/index.php']['children']) ? $_pages['users/index.php']['children'] : array());
}
	$_pages['users/browse.php']['title_var'] = 'browse_courses';
	//$_pages['users/browse.php']['parent']    = 'users/index.php';
	$_pages['users/browse.php']['parent']    = AT_NAV_START;
	$_pages['users/browse.php']['guide']     = 'general/?p=browse_courses.php';


if (isset($_SESSION['member_id']) && get_instructor_status() === TRUE)	
{
	$_pages['mods/_core/courses/users/create_course.php']['title_var'] = 'create_course';
$_pages['mods/_core/courses/users/create_course.php']['parent']    = 'users/index.php';
$_pages['mods/_core/courses/users/create_course.php']['guide']    = 'instructor/?p=creating_courses.php';
$_pages['users/index.php']['children']  = array_merge(array('mods/_core/courses/users/create_course.php'), isset($_pages['users/index.php']['children']) ? $_pages['users/index.php']['children'] : array());

}
else if (isset($_SESSION['member_id']) && ALLOW_INSTRUCTOR_REQUESTS)
{

	  $_pages['mods/_core/courses/users/create_course.php']['title_var'] = 'request_instructor_priv';
$_pages['mods/_core/courses/users/create_course.php']['parent']    = 'users/index.php';
$_pages['mods/_core/courses/users/create_course.php']['guide']    = 'instructor/?p=creating_courses.php';
$_pages['users/index.php']['children']  = array_merge(array('mods/_core/courses/users/create_course.php'), isset($_pages['users/index.php']['children']) ? $_pages['users/index.php']['children'] : array());
Ejemplo n.º 2
0
/* Copyright (c) 2002-2010                                      */
/* Inclusive Design Institute                                   */
/* http://atutor.ca												*/
/*                                                              */
/* This program is free software. You can redistribute it and/or*/
/* modify it under the terms of the GNU General Public License  */
/* as published by the Free Software Foundation.				*/
/****************************************************************/
// $Id$
$_user_location = 'users';
define('AT_INCLUDE_PATH', '../../../../include/');
require AT_INCLUDE_PATH . 'vitals.inc.php';
require AT_INCLUDE_PATH . '../mods/_core/backups/classes/Backup.class.php';
require AT_INCLUDE_PATH . '../mods/_core/courses/lib/course.inc.php';
/* verify that this user has status to create courses */
if (get_instructor_status() === FALSE) {
    require AT_INCLUDE_PATH . 'header.inc.php';
    if (defined('ALLOW_INSTRUCTOR_REQUESTS') && ALLOW_INSTRUCTOR_REQUESTS) {
        $sql = "SELECT member_id FROM " . TABLE_PREFIX . "instructor_approvals WHERE member_id={$_SESSION['member_id']}";
        $result = mysql_query($sql, $db);
        if (!($row = mysql_fetch_array($result))) {
            ?>
			<form action="mods/_core/courses/users/request_instructor.php" method="post">
			<input type="hidden" name="form_request_instructor" value="true" />
			<div class="input-form">
				<div class="row">
					<p><?php 
            echo _AT('request_instructor');
            ?>
</p>
				</div>
 /**
  * Return content information by given content id
  * @access  private
  * @param   parent content id
  * @return  content row
  * @author  Mauro Donadio
  */
 private function _getUserDetails()
 {
     $userDetails = array();
     $userDetails['user_id'] = $GLOBALS['_SESSION']['member_id'];
     if (get_instructor_status()) {
         $userDetails['user_role'] = 'Instructor';
     } else {
         $userDetails['user_role'] = 'Student';
     }
     if ($GLOBALS['_SESSION']['is_admin']) {
         $userDetails['user_role'] = $userDetails['user_role'] . ' / Admin';
     }
     $userDetails['user_fullname'] = get_display_name($GLOBALS['_SESSION']['member_id']);
     $userDetails['user_email'] = '';
     return $userDetails;
 }
Ejemplo n.º 4
0
{
    global $db;
    $sql = "SELECT cat_name FROM " . TABLE_PREFIX . "course_cats WHERE cat_id=" . $cat_id;
    $result = mysql_query($sql, $db);
    $row = mysql_fetch_assoc($result);
    if ($row['cat_name'] == '') {
        $row['cat_name'] = _AT('cats_uncategorized');
    }
    return $row['cat_name'];
}
//LAW
//$_SESSION['first_login'] = true; //for testing
if ($_SESSION['first_login']) {
    $msg->addInfo(array('FIRST_PREFS', $_base_path . 'users/pref_wizard/index.php'));
}
if (!$courses && get_instructor_status()) {
    $msg->addInfo('NO_COURSES_INST');
} elseif (!$courses) {
    $msg->addInfo('NO_COURSES');
}
//sort function for all_news
function all_news_cmp($a, $b)
{
    if ($b['time'] < $a['time']) {
        return -1;
    } elseif ($b['time'] > $a['time']) {
        return 1;
    } else {
        return 0;
    }
}