Commit 61589afa authored by Daniel Haag's avatar Daniel Haag
Browse files

Merge remote-tracking branch 'origin/master'

parents edc369c1 be4c1224
......@@ -317,7 +317,7 @@ switch($menu_mode) {
$sqlq .= $sql_answer_position;
$sqlq .= ' GROUP BY answer_question_id';
if ($tsubset_answers > 0) {
$sqlq .= ' HAVING (COUNT(answer_id)='.($tsubset_answers-1).')'; //changed, ESM
$sqlq .= ' HAVING (COUNT(answer_id)>='.($tsubset_answers-1).')';
}
$sqlq .= ' )';
} elseif ($tsubset_type == 2) {
......@@ -330,7 +330,7 @@ switch($menu_mode) {
$sqlq .= $sql_answer_position;
$sqlq .= ' GROUP BY answer_question_id';
if ($tsubset_answers > 0) {
$sqlq .= ' HAVING (COUNT(answer_id)='.$tsubset_answers.')'; //changed, ESM
$sqlq .= ' HAVING (COUNT(answer_id)>='.$tsubset_answers.')';
}
$sqlq .= ' )';
} elseif ($tsubset_type == 4) {
......@@ -345,11 +345,12 @@ switch($menu_mode) {
HAVING (COUNT(answer_id)>1))';
}
$sqlq .= $sql_questions_position;
if (K_DATABASE_TYPE == 'ORACLE') {
/* if (K_DATABASE_TYPE == 'ORACLE') {
$sqlq = 'SELECT * FROM ('.$sqlq.') WHERE rownum <= '.$tsubset_quantity.'';
} else {
$sqlq .= ' LIMIT '.$tsubset_quantity.'';
}
no limitation for answers ESM 150331 */
$numofrows = 0;
if ($rq = F_db_query($sqlq, $db)) {
if ($mq = F_db_fetch_array($rq)) {
......@@ -1222,7 +1223,8 @@ if (isset($test_id) AND ($test_id > 0)) {
echo '</span>'.K_NEWLINE;
echo '</div>'.K_NEWLINE;
echo getFormRowTextInput('tsubset_answers', $l['w_num_answers'], $l['h_num_answers'], '', $tsubset_answers, '^([0-9]*)$', 20, false, false, false);
//commented out b/c no limitation for answers ESM 150331
//echo getFormRowTextInput('tsubset_answers', $l['w_num_answers'], $l['h_num_answers'], '', $tsubset_answers, '^([0-9]*)$', 20, false, false, false);
echo '<div class="row">'.K_NEWLINE;
echo '<span class="label">&nbsp;</span>'.K_NEWLINE;
......
......@@ -133,6 +133,7 @@ function F_show_select_user($order_field, $orderdir, $firstrow, $rowsperpage, $g
if (strlen($searchterms) > 0) {
$filter .= '&amp;searchterms='.urlencode($searchterms);
}
echo '<th>'.'#'.'</th>'.K_NEWLINE; //ESM 150317
echo F_select_table_header_element('user_name', $nextorderdir, $l['h_login_name'], $l['w_user'], $order_field, $filter);
echo F_select_table_header_element('user_lastname', $nextorderdir, $l['h_lastname'], $l['w_lastname'], $order_field, $filter);
echo F_select_table_header_element('user_firstname', $nextorderdir, $l['h_firstname'], $l['w_firstname'], $order_field, $filter);
......@@ -143,6 +144,7 @@ function F_show_select_user($order_field, $orderdir, $firstrow, $rowsperpage, $g
echo '<th title="'.$l['t_all_results_user'].'">'.$l['w_tests'].'</th>'.K_NEWLINE;
echo '</tr>'.K_NEWLINE;
$itemcount = 0;
$i=$firstrow; //ESM 150317
do {
$itemcount++;
echo '<tr>'.K_NEWLINE;
......@@ -153,6 +155,7 @@ function F_show_select_user($order_field, $orderdir, $firstrow, $rowsperpage, $g
}
echo ' />';
echo '</td>'.K_NEWLINE;
$i++; echo "<td>$i</td>"; //ESM 150317
echo '<td style="text-align:'.$txtalign.';">&nbsp;<a href="tce_edit_user.php?user_id='.$m['user_id'].'" title="'.$l['w_edit'].'">'.htmlspecialchars($m['user_name'], ENT_NOQUOTES, $l['a_meta_charset']).'</a></td>'.K_NEWLINE;
echo '<td style="text-align:'.$txtalign.';">&nbsp;'.htmlspecialchars($m['user_lastname'], ENT_NOQUOTES, $l['a_meta_charset']).'</td>'.K_NEWLINE;
echo '<td style="text-align:'.$txtalign.';">&nbsp;'.htmlspecialchars($m['user_firstname'], ENT_NOQUOTES, $l['a_meta_charset']).'</td>'.K_NEWLINE;
......@@ -348,6 +351,7 @@ function F_show_select_user_popup($order_field, $orderdir, $firstrow, $rowsperpa
if (strlen($searchterms) > 0) {
$filter .= '&amp;searchterms='.urlencode($searchterms);
}
echo '<th>'.'#'.'</th>'.K_NEWLINE; //ESM 150317
echo F_select_table_header_element('user_name', $nextorderdir, $l['h_login_name'], $l['w_user'], $order_field, $filter);
echo F_select_table_header_element('user_lastname', $nextorderdir, $l['h_lastname'], $l['w_lastname'], $order_field, $filter);
echo F_select_table_header_element('user_firstname', $nextorderdir, $l['h_firstname'], $l['w_firstname'], $order_field, $filter);
......@@ -358,6 +362,7 @@ function F_show_select_user_popup($order_field, $orderdir, $firstrow, $rowsperpa
//echo '<th title="'.$l['h_group_name'].'">'.$l['w_groups'].'</th>'.K_NEWLINE;
echo '</tr>'.K_NEWLINE;
$itemcount = 0;
$i=$firstrow; //ESM 150317
do {
$itemcount++;
// on click the user ID will be returned on the calling form field
......@@ -365,6 +370,7 @@ function F_show_select_user_popup($order_field, $orderdir, $firstrow, $rowsperpa
$jsaction .= 'window.opener.document.getElementById(\''.$cid.'\').onchange();';
$jsaction .= 'window.close();';
echo '<tr>'.K_NEWLINE;
$i++; echo "<td>$i</td>"; //ESM 150317
echo '<td style="text-align:'.$txtalign.';">&nbsp;<a href="#" onclick="'.$jsaction.'" title="['.$l['w_select'].']">'.htmlspecialchars($m['user_name'], ENT_NOQUOTES, $l['a_meta_charset']).'</a></td>'.K_NEWLINE;
echo '<td style="text-align:'.$txtalign.';">&nbsp;'.htmlspecialchars($m['user_lastname'], ENT_NOQUOTES, $l['a_meta_charset']).'</td>'.K_NEWLINE;
echo '<td style="text-align:'.$txtalign.';">&nbsp;'.htmlspecialchars($m['user_firstname'], ENT_NOQUOTES, $l['a_meta_charset']).'</td>'.K_NEWLINE;
......
......@@ -99,16 +99,18 @@ function F_list_online_users($wherequery, $order_field, $orderdir, $firstrow, $r
echo '<div class="container">'.K_NEWLINE;
echo '<table class="userselect">'.K_NEWLINE;
echo '<tr>'.K_NEWLINE;
echo '<th>'.'#'.'</th>'.K_NEWLINE; //ESM 150317
echo '<th>'.$l['w_user'].'</th>'.K_NEWLINE;
echo '<th>'.$l['w_level'].'</th>'.K_NEWLINE;
echo '<th>'.$l['w_ip'].'</th>'.K_NEWLINE;
echo '</tr>'.K_NEWLINE;
$i=$firstrow; //ESM 150317
if($r = F_db_query($sql, $db)) {
while($m = F_db_fetch_array($r)) {
$this_session = F_session_string_to_array($m['cpsession_data']);
echo '<tr>';
$i++; echo "<td>$i</td>"; //ESM 150317
echo '<td align="left">';
$user_str = '';
if ($this_session['session_user_lastname']) {
......@@ -133,6 +135,7 @@ function F_list_online_users($wherequery, $order_field, $orderdir, $firstrow, $r
}
echo '</table>'.K_NEWLINE;
// --- ------------------------------------------------------
// --- page jump
if ($rowsperpage > 0) {
......
......@@ -174,11 +174,12 @@ $isunicode = (strcasecmp($l['a_meta_charset'], 'UTF-8') == 0);
$pdf = new TCPDFEX(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, $isunicode);
// Set backlink QR-Code
/* QR code not needed 150330 ESM
if ($pubmode) {
$pdf->setTCExamBackLink(K_PATH_URL.'public/code/tce_test_allresults.php?'.$filter);
} else {
$pdf->setTCExamBackLink(K_PATH_URL.'admin/code/tce_show_result_allusers.php?'.$filter);
}
}*/
// set document information
$pdf->SetCreator('TCExam ver.'.K_TCEXAM_VERSION.'');
......@@ -187,7 +188,7 @@ $pdf->SetTitle($doc_title);
$pdf->SetSubject($doc_description);
$pdf->SetKeywords('TCExam, '.$doc_title);
$pdf->setHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
$pdf->setHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
//set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
......
......@@ -415,10 +415,10 @@ if (isset($_REQUEST['sel'])) {
echo '<a href="tce_xml_results.php?menu_mode=startlongprocess'.$filter.'" class="xmlbutton" title="'.$l['h_xml_export'].'">XML</a> ';
echo '<a href="tce_xml_results.php?format=JSON&amp;menu_mode=startlongprocess'.$filter.'" class="xmlbutton" title="JSON">JSON</a> ';
echo '<a href="tce_tsv_result_allusers.php?'.$filter.'&amp;order_field='.urlencode($order_field).'&amp;orderdir='.$orderdir.'" class="xmlbutton" title="'.$l['h_tsv_export'].'">TSV</a> ';
echo '<a href="tce_pdf_results.php?mode=1'.$filter.'" class="xmlbutton" title="'.$l['h_pdf'].'">'.$l['w_pdf'].'</a> ';
echo '<a href="tce_pdf_results.php?mode=4'.$filter.'" class="xmlbutton" title="'.$l['h_pdf_all'].'">'.$l['w_pdf_all'].'</a> ';
echo '<a href="tce_pdf_results.php?mode=1&amp;'.$filter.'" class="xmlbutton" title="'.$l['h_pdf'].'">'.$l['w_pdf'].'</a> ';
echo '<a href="tce_pdf_results.php?mode=4&amp;'.$filter.'" class="xmlbutton" title="'.$l['h_pdf_all'].'">'.$l['w_pdf_all'].'</a> ';
if (K_DISPLAY_PDFTEXT_BUTTON) {
echo '<a href="tce_pdf_results.php?mode=5'.$filter.'" class="xmlbutton" title="'.$l['h_pdf_all'].' - TEXT">'.$l['w_pdf'].' TEXT</a> ';
echo '<a href="tce_pdf_results.php?mode=5&amp;'.$filter.'" class="xmlbutton" title="'.$l['h_pdf_all'].' - TEXT">'.$l['w_pdf'].' TEXT</a> ';
}
echo '<a href="tce_email_results.php?mode=1&amp;menu_mode=startlongprocess'.$filter.'" class="xmlbutton" title="'.$l['h_email_all_results'].'">'.$l['w_email_all_results'].'</a> ';
echo '<a href="tce_email_results.php?mode=0&amp;menu_mode=startlongprocess'.$filter.'" class="xmlbutton" title="'.$l['h_email_all_results'].' + PDF">'.$l['w_email_all_results'].' + PDF</a> ';
......
......@@ -213,7 +213,7 @@ div.creditslogos {
/* SYSTEM MESSAGES ------------------- */
div.error {
background-color: #FF9999;
background-color: #FF3300;
font-size: 95%;
font-weight: bold;
margin: 0px 0px 0px 0px;
......@@ -281,7 +281,7 @@ div.header div.right input{
}
div.message {
background-color: #99CCFF;
background-color: #66FF66;
font-size: 95%;
font-weight: bold;
margin: 0px 0px 0px 0px;
......@@ -517,7 +517,7 @@ div.userbar a.loginbutton:hover, div.userbar a.loginbutton:focus {
}
div.warning {
background-color: #99FF99;
background-color: #FFFF00;
font-size: 95%;
font-weight: bold;
margin: 0px 0px 0px 0px;
......
......@@ -268,7 +268,6 @@ $BODY$
SELECT (xpath('/userVO/login/text()', uservo))[1] into login;
SELECT user_id INTO userid FROM tce_users WHERE user_name = login;
SELECT group_id INTO groupid FROM tce_user_groups WHERE external_id = pgroupid || ':' || pappointmentid;
UPDATE tce_users SET user_level = 0 WHERE user_id = userid;
DELETE FROM tce_usrgroups WHERE usrgrp_user_id = userid AND usrgrp_group_id = groupid;
END;
......
......@@ -60,17 +60,17 @@ define ('K_AUTH_PUBLIC_TEST_RESULTS', 1);
/**
* Required user's level to access user page submenu
*/
define ('K_AUTH_PAGE_USER', 1);
define ('K_AUTH_PAGE_USER', 5);
/**
* Required user's level to change email
*/
define ('K_AUTH_USER_CHANGE_EMAIL', 1);
define ('K_AUTH_USER_CHANGE_EMAIL', 10);
/**
* Required user's level to change password
*/
define ('K_AUTH_USER_CHANGE_PASSWORD', 1);
define ('K_AUTH_USER_CHANGE_PASSWORD', 10);
/**
* Required user's level to display a link for administration area
......
......@@ -184,7 +184,7 @@ div.creditslogos {
/* SYSTEM MESSAGES ------------------- */
div.error {
background-color: #FF9999;
background-color: #FF3300;
font-size: 95%;
font-weight: bold;
margin: 0px 0px 0px 0px;
......@@ -252,7 +252,7 @@ div.header div.right input{
}
div.message {
background-color: #99CCFF;
background-color: #66FF66;
font-size: 95%;
font-weight: bold;
margin: 0px 0px 0px 0px;
......@@ -434,7 +434,7 @@ div.userbar a.loginbutton:hover, div.userbar a.loginbutton:focus {
}
div.warning {
background-color: #99FF99;
background-color: #FFFF00;
font-size: 95%;
font-weight: bold;
margin: 0px 0px 0px 0px;
......
......@@ -32,17 +32,17 @@
/**
* Header title.
*/
define ('PDF_HEADER_TITLE', "School name");
define ('PDF_HEADER_TITLE', "Universität Innsbruck");
/**
* Header description string.
*/
define ('PDF_HEADER_STRING', "first row\nsecond row\nthird row");
define ('PDF_HEADER_STRING', "Innrain 52\n6020 Innsbruck\n");
/**
* Image logo.
*/
define ('PDF_HEADER_LOGO', 'logo_example.png');
define ('PDF_HEADER_LOGO', 'Uni_Logo_4C.jpg');
/**
* Header logo image width [mm].
......
......@@ -107,6 +107,8 @@
* @version 6.0.099
*/
 
ini_set('max_execution_time','300');
// TCPDF configuration
require_once(dirname(__FILE__).'/tcpdf_autoconfig.php');
// TCPDF static font methods and data
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment