/* For licensing terms, see /license.txt */
/**
 * Script
 * @package chamilo.gradebook
 */
//require_once '../inc/global.inc.php';
api_block_anonymous_users();
GradebookUtils::block_students();
$interbreadcrumb[] = array('url' => Security::remove_XSS($_SESSION['gradebook_dest']) . '?', 'name' => get_lang('Gradebook'));
$interbreadcrumb[] = array('url' => Security::remove_XSS($_SESSION['gradebook_dest']) . '?selectcat=' . Security::remove_XSS($_GET['selectcat']), 'name' => get_lang('Details'));
$interbreadcrumb[] = array('url' => 'gradebook_showlog_link.php?visiblelink=' . Security::remove_XSS($_GET['visiblelink']) . '&selectcat=' . Security::remove_XSS($_GET['selectcat']), 'name' => get_lang('GradebookQualifyLog'));
$this_section = SECTION_COURSES;
Display::display_header('');
echo '<div class="actions">';
api_display_tool_title(get_lang('GradebookQualifyLog'));
echo '</div>';
$t_user = Database::get_main_table(TABLE_MAIN_USER);
$t_link_log = Database::get_main_table(TABLE_MAIN_GRADEBOOK_LINKEVAL_LOG);
$visible_link = Security::remove_XSS($_GET['visiblelink']);
$evaledit = EvalLink::load($visible_link);
$sql = "SELECT lk.name,lk.description,lk.weight,lk.visible,lk.type,lk.created_at,us.username\n        FROM " . $t_link_log . " lk inner join " . $t_user . " us\n        ON lk.user_id_log=us.user_id\n        WHERE lk.id_linkeval_log=" . $evaledit[0]->get_id() . " AND lk.type='link';";
$result = Database::query($sql);
$list_info = array();
while ($row = Database::fetch_row($result)) {
    $list_info[] = $row;
}
foreach ($list_info as $key => $info_log) {
    $list_info[$key][5] = $info_log[5] ? api_convert_and_format_date($info_log[5]) : 'N/A';
    $list_info[$key][3] = $info_log[3] == 1 ? get_lang('GradebookVisible') : get_lang('GradebookInvisible');
}
if (api_is_multiple_url_enabled()) {
    $tbl_access_rel_user = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
    $access_url_id = api_get_current_access_url_id();
    $sql = "SELECT u.user_id,lastname,firstname,username\n            FROM {$tbl_user} u\n            LEFT JOIN {$tbl_access_rel_user}  a\n            ON(u.user_id= a.user_id)\n            WHERE\n                status='1' AND\n                active = 1 AND\n                access_url_id = {$access_url_id} " . $order_clause;
} else {
    $sql = "SELECT user_id,lastname,firstname,username\n            FROM {$tbl_user}\n            WHERE\n                status = '1' AND\n                active = 1 " . $order_clause;
}
$result = Database::query($sql);
$coaches = Database::store_result($result);
if (!api_is_platform_admin() && api_is_teacher()) {
    $userInfo = api_get_user_info();
    $coaches = [$userInfo];
}
Display::display_header($tool_name);
$tool_name = get_lang('ModifySessionCourse');
api_display_tool_title($tool_name);
?>
<div class="session-course-edit">

<form method="post" action="<?php 
echo api_get_self();
?>
?id_session=<?php 
echo $id_session;
?>
&course_code=<?php 
echo urlencode($course_code);
?>
&page=<?php 
echo Security::remove_XSS($_GET['page']);
?>
Exemplo n.º 3
0
 */
/**
 * Code
 */
ob_start();
$cidReset = true;
require_once '../inc/global.inc.php';
$this_section = SECTION_TRACKING;
$nameTools = get_lang('Tutors');
api_block_anonymous_users();
$interbreadcrumb[] = array("url" => "index.php", "name" => get_lang('MySpace'));
if (isset($_GET["id_student"])) {
    $interbreadcrumb[] = array("url" => "student.php", "name" => get_lang('Students'));
}
Display::display_header($nameTools);
api_display_tool_title($nameTools);
// Database Table Definitions
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$tbl_user = Database::get_main_table(TABLE_MAIN_USER);
$tbl_session = Database::get_main_table(TABLE_MAIN_SESSION);
$tbl_session_rel_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE);
$tbl_session_rel_course_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
$tbl_session_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_USER);
$tbl_track_login = Database::get_main_table(TABLE_STATISTIC_TRACK_E_LOGIN);
/**
 * MAIN PART
 */
