コード例 #1
0
 /**
  * Displays the title + grid
  */
 public function display()
 {
     // action links
     $content = Display::actions(array(array('url' => 'event_type.php', 'content' => Display::return_icon('new_document.png', get_lang('Add'), array(), ICON_SIZE_MEDIUM))));
     $content .= Display::grid_html('event_email_template');
     return $content;
 }
コード例 #2
0
 /**
  * Displays the title + grid
  */
 public function display()
 {
     echo '<div class="actions" style="margin-bottom:20px">';
     echo '<a href="career_dashboard.php">' . Display::return_icon('back.png', get_lang('Back'), '', '32') . '</a>';
     echo '<a href="' . api_get_self() . '?action=add">' . Display::return_icon('new_career.png', get_lang('Add'), '', '32') . '</a>';
     echo '</div>';
     echo Display::grid_html('careers');
 }
コード例 #3
0
 /**
  * Displays the title + grid
  */
 public function display()
 {
     // action links
     echo '<div class="actions" style="margin-bottom:20px">';
     echo '<a href="grade_models.php">' . Display::return_icon('back.png', get_lang('Back'), '', '32') . '</a>';
     echo '<a href="' . api_get_self() . '?action=add">' . Display::return_icon('add.png', get_lang('Add'), '', '32') . '</a>';
     echo '</div>';
     echo Display::grid_html('grade_model');
 }
コード例 #4
0
 /**
  * Displays the title + grid
  */
 public function listing()
 {
     // action links
     $html = '<div class="actions">';
     //$html .= '<a href="career_dashboard.php">'.Display::return_icon('back.png',get_lang('Back'),'','32').'</a>';
     $html .= '<a href="' . api_get_self() . '?action=add">' . Display::return_icon('add.png', get_lang('Add'), '', '32') . '</a>';
     $html .= '</div>';
     $html .= Display::grid_html('timelines');
     return $html;
 }
コード例 #5
0
    /**
     * Display a sortable table that contains an overview off all the access to a session
     * @author César Perales <*****@*****.**>, Beeznest Team
     * @version Chamilo 1.9.6
     */
    static function display_tracking_access_overview($sessionId = 0, $courseId = 0, $studentId = '', $profile = '', $date_from, $date_to) {
        //The order is important you need to check the the $column variable in the model.ajax.php file
        $columns = array(
            get_lang('LoginDate'),
            get_lang('UserName'),
            get_lang('LastName'),
            get_lang('FirstName'),
            get_lang('Clicks'),
            get_lang('IP'),
            get_lang('TimeLoggedIn'),
            get_lang('Section'),
        );

        $column_model   = array(
            array('name'=>'logindate',      'index'=>'loginDate',      'align'=>'left', 'search' => 'true'),
            array('name'=>'username',       'index'=>'username',       'align'=>'left', 'search' => 'true'),
            array('name'=>'firstname',      'index'=>'firstname',      'align'=>'left', 'search' => 'true'),
            array('name'=>'lastname',       'index'=>'lastname',       'align'=>'left', 'search' => 'true'),
            array('name'=>'clicks',         'index'=>'clicks',         'align'=>'left', 'search' => 'true'),
            array('name'=>'ip',             'index'=>'ip',             'align'=>'left', 'search' => 'true'),
            array('name'=>'timeloggedin',   'index'=>'timeLoggedIn',   'align'=>'left', 'search' => 'true'),
            array('name'=>'session',   'index'=>'session',   'align'=>'left')
        );

        $action_links = '';
        // jqgrid will use this URL to do the selects
        $url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_session_access_overview&session_id=' . $sessionId . '&course_id=' . $courseId . '&student_id=' . $studentId . '&profile=' . $profile . '&date_to=' . $date_to . '&date_from=' . $date_from;

        //Table Id
        $tableId = 'accessOverview';

        //Autowidth
        $extra_params['autowidth'] = 'true';

        //height auto
        $extra_params['height'] = 'auto';

        $table = Display::grid_js($tableId, $url, $columns, $column_model, $extra_params, array(), $action_links, true);

        $return = '<script>$(function() {'. $table .
            'jQuery("#'.$tableId.'").jqGrid("navGrid","#'.$tableId.'_pager",{view:false, edit:false, add:false, del:false, search:false, excel:true});
                jQuery("#'.$tableId.'").jqGrid("navButtonAdd","#'.$tableId.'_pager",{
                       caption:"",
                       title:"' . get_lang('ExportExcel') . '",
                       onClickButton : function () {
                           jQuery("#'.$tableId.'").jqGrid("excelExport",{"url":"'.$url.'&export_format=xls"});
                       }
                });
            });</script>';
        $return .= Display::grid_html($tableId);
        return $return;
    }
コード例 #6
0
ファイル: user_list.php プロジェクト: ragebat/chamilo-lms
$action_links = 'function action_formatter(cellvalue, options, rowObject) {
     return \'<a href="?action=edit&id=\'+options.rowId+\'">'.Display::return_icon('edit.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>'.
     '&nbsp;<a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;"  href="?sec_token='.$token.'&action=copy&id=\'+options.rowId+\'">'.Display::return_icon('copy.png',get_lang('Copy'),'',ICON_SIZE_SMALL).'</a>'.
     '&nbsp;<a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;"  href="?sec_token='.$token.'&action=delete&id=\'+options.rowId+\'">'.Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'.
     '\';
 }';*/
$action_links = null;
$room = UserManager::get_extra_user_data_by_field(api_get_user_id(), 'exam_room');
$room = $room['exam_room'];
$schedule = UserManager::get_extra_user_data_by_field(api_get_user_id(), 'exam_schedule');
$schedule = $schedule['exam_schedule'];
echo Display::page_subheader(get_lang('UserList') . ": " . $room . " - " . $schedule);
?>
<script>
$(function() {
<?php 
echo Display::grid_js('user_list', $url, $columns, $column_model, $extra_params, array(), $action_links, true);
?>
    jQuery("#user_list").jqGrid("navGrid","#user_list_pager",{view:false, edit:false, add:false, del:false, search:false, excel:true});
    jQuery("#user_list").jqGrid("navButtonAdd","#user_list_pager",{
       caption:"",
       onClickButton : function () {
           jQuery("#user_list").jqGrid("excelExport",{"url": "<? echo $url?>&export_format=xls"});
    }
});

});
</script>
<?php 
echo Display::grid_html('user_list');
Display::display_footer();
コード例 #7
0
";
                }
            }
        }

        /**
        * initiate datepicker
        */
        $(function() {
            $( "#datepicker_start" ).datepicker({
                defaultDate: "",
                changeMonth: false,
                numberOfMonths: 1
            });
        });
</script>
<form id="export_report_form" method="post" action="exercise_report.php?<?php 
echo api_get_cidreq();
?>
">
    <input type="hidden" name="csvBuffer" id="csvBuffer" value="" />
    <input type="hidden" name="export_report" id="export_report" value="1" />
    <input type="hidden" name="exerciseId" id="exerciseId" value="<?php 
echo $exercise_id;
?>
" />
</form>

<?php 
echo Display::grid_html('results');
Display::display_footer();
コード例 #8
0
        edit:false,
        add:false,
        del:false,
        search:false,
        excel:true
    });

    jQuery("#user_course_report").jqGrid("navButtonAdd","#user_course_report_pager", {
       caption:"",
       onClickButton : function () {
           jQuery("#user_course_report").jqGrid("excelExport",{"url":"' . $url . '&export_format=xls"});
       }
    });
});
</script>';
$actions = null;
if (api_is_student_boss()) {
    $actions .= Display::url(Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH) . "auth/my_progress.php");
    $actions .= Display::url(Display::return_icon('user.png', get_lang('Students'), array(), ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH) . "mySpace/student.php");
    $actions .= Display::url(Display::return_icon("statistics.png", get_lang("CompanyReport"), array(), ICON_SIZE_MEDIUM), "#");
    $actions .= Display::url(Display::return_icon("certificate_list.png", get_lang("GradebookSeeListOfStudentsCertificates"), [], ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH) . "gradebook/certificate_report.php");
}
$content = '<div class="actions">';
if (!empty($actions)) {
    $content .= $actions;
}
$content .= Display::url(get_lang("CompanyReportResumed"), api_get_path(WEB_CODE_PATH) . "mySpace/company_reports_resumed.php", array('class' => 'btn btn-success'));
$content .= '</div>';
$content .= '<h1 class="page-header">' . get_lang('CompanyReport') . '</h1>';
$content .= Display::grid_html('user_course_report');
echo $content;
コード例 #9
0
 /**
  * Displays the title + grid
  */
 public function display()
 {
     // action links
     echo '<div class="actions">';
     echo '<a href="../admin/index.php">' . Display::return_icon('back.png', get_lang('BackTo') . ' ' . get_lang('PlatformAdmin'), '', ICON_SIZE_MEDIUM) . '</a>';
     echo '<a href="' . api_get_self() . '?action=add&type=' . $this->type . '">' . Display::return_icon('add_user_fields.png', get_lang('Add'), '', ICON_SIZE_MEDIUM) . '</a>';
     echo '</div>';
     echo Display::grid_html($this->type . '_fields');
 }
コード例 #10
0
//jqgrid will use this URL to do the selects
$url = api_get_path(WEB_AJAX_PATH) . 'model.ajax.php?a=get_group_reporting&course_id=' . $course_id;
//The order is important you need to check the the $column variable in the model.ajax.php file
$columns = array(get_lang('Name'), get_lang('Time'), get_lang('Progress'), get_lang('Score'), get_lang('Works'), get_lang('Messages'), get_lang('Actions'));
//Column config
$column_model = array(array('name' => 'name', 'index' => 'name', 'width' => '200', 'align' => 'left'), array('name' => 'time', 'index' => 'time', 'width' => '50', 'align' => 'left', 'sortable' => 'false'), array('name' => 'progress', 'index' => 'progress', 'width' => '50', 'align' => 'left', 'sortable' => 'false'), array('name' => 'score', 'index' => 'score', 'width' => '50', 'align' => 'left', 'sortable' => 'false'), array('name' => 'works', 'index' => 'works', 'width' => '50', 'align' => 'left', 'sortable' => 'false'), array('name' => 'messages', 'index' => 'messages', 'width' => '50', 'align' => 'left', 'sortable' => 'false'), array('name' => 'actions', 'index' => 'actions', 'width' => '50', 'align' => 'left', 'formatter' => 'action_formatter', 'sortable' => 'false'));
//Autowidth
$extra_params['autowidth'] = 'true';
//height auto
$extra_params['height'] = 'auto';
$action_links = '
function action_formatter(cellvalue, options, rowObject) {
    return \'<a href="course_log_tools.php?id_session=0&cidReq=' . $course_code . '&gidReq=\'+options.rowId+\'">' . Display::return_icon('2rightarrow.gif', get_lang('Edit'), '', ICON_SIZE_SMALL) . '</a>' . '\';
}';
//Add the JS needed to use the jqgrid
$htmlHeadXtra[] = api_get_jqgrid_js();
$htmlHeadXtra[] = '
<script>
$(function() {
    ' . Display::grid_js('group_users', $url, $columns, $column_model, $extra_params, array(), $action_links, true) . '
});
</script>';
Display::display_header();
echo '<div class="actions">';
echo Display::url(Display::return_icon('user.png', get_lang('StudentsTracking'), array(), 32), 'courseLog.php?' . api_get_cidreq(true, false));
echo Display::url(Display::return_icon('group_na.png', get_lang('GroupReporting'), array(), 32), '#');
echo Display::url(Display::return_icon('course.png', get_lang('CourseTracking'), array(), 32), 'course_log_tools.php?' . api_get_cidreq(true, false));
echo Display::url(Display::return_icon('tools.png', get_lang('ResourcesTracking'), array(), 32), 'course_log_resources.php?' . api_get_cidreq(true, false));
echo '</div>';
echo Display::grid_html('group_users');
Display::display_footer();
コード例 #11
0
ファイル: index.php プロジェクト: omaoibrahim/chamilo-lms
}
// Sub headers
/*$sub_header = array(
    get_lang('AllLearningPaths'),
    get_lang('PerWeek'),
    get_lang('ByCourse')
);

// Sub headers data
$lpTab = Display::tabs(
    $sub_header,
    array(
        //Display::grid_html('list_default'),
        Display::grid_html('list_week'),
        //Display::grid_html('list_course')
    ),
    'sub_tab'
);*/
$coursesTab = Display::grid_html('courses');
$starTab = Display::grid_html('list_default');
$tabs = array($starTab, $coursesTab, Display::grid_html('list_course'), Display::grid_html('exercises'), $reportingTab);
$tabToHide = api_get_configuration_value('session_hide_tab_list');
if (!empty($tabToHide)) {
    foreach ($tabToHide as $columnId) {
        unset($headers[$columnId]);
        unset($tabs[$columnId]);
    }
}
// Main headers data
echo Display::tabs($headers, $tabs);
Display::display_footer();
コード例 #12
0
 /**
  * Displays the title + grid
  */
 public function display()
 {
     // action links
     echo Display::grid_html('gradebooks');
 }
コード例 #13
0
ファイル: media.php プロジェクト: ragebat/chamilo-lms
        $objQuestion->delete();
        break;
}
//jqgrid will use this URL to do the selects
$url = api_get_path(WEB_AJAX_PATH) . 'model.ajax.php?a=get_course_exercise_medias';
//The order is important you need to check the the $column variable in the model.ajax.php file
$columns = array(get_lang('Name'), get_lang('Actions'));
//Column config
$column_model = array(array('name' => 'name', 'index' => 'name', 'width' => '200', 'align' => 'left'), array('name' => 'actions', 'index' => 'actions', 'width' => '50', 'align' => 'left', 'formatter' => 'action_formatter', 'sortable' => 'false'));
//Autowidth
$extra_params['autowidth'] = 'true';
//height auto
$extra_params['height'] = 'auto';
//With this function we can add actions to the jgrid (edit, delete, etc)
$action_links = 'function action_formatter(cellvalue, options, rowObject) {
                         return \'<a href="?action=edit&id=\'+options.rowId+\'">' . Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL) . '</a>' . '&nbsp;<a onclick="javascript:if(!confirm(' . "\\'" . addslashes(get_lang("ConfirmYourChoice")) . "\\'" . ')) return false;"  href="?sec_token=' . $token . '&action=delete&id=\'+options.rowId+\'">' . Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL) . '</a>' . '\';
                 }';
?>
<script>
$(function() {
<?php 
// grid definition see the $career->display() function
echo Display::grid_js('medias', $url, $columns, $column_model, $extra_params, array(), $action_links, true);
?>
});
</script>
<?php 
$items = array(array('content' => Display::return_icon('add.png'), 'url' => $page_url . '&action=add'));
echo Display::actions($items);
echo Display::grid_html('medias');
Display::display_footer();
コード例 #14
0
ファイル: index.php プロジェクト: annickvdp/Chamilo1.9.10
// Sub headers
$sub_header = array(
    get_lang('AllLearningPaths'),
    get_lang('PerWeek'),
    get_lang('ByCourse')
);

// Sub headers data
$lp_tabs = Display::tabs(
    $sub_header,
    array(
        Display::grid_html('list_default'),
        Display::grid_html('list_week'),
        Display::grid_html('list_course')
    ),
    'sub_tab'
);
$courses_tab =  Display::grid_html('courses');
// Main headers data
echo Display::tabs(
    $headers,
    array(
        $courses_tab,
        $lp_tabs,
        Display::grid_html('exercises'),
        $my_reporting
    )
);

Display::display_footer();
コード例 #15
0
ファイル: work_list.php プロジェクト: secuencia24/chamilo-lms
}
$result = getWorkDateValidationStatus($work_data);
echo $result['message'];
$check_qualification = intval($my_folder_data['qualification']);
if (!api_is_invitee()) {
    if (!empty($work_data['enable_qualification']) && !empty($check_qualification)) {
        $type = 'simple';
        $columns = array(get_lang('Type'), get_lang('Title'), get_lang('Qualification'), get_lang('Date'), get_lang('Status'), get_lang('Actions'));
        $column_model = array(array('name' => 'type', 'index' => 'file', 'width' => '5', 'align' => 'left', 'search' => 'false', 'sortable' => 'false'), array('name' => 'title', 'index' => 'title', 'width' => '40', 'align' => 'left', 'search' => 'false', 'wrap_cell' => 'true'), array('name' => 'qualification', 'index' => 'qualification', 'width' => '10', 'align' => 'left', 'search' => 'true'), array('name' => 'sent_date', 'index' => 'sent_date', 'width' => '30', 'align' => 'left', 'search' => 'true', 'wrap_cell' => 'true'), array('name' => 'qualificator_id', 'index' => 'qualificator_id', 'width' => '20', 'align' => 'left', 'search' => 'true'), array('name' => 'actions', 'index' => 'actions', 'width' => '20', 'align' => 'left', 'search' => 'false', 'sortable' => 'false'));
    } else {
        $type = 'complex';
        $columns = array(get_lang('Type'), get_lang('Title'), get_lang('Feedback'), get_lang('Date'), get_lang('Actions'));
        $column_model = array(array('name' => 'type', 'index' => 'file', 'width' => '5', 'align' => 'left', 'search' => 'false', 'sortable' => 'false'), array('name' => 'title', 'index' => 'title', 'width' => '60', 'align' => 'left', 'search' => 'false', 'wrap_cell' => "true"), array('name' => 'qualification', 'index' => 'qualification', 'width' => '10', 'align' => 'left', 'search' => 'true'), array('name' => 'sent_date', 'index' => 'sent_date', 'width' => '30', 'align' => 'left', 'search' => 'true', 'wrap_cell' => 'true', 'sortable' => 'false'), array('name' => 'actions', 'index' => 'actions', 'width' => '20', 'align' => 'left', 'search' => 'false', 'sortable' => 'false'));
    }
    $extra_params = array('autowidth' => 'true', 'height' => 'auto', 'sortname' => 'firstname');
    $url = api_get_path(WEB_AJAX_PATH) . 'model.ajax.php?a=get_work_user_list&work_id=' . $workId . '&type=' . $type;
    ?>
        <script>
            $(function() {
            <?php 
    echo Display::grid_js('results', $url, $columns, $column_model, $extra_params);
    ?>
            });
        </script>
    <?php 
    $html = '';
    $tableWork = Display::grid_html('results');
    $html = Display::panel($tableWork);
    echo $html;
}
Display::display_footer();
コード例 #16
0
 /**
  * Display a form with the options for the field_id given in REQUEST
  * @return void Prints output
  */
 public function display()
 {
     // action links
     echo '<div class="actions">';
     $field_id = isset($_REQUEST['field_id']) ? intval($_REQUEST['field_id']) : null;
     echo '<a href="' . api_get_self() . '?action=add&type=' . $this->type . '&field_id=' . $field_id . '">' . Display::return_icon('add_user_fields.png', get_lang('Add'), '', ICON_SIZE_MEDIUM) . '</a>';
     echo '</div>';
     echo Display::grid_html('extra_field_options');
 }
コード例 #17
0
ファイル: index.php プロジェクト: ilosada/chamilo-lms-icpna
        } else {
            echo '
			<div class="report_section">
				<table class="table table-bordered">
					<tr>
						<td>' . get_lang('NbActiveSessions') . '</td>
						<td align="right">' . $nb_sessions_current . '</td>
					</tr>
					<tr>
						<td>' . get_lang('NbInactiveSessions') . '</td>
						<td align="right">' . $nb_sessions_past . '</td>
					</tr>
				</table>
			</div>';
        }
        echo Display::grid_html('sessions');
        /*  End session overview */
    }
}
if ($is_platform_admin && $view == 'admin' && $display != 'yourstudents') {
    echo '<a href="' . api_get_self() . '?view=admin&amp;display=coaches">' . get_lang('DisplayCoaches') . '</a> | ';
    echo '<a href="' . api_get_self() . '?view=admin&amp;display=useroverview">' . get_lang('DisplayUserOverview') . '</a>';
    if ($display == 'useroverview') {
        echo ' ( <a href="' . api_get_self() . '?view=admin&amp;display=useroverview&amp;export=options">' . get_lang('ExportUserOverviewOptions') . '</a> )';
    }
    echo ' | <a href="' . api_get_self() . '?view=admin&amp;display=sessionoverview">' . get_lang('DisplaySessionOverview') . '</a>';
    echo ' | <a href="' . api_get_self() . '?view=admin&amp;display=courseoverview">' . get_lang('DisplayCourseOverview') . '</a>';
    echo ' | <a href="' . api_get_path(WEB_CODE_PATH) . 'tracking/question_course_report.php?view=admin">' . get_lang('LPQuestionListResults') . '</a>';
    echo ' | <a href="' . api_get_path(WEB_CODE_PATH) . 'tracking/course_session_report.php?view=admin">' . get_lang('LPExerciseResultsBySession') . '</a>';
    echo '<br /><br />';
    if ($display === 'useroverview') {
コード例 #18
0
        $(function () {
            <?php 
// grid definition see the $career->display() function
echo Display::grid_js('question_list', $url, $columns, $column_model, $extra_params, array(), $action_links, true);
?>

            $("#question_list").jqGrid('navGrid','#question_list_pager',
                {search:false, edit:false, add:false, del:false, refresh:true}
            );
        });
    </script>

    <div id="dialog-confirm" title="<?php 
echo get_lang("ConfirmYourChoice");
?>
" style="display:none;">
        <p>
            <span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0; display:none;">
            </span>
            <?php 
echo get_lang("AreYouSureToDelete");
?>
        </p>
    </div>

<?php 
Question::display_type_menu($objExercise);
echo Question::getMediaLabels();
echo '<br/><div style="clear:both;"></div>';
echo Display::grid_html('question_list');
コード例 #19
0
	$table->display();
}*/
//jqgrid will use this URL to do the selects
//$url            = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_careers';
//The order is important you need to check the the $column variable in the model.ajax.php file
$columns = array(get_lang('Name'), get_lang('Description'), get_lang('CountDoneAttendance'));
//Column config
$column_model = array(array('name' => 'name', 'index' => 'name', 'width' => '300', 'align' => 'left'), array('name' => 'description', 'index' => 'description', 'width' => '200', 'align' => 'left', 'sortable' => 'false'), array('name' => 'attendance_qualify_max', 'index' => 'attendance_qualify_max', 'width' => '80', 'align' => 'left', 'sortable' => 'false'));
if (api_is_allowed_to_edit(null, true)) {
    $columns[] = get_lang('Actions');
    $column_model[] = array('name' => 'actions', 'index' => 'actions', 'width' => '100', 'align' => 'left', 'sortable' => 'false');
}
$extra_params = array();
//Autowidth
$extra_params['autowidth'] = 'true';
//height auto
$extra_params['height'] = 'auto';
$data = Attendance::get_attendance_data();
?>
<script>
$(function() {
<?php 
// grid definition see the $career->display() function
echo Display::grid_js('attendance', 'false', $columns, $column_model, $extra_params, $data, null, true);
?>
 
});
</script>
<?php 
echo Display::grid_html('attendance');
コード例 #20
0
ファイル: work.lib.php プロジェクト: annickvdp/Chamilo1.9.10
/**
 * @param int $workId
 * @return string
 */
function showStudentList($workId)
{
    $columnModel = array(
        array('name'=>'student', 'index'=>'student', 'width'=>'150', 'align'=>'left', 'sortable' => 'false'),
        array('name'=>'works', 'index'=>'works',  'width'=>'50', 'align'=>'left', 'sortable' => 'false')
    );
    $token = null;

    $url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_work_student_list_overview&work_id='.$workId.'&'.api_get_cidreq();

    $columns = array(
        get_lang('Students'),
        get_lang('Works')
    );

    $order = api_is_western_name_order() ? 'firstname' : 'lastname';
    $params = array(
        'autowidth' => 'true',
        'height' => 'auto',
        'rowNum' => 10,
        'sortname' => $order,
        'sortorder' => 'asc'
    );

    $html = '<script>
    $(function() {
        '.Display::grid_js('studentList', $url, $columns, $columnModel, $params, array(), null, true).'
        $("#workList").jqGrid(
            "navGrid",
            "#studentList_pager",
            { edit: false, add: false, del: false },
            { height:280, reloadAfterSubmit:false }, // edit options
            { height:280, reloadAfterSubmit:false }, // add options
            { width:500 } // search options
        );
    });
    </script>';
    $html .= Display::grid_html('studentList');
    return $html;
}
コード例 #21
0
                        array('name'=>'firstname',          'index'=>'firstname',   'width'=>'70',   'align'=>'left', 'sortable' => 'false'),
                        array('name'=>'lastname',           'index'=>'lastname',     'width'=>'70',   'align'=>'left', 'sortable' => 'false'),
                        array('name'=>'skills_acquired',    'index'=>'skills_acquired', 'width'=>'30	',   'align'=>'left', 'sortable' => 'false'),
                        array('name'=>'currently_learning', 'index'=>'currently_learning',    'width'=>'30',   'align'=>'left', 'sortable' => 'false'),
                        array('name'=>'rank',               'index'=>'rank',      'width'=>'30',   'align'=>'left', 'sortable' => 'false')
                       );

//Autowidth
$extra_params['autowidth'] = 'true';

//height auto
$extra_params['height'] = 'auto';
//$extra_params['excel'] = 'excel';

//$extra_params['rowList'] = array(10, 20 ,30);

$jqgrid = Display::grid_js('skill_ranking', $url,$columns,$column_model,$extra_params, array(), $action_links,true);

$content = Display::grid_html('skill_ranking');


$tpl = new Template($tool_name);

$tpl->assign('actions', $actions);
$tpl->assign('message', $message);

$tpl->assign('jqgrid_html', $jqgrid);
$content .= $tpl->fetch('default/skill/skill_ranking.tpl');
$tpl->assign('content', $content);

$tpl->display_one_col_template();
コード例 #22
0
    /**
     * Displays the title + grid
     * @return  string  html code
     */
	function display() {
		// action links
		echo '<div class="actions" style="margin-bottom:20px">';
        echo '<a href="career_dashboard.php">'.Display::return_icon('back.png',get_lang('Back'),'','32').'</a>';
		echo '<a href="'.api_get_self().'?action=add">'.Display::return_icon('new_promotion.png',get_lang('Add'),'','32').'</a>';
		echo '<a href="'.api_get_path(WEB_CODE_PATH).'admin/session_add.php">'.Display::return_icon('new_session.png',get_lang('AddSession'),'','32').'</a>';
		echo '</div>';
        echo Display::grid_html('promotions');
	}
コード例 #23
0
     if (empty($count)) {
         $html = '';
         if ((api_is_allowed_to_edit(false, true) || api_get_course_setting('allow_user_edit_announcement') && !api_is_anonymous()) && (empty($_GET['origin']) || $_GET['origin'] !== 'learnpath')) {
             $html .= '<div id="no-data-view">';
             $html .= '<h3>' . get_lang('Announcements') . '</h3>';
             $html .= Display::return_icon('valves.png', '', array(), 64);
             $html .= '<div class="controls">';
             $html .= Display::url(get_lang('AddAnnouncement'), api_get_self() . "?" . api_get_cidreq() . "&action=add", array('class' => 'btn btn-primary'));
             $html .= '</div>';
             $html .= '</div>';
         } else {
             $html = Display::return_message(get_lang('NoAnnouncements'), 'warning');
         }
         $content = $html;
     } else {
         $content .= Display::grid_html('announcements');
     }
     break;
 case 'delete':
     /* Delete announcement */
     $id = intval($_GET['id']);
     if ($sessionId != 0 && api_is_allowed_to_session_edit(false, true) == false) {
         api_not_allowed();
     }
     if (!api_is_course_coach() || api_is_element_in_the_session(TOOL_ANNOUNCEMENT, $id)) {
         AnnouncementManager::delete_announcement($_course, $id);
         Display::addFlash(Display::return_message(get_lang('AnnouncementDeleted')));
     }
     header('Location: ' . $homeUrl);
     exit;
     break;
