|
|
|
|
@ -12,22 +12,22 @@ if (!$allowed) { |
|
|
|
|
api_not_allowed(true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Display::display_header($tool_name); |
|
|
|
|
Display::display_header(); |
|
|
|
|
|
|
|
|
|
//jqgrid will use this URL to do the selects |
|
|
|
|
$url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_user_list_plugin_widescale'; |
|
|
|
|
|
|
|
|
|
//The order is important you need to check the the $column variable in the model.ajax.php file |
|
|
|
|
$columns = array(get_lang('Username'), get_lang('Firstname'), get_lang('Lastname'), get_lang('Password')); |
|
|
|
|
$columns = array(get_lang('Username'), get_lang('Firstname'), get_lang('Lastname'), get_lang('Password')); |
|
|
|
|
|
|
|
|
|
//Column config |
|
|
|
|
$column_model = array( |
|
|
|
|
array('name'=>'username', 'index'=>'username', 'width'=>'100', 'align'=>'left'), |
|
|
|
|
array('name'=>'firstname', 'index'=>'firstname', 'width'=>'100', 'align'=>'left'), |
|
|
|
|
array('name'=>'lastname', 'index'=>'lastname', 'width'=>'100', 'align'=>'left'), |
|
|
|
|
array('name'=>'exam_password', 'index'=>'exam_password', 'width'=>'100', 'align'=>'left','sortable'=>'false'), |
|
|
|
|
//array('name'=>'actions', 'index'=>'actions', 'width'=>'100', 'align'=>'left','formatter'=>'action_formatter','sortable'=>'false') |
|
|
|
|
); |
|
|
|
|
array('name'=>'username', 'index'=>'username', 'width'=>'100', 'align'=>'left'), |
|
|
|
|
array('name'=>'firstname', 'index'=>'firstname', 'width'=>'100', 'align'=>'left'), |
|
|
|
|
array('name'=>'lastname', 'index'=>'lastname', 'width'=>'100', 'align'=>'left'), |
|
|
|
|
array('name'=>'exam_password', 'index'=>'exam_password', 'width'=>'100', 'align'=>'left','sortable'=>'false'), |
|
|
|
|
//array('name'=>'actions', 'index'=>'actions', 'width'=>'100', 'align'=>'left','formatter'=>'action_formatter','sortable'=>'false') |
|
|
|
|
); |
|
|
|
|
//Autowidth |
|
|
|
|
$extra_params['autowidth'] = 'true'; |
|
|
|
|
//height auto |
|
|
|
|
@ -36,11 +36,12 @@ $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>'. |
|
|
|
|
' <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>'. |
|
|
|
|
' <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>'. |
|
|
|
|
'\'; |
|
|
|
|
}';*/ |
|
|
|
|
return \'<a href="?action=edit&id=\'+options.rowId+\'">'.Display::return_icon('edit.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>'. |
|
|
|
|
' <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>'. |
|
|
|
|
' <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']; |
|
|
|
|
|