if (isset($_POST['export'])) {
    $order_clause = api_is_western_name_order(PERSON_NAME_DATA_EXPORT) ? ' ORDER BY firstname, lastname' : ' ORDER BY lastname, firstname';
} else {
Exemplo n.º 4
0
                 //------Blog comments
                 $result = get_blog_comment_from_user($course_code, $user_id);
                 if (!empty($result)) {
                     echo '<div  style="background:#FAF9F6; padding-left:10px;">';
                     api_display_tool_title(api_xml_http_response_encode(get_lang('BlogComments')));
                     echo api_xml_http_response_encode($result);
                     echo '</div>';
                     echo '<br />';
                     $all_result_data++;
                 }
                 if ($all_result_data == 0) {
                     echo api_xml_http_response_encode(get_lang('NoDataAvailable'));
                 }
             } else {
                 echo '<div class="clear"></div><br />';
                 api_display_tool_title(api_xml_http_response_encode(get_lang('Details')));
                 echo '<div style="background:#FAF9F6; padding:0px;">';
                 echo api_xml_http_response_encode(get_lang('UserNonRegisteredAtTheCourse'));
                 echo '<div class="clear"></div><br />';
                 echo '</div>';
                 echo '<div class="clear"></div><br />';
             }
             break;
         case 'unload_course':
             break;
         default:
             break;
     }
     break;
 case 'listWallMessage':
     $start = isset($_REQUEST['start']) ? intval($_REQUEST['start']) - 1 : 0;
Exemplo n.º 5
0
} else {
    $path = '/';
}
// Check the path
// If the path is not found (no document id), set the path to /
if (!DocumentManager::get_document_id($_course, $path)) {
    $path = '/';
}
/**
 *	Header
 */
$nameTools = get_lang('UplUploadDocument');
$interbreadcrumb[] = array("url" => "./document.php?curdirpath=" . urlencode($path) . $req_gid, "name" => $langDocuments);
Display::display_header($nameTools, "Doc");
//show the title
api_display_tool_title($nameTools . $add_group_to_title);
/**
 * Process
 */
//user has submitted a file
if (isset($_FILES['user_upload'])) {
    $upload_ok = process_uploaded_file($_FILES['user_upload']);
    if ($upload_ok) {
        //file got on the server without problems, now process it
        $new_path = handle_uploaded_document($_course, $_FILES['user_upload'], $base_work_dir, $_POST['curdirpath'], $_user['user_id'], $to_group_id, $to_user_id, $_POST['unzip'], $_POST['if_exists']);
        $new_comment = isset($_POST['comment']) ? trim($_POST['comment']) : '';
        $new_title = isset($_POST['title']) ? trim($_POST['title']) : '';
        if ($new_path && ($new_comment || $new_title)) {
            if ($docid = DocumentManager::get_document_id($_course, $new_path)) {
                $table_document = Database::get_course_table(TABLE_DOCUMENT);
                $ct = '';
Exemplo n.º 6
0
 case 'delete':
     $result = Rsys::delete_item($_GET['id']);
     ob_start();
     if ($result == '0') {
         Display::display_normal_message(get_lang('ResourceDeleted'), false);
     } else {
         Display::display_normal_message(str_replace('#NUM#', $result, get_lang('ItemHasReservations')), false);
     }
     $msg = ob_get_contents();
     ob_end_clean();
 default:
     $NoSearchResults = get_lang('NoItems');
     $interbreadcrumb[] = array("url" => "mysubscriptions.php", "name" => get_lang('Booking'));
     //$interbreadcrumb[] = array ("url" => "m_item.php", "name" => get_lang('ManageResources'));
     Display::display_header(get_lang('ManageResources'));
     api_display_tool_title(get_lang('ResourceList'));
     echo $msg;
     if ($_GET['action'] == 'blackout') {
         $result = Rsys::black_out_changer($_GET['id']);
         if ($result == 1) {
             Display::display_normal_message(get_lang('ResourceInactivated'), false);
         } else {
             Display::display_normal_message(get_lang('ResourceActivated'), false);
         }
     }
     echo '<form id="cat_form" action="m_item.php" method="get">';
     echo '<div class="actions">';
     echo '<a href="m_item.php?action=add"><img src="../img/view_more_stats.gif" border="0" alt="" title="' . get_lang('AddNewBookingPeriod') . '"/>' . get_lang('AddNewResource') . '</a>';
     echo '</div>';
     echo '<div style="text-align: right;">' . get_lang('ResourceFilter') . ': ';
     echo '<select name="cat" onchange="this.form.submit();"><option value="0"> ' . get_lang('All') . ' </option>';
Exemplo n.º 7
0
                         $saved = save_glossary($values);
                         if ($saved) {
                             $count++;
                         }
                     }
                     fclose($handle);
                     echo '<div class="confirmation-message">' . get_lang('Imported') . ' ' . intval($count) . ' ' . get_lang('GlossaryTerms') . '</div>';
                     break;
             }
         }
         Security::clear_token();
     } else {
         $token = Security::get_token();
         $form->addElement('hidden', 'sec_token');
         $form->setConstants(array('sec_token' => $token));
         api_display_tool_title(get_lang('ImportGlossaryTerms'));
         $form->display();
     }
 } else {
     //To show the list of glossary and the whiteboard to choose the Definition.
     echo '<div id="whiteboard">
         <table width="100%">
         <tr>
         <td width="70%" valign="top" align="center"  style="background: url(../img/whiteboard.png) no-repeat 100px 5px;">
         <table cellspacing="5" cellpadding="5" width="50%">
         <tr>
         <td>&nbsp;</td>
         </tr>';
     for ($i = 1; $i <= 26; $i++) {
         if ($i == 1 || $i == 6 || $i == 11 || $i == 15 || $i == 19 || $i == 23) {
             echo '<tr>';