コード例 #24
0
$extra_params['autowidth'] = 'true';
//height auto
$extra_params['height'] = 'auto';
//With this function we can add actions to the jgrid (edit, delete, etc)
$action_links = 'function action_formatter(cellvalue, options, rowObject) {
                         return \'<a href="?action=edit&id=\'+options.rowId+\'">' . Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL) . '</a>' . '&nbsp;<a onclick="javascript:if(!confirm(' . "\\'" . addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES)) . "\\'" . ')) return false;"  href="?action=copy&id=\'+options.rowId+\'">' . Display::return_icon('copy.png', get_lang('Copy'), '', ICON_SIZE_SMALL) . '</a>' . '&nbsp;<a onclick="javascript:if(!confirm(' . "\\'" . addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES)) . "\\'" . ')) return false;"  href="?action=delete&id=\'+options.rowId+\'">' . Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL) . '</a>' . '\';
                 }';
$js_content = Display::grid_js('documents', '', $columns, $column_model, $extra_params, $sortable_data, $action_links, true);
$htmlHeadXtra[] = '<script>
$(function() {
    // grid definition see the $career->display() function
    ' . $js_content . '
});
</script>';
require_once 'controller.php';
$controller = new DocumentController();
$tpl = $controller->tpl->get_template('layout/layout_2_col.tpl');
$content = Display::grid_html('documents');
if (!is_null($docs_and_folders)) {
    // Show download zipped folder icon
    global $total_size;
    if (!$is_certificate_mode && $total_size != 0 && (api_get_setting('students_download_folders') == 'true' || api_is_allowed_to_edit() || api_is_platform_admin())) {
        //for student does not show icon into other shared folder, and does not show into main path (root)
        if (is_my_shared_folder(api_get_user_id(), $curdirpath, $session_id) && $curdirpath != '/' || api_is_allowed_to_edit() || api_is_platform_admin()) {
            $link = '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&amp;action=downloadfolder&amp;id=' . $document_id . '">' . Display::return_icon('save_pack.png', get_lang('Save') . ' (ZIP)', '', ICON_SIZE_MEDIUM) . '</a>';
        }
    }
}
$content .= Display::div($link, array('class' => 'right'));
$controller->tpl->assign('content', $content);
$controller->tpl->display($tpl);
コード例 #25
0
ファイル: usergroup.lib.php プロジェクト: daffef/chamilo-lms
 /**
  * Get HTML grid
  */
 public function display_teacher_view()
 {
     echo Display::grid_html('usergroups');
 }
コード例 #26
0
 /**
  * Display a sortable table that contains an overview off all the progress of the user in a session
  * @author César Perales <*****@*****.**>, Beeznest Team
  */
 static function display_tracking_progress_overview($sessionId = 0, $courseId = 0, $date_from, $date_to)
 {
     //The order is important you need to check the the $column variable in the model.ajax.php file
     $columns = array(get_lang('LastName'), get_lang('FirstName'), get_lang('Username'), get_lang('Total'), get_lang('Courses'), get_lang('LearningPaths'), get_lang('Exercises'), get_lang('Forums'), get_lang('Assignments'), get_lang('ToolWiki'), get_lang('ToolSurvey'), get_lang('LearnpathsTotal'), get_lang('LearnpathsDone'), get_lang('LearnpathsLeft'), get_lang('LearnpathsProgress'), get_lang('ExercisesTotal'), get_lang('ExercisesDone'), get_lang('ExercisesLeft'), get_lang('ExercisesProgress'), get_lang('ForumsTotal'), get_lang('ForumsDone'), get_lang('ForumsLeft'), get_lang('ForumsProgress'), get_lang('AssignmentsTotal'), get_lang('AssignmentsDone'), get_lang('AssignmentsLeft'), get_lang('AssignmentsProgress'), get_lang('WikiTotal'), get_lang('WikiRevisions'), get_lang('WikiRead'), get_lang('WikiUnread'), get_lang('WikiProgress'), get_lang('SurveysTotal'), get_lang('SurveysDone'), get_lang('SurveysLeft'), get_lang('SurveysProgress'));
     //Column config
     $column_model = array(array('name' => 'lastname', 'index' => 'lastname', 'align' => 'left'), array('name' => 'firstname', 'index' => 'firstname', 'align' => 'left'), array('name' => 'username', 'index' => 'username', 'align' => 'left'), array('name' => 'total', 'index' => 'total', 'align' => 'left'), array('name' => 'courses', 'index' => 'courses', 'align' => 'left', 'sortable' => 'false'), array('name' => 'lessons', 'index' => 'lessons', 'align' => 'left', 'sortable' => 'false'), array('name' => 'exercises', 'index' => 'exercises', 'align' => 'left', 'sortable' => 'false'), array('name' => 'forums', 'index' => 'forums', 'align' => 'left', 'sortable' => 'false'), array('name' => 'homeworks', 'index' => 'homeworks', 'align' => 'left', 'sortable' => 'false'), array('name' => 'wikis', 'index' => 'wikis', 'align' => 'left', 'sortable' => 'false'), array('name' => 'surveys', 'index' => 'surveys', 'align' => 'left', 'sortable' => 'false'), array('name' => 'lessons_total', 'index' => 'lessons_total', 'align' => 'center', 'sortable' => 'false'), array('name' => 'lessons_done', 'index' => 'lessons_done', 'align' => 'center', 'sortable' => 'false'), array('name' => 'lessons_left', 'index' => 'lessons_left', 'align' => 'center', 'sortable' => 'false'), array('name' => 'lessons_progress', 'index' => 'lessons_progress', 'align' => 'center', 'sortable' => 'false'), array('name' => 'exercises_total', 'index' => 'exercises_total', 'align' => 'center', 'sortable' => 'false'), array('name' => 'exercises_done', 'index' => 'exercises_done', 'align' => 'center', 'sortable' => 'false'), array('name' => 'exercises_left', 'index' => 'exercises_left', 'align' => 'center', 'sortable' => 'false'), array('name' => 'exercises_progress', 'index' => 'exercises_progress', 'align' => 'center', 'sortable' => 'false'), array('name' => 'forums_total', 'index' => 'forums_total', 'align' => 'center', 'sortable' => 'false'), array('name' => 'forums_done', 'index' => 'forums_done', 'align' => 'center', 'sortable' => 'false'), array('name' => 'forums_left', 'index' => 'forums_left', 'align' => 'center', 'sortable' => 'false'), array('name' => 'forums_progress', 'index' => 'forums_progress', 'align' => 'center', 'sortable' => 'false'), array('name' => 'assigments_total', 'index' => 'assigments_total', 'align' => 'center', 'sortable' => 'false'), array('name' => 'assigments_done', 'index' => 'assigments_done', 'align' => 'center', 'sortable' => 'false'), array('name' => 'assigments_left', 'index' => 'assigments_left', 'align' => 'center', 'sortable' => 'false'), array('name' => 'assigments_progress', 'index' => 'assigments_progress', 'align' => 'center', 'sortable' => 'false'), array('name' => 'wiki_total', 'index' => 'wiki_total', 'align' => 'center', 'sortable' => 'false'), array('name' => 'wiki_revisions', 'index' => 'wiki_revisions', 'align' => 'center', 'sortable' => 'false'), array('name' => 'wiki_read', 'index' => 'wiki_read', 'align' => 'center', 'sortable' => 'false'), array('name' => 'wiki_unread', 'index' => 'wiki_unread', 'align' => 'center', 'sortable' => 'false'), array('name' => 'wiki_progress', 'index' => 'wiki_progress', 'align' => 'center', 'sortable' => 'false'), array('name' => 'surveys_total', 'index' => 'surveys_total', 'align' => 'center', 'sortable' => 'false'), array('name' => 'surveys_done', 'index' => 'surveys_done', 'align' => 'center', 'sortable' => 'false'), array('name' => 'surveys_left', 'index' => 'surveys_left', 'align' => 'center', 'sortable' => 'false'), array('name' => 'surveys_progress', 'index' => 'surveys_progress', 'align' => 'center', 'sortable' => 'false'));
     $action_links = '';
     // jqgrid will use this URL to do the selects
     $url = api_get_path(WEB_AJAX_PATH) . 'model.ajax.php?a=get_session_progress&session_id=' . $sessionId . '&course_id=' . $courseId . '&date_to=' . $date_to . '&date_from=' . $date_from;
     //Table Id
     $tableId = 'progressOverview';
     //Autowidth
     $extra_params['autowidth'] = 'true';
     $extra_params['shrinkToFit'] = 'true';
     $extra_params['headertitles'] = 'true';
     $extra_params['groupHeaders'] = array('courses_detail' => array("startColumnName" => 'courses', "numberOfColumns" => 7, "titleText" => get_lang('Global')), 'lessons' => array("startColumnName" => 'lessons_total', "numberOfColumns" => 4, "titleText" => get_lang('LearningPaths')), 'exercises' => array("startColumnName" => 'exercises_total', "numberOfColumns" => 4, "titleText" => get_lang('Exercises')), 'forums' => array("startColumnName" => 'forums_total', "numberOfColumns" => 4, "titleText" => get_lang('Forums')), 'assignments' => array("startColumnName" => 'assigments_total', "numberOfColumns" => 4, "titleText" => get_lang('Assignments')), 'wikis' => array("startColumnName" => 'wiki_total', "numberOfColumns" => 5, "titleText" => get_lang('Wiki')), 'surveys' => array("startColumnName" => 'surveys_total', "numberOfColumns" => 4, "titleText" => get_lang('Survey')));
     //height auto
     $extra_params['height'] = 'auto';
     $table = Display::grid_js($tableId, $url, $columns, $column_model, $extra_params, array(), $action_links, true);
     $return = '<script>$(function() {' . $table . 'jQuery("#' . $tableId . '").jqGrid("navGrid","#' . $tableId . '_pager",{view:false, edit:false, add:false, del:false, search:false, excel:true});
             jQuery("#' . $tableId . '").jqGrid("navButtonAdd","#' . $tableId . '_pager",{
                    caption:"",
                    title:"' . get_lang('ExportExcel') . '",
                    onClickButton : function () {
                        jQuery("#' . $tableId . '").jqGrid("excelExport",{"url":"' . $url . '&export_format=xls"});
                    }
             });
         });</script>';
     $return .= Display::grid_html($tableId);
     return $return;
 }
コード例 #27
0
$minutes = 60;
$url = api_get_path(WEB_AJAX_PATH) . 'exercise.ajax.php?a=get_live_stats&exercise_id=' . $objExercise->id . '&minutes=' . $minutes;
//The order is important you need to check the the $column variable in the model.ajax.php file
$columns = array(get_lang('FirstName'), get_lang('LastName'), get_lang('Time'), get_lang('QuestionsAlreadyAnswered'), get_lang('Score'));
//Column config
$column_model = array(array('name' => 'firstname', 'index' => 'firstname', 'width' => '100', 'align' => 'left'), array('name' => 'lastname', 'index' => 'lastname', 'width' => '100', 'align' => 'left'), array('name' => 'start_date', 'index' => 'start_date', 'width' => '100', 'align' => 'left'), array('name' => 'question', 'index' => 'count_questions', 'width' => '60', 'align' => 'left', 'sortable' => 'false'), array('name' => 'score', 'index' => 'score', 'width' => '50', 'align' => 'left', 'sortable' => 'false'));
//Autowidth
$extra_params['autowidth'] = 'true';
//height auto
$extra_params['height'] = 'auto';
?>
<script>

function refreshGrid() {
    var grid = $("#live_stats");
    grid.trigger("reloadGrid");
    t = setTimeout("refreshGrid()", 10000);
}

$(function() {
    <?php 
echo Display::grid_js('live_stats', $url, $columns, $column_model, $extra_params, array(), null, true);
?>
    refreshGrid();
});
</script>
<?php 
$actions = '<a href="exercise_report.php?exerciseId=' . intval($_GET['exerciseId']) . '&' . api_get_cidreq() . '">' . Display::return_icon('back.png', get_lang('GoBackToQuestionList'), '', ICON_SIZE_MEDIUM) . '</a>';
echo $actions = Display::div($actions, array('class' => 'actions'));
echo Display::grid_html('live_stats');
Display::display_footer();
コード例 #28
0
 /**
  * Gets the question list per category
  * @param Application $app
  * @param $categoryId
  * @return Response
  */
 public function getQuestionsByCategoryAction(Application $app, $categoryId)
 {
     // Getting CQuizCategory repo.
     /** @var \Doctrine\ORM\EntityManager $em */
     $em = $app['orm.em'];
     $repo = $em->getRepository('Entity\\CQuizCategory');
     /** @var \Entity\CQuizCategory $category */
     $category = $repo->find($categoryId);
     $questionColumns = \Question::getQuestionColumns();
     $columnModel = $questionColumns['column_model'];
     $columns = $questionColumns['columns'];
     $rules = $questionColumns['rules'];
     $grid = \Display::grid_html('questions');
     //jqgrid will use this URL to do the selects
     $url = $app['url_generator']->generate('model_ajax') . '?a=get_questions&categoryId=' . $categoryId;
     $extraParams['postData'] = array('filters' => array("groupOp" => "AND", "rules" => $rules));
     // Autowidth.
     $extraParams['autowidth'] = 'true';
     // Height auto.
     $extraParams['height'] = 'auto';
     $token = null;
     $editUrl = $app['url_generator']->generate('admin_questions');
     $actionLinks = 'function action_formatter(cellvalue, options, rowObject) {
         return \'<a href="' . $editUrl . '/\'+rowObject[0]+\'/edit">' . \Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL) . '</a>' . '\';
     }';
     $testCategory = new \Testcategory($categoryId);
     $count = $testCategory->getCategoryQuestionsNumber();
     $js = \Display::grid_js('questions', $url, $columns, $columnModel, $extraParams, array(), $actionLinks, true);
     //$count = $repo->childCount($category);
     $app['template']->assign('category_children', $count);
     $app['template']->assign('category', $category);
     $app['template']->assign('grid', $grid);
     $app['template']->assign('js', $js);
     $response = $app['template']->render_template('admin/questionmanager/questions.tpl');
     return new Response($response, 200, array());
 }
コード例 #29
0
ファイル: session.php プロジェクト: omaoibrahim/chamilo-lms
        $actionsRight = Display::url(Display::return_icon('printer.png', get_lang('Print'), array(), 32), 'javascript: void(0);', array('onclick' => 'javascript: window.print();'));
        $actionsRight .= Display::url(Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), array(), 32), api_get_self() . '?export=csv');
    }
    $toolbar = Display::toolbarAction('toolbar-session', $content = array(0 => $actionsLeft, 1 => $actionsRight));
    echo $toolbar;
    echo Display::page_header(get_lang('YourSessionsList'));
} else {
    $a_sessions = Tracking::get_sessions_coached_by_user($id_coach);
}
$form = new FormValidator('search_course', 'get', api_get_path(WEB_CODE_PATH) . 'mySpace/session.php');
$form->addElement('text', 'keyword', get_lang('Keyword'));
$form->addButtonSearch(get_lang('Search'));
$keyword = '';
if ($form->validate()) {
    $keyword = $form->getSubmitValue('keyword');
}
$form->setDefaults(array('keyword' => $keyword));
$url = api_get_path(WEB_AJAX_PATH) . 'model.ajax.php?a=get_sessions_tracking&keyword=' . Security::remove_XSS($keyword);
$columns = array(get_lang('Title'), get_lang('Date'), get_lang('NbCoursesPerSession'), get_lang('NbStudentPerSession'), get_lang('Details'));
// Column config
$columnModel = array(array('name' => 'name', 'index' => 'name', 'width' => '255', 'align' => 'left'), array('name' => 'date', 'index' => 'date', 'width' => '150', 'align' => 'left', 'sortable' => 'false'), array('name' => 'course_per_session', 'index' => 'course_per_session', 'width' => '150', 'sortable' => 'false'), array('name' => 'student_per_session', 'index' => 'student_per_session', 'width' => '100', 'sortable' => 'false'), array('name' => 'details', 'index' => 'details', 'width' => '100', 'sortable' => 'false'));
$extraParams = array('autowidth' => 'true', 'height' => 'auto');
$js = '<script>
    $(function() {
        ' . Display::grid_js('session_tracking', $url, $columns, $columnModel, $extraParams, array(), null, true) . '
    });
</script>';
echo $js;
$form->display();
echo Display::grid_html('session_tracking');
Display::display_footer();
コード例 #30
0
ファイル: index.php プロジェクト: KRCM13/chamilo-lms
        $reportingTab = Display::return_message(get_lang('NoDataAvailable'), 'warning');
    }
}
// Main headers
$headers = array(Display::return_icon('moderator_star.png'), get_lang('Courses'), get_lang('LearningPaths'));
if (!api_is_anonymous()) {
    $headers[] = get_lang('MyQCM');
    $headers[] = get_lang('MyStatistics');
}
// Sub headers
/*$sub_header = array(
    get_lang('AllLearningPaths'),
    get_lang('PerWeek'),
    get_lang('ByCourse')
);

// Sub headers data
$lpTab = Display::tabs(
    $sub_header,
    array(
        //Display::grid_html('list_default'),
        Display::grid_html('list_week'),
        //Display::grid_html('list_course')
    ),
    'sub_tab'
);*/
$coursesTab = Display::grid_html('courses');
$starTab = Display::grid_html('list_default');
// Main headers data
echo Display::tabs($headers, array($starTab, $coursesTab, Display::grid_html('list_course'), Display::grid_html('exercises'), $reportingTab));
Display::display_footer();