Fixed bug 4052
This commit is contained in:
+14
-14
@@ -235,15 +235,15 @@ function quiz_print_question_list($quiz, $allowdelete=true, $showbreaks=true) {
|
||||
echo '<td><hr noshade="noshade" /></td><td width="45">';
|
||||
if ($count > 1) {
|
||||
echo "<a title=\"$strmoveup\" href=\"edit.php?up=$count&sesskey=$USER->sesskey\"><img
|
||||
src=\"../../pix/t/up.gif\" border=\"0\" alt=\"$strmoveup\" /></a>";
|
||||
src=\"$CFG->pixpath/t/up.gif\" border=\"0\" alt=\"$strmoveup\" /></a>";
|
||||
}
|
||||
echo ' ';
|
||||
if ($count < $lastindex) {
|
||||
echo "<a title=\"$strmovedown\" href=\"edit.php?down=$count&sesskey=$USER->sesskey\"><img
|
||||
src=\"../../pix/t/down.gif\" border=\"0\" alt=\"$strmovedown\" /></a>";
|
||||
src=\"$CFG->pixpath/t/down.gif\" border=\"0\" alt=\"$strmovedown\" /></a>";
|
||||
|
||||
echo "<a title=\"$strremove\" href=\"edit.php?delete=$count&sesskey=$USER->sesskey\">
|
||||
<img src=\"../../pix/t/delete.gif\" border=\"0\" alt=\"$strremove\" /></a>";
|
||||
<img src=\"$CFG->pixpath/t/delete.gif\" border=\"0\" alt=\"$strremove\" /></a>";
|
||||
}
|
||||
echo '</td></tr></table></td>';
|
||||
echo '<td colspan="2"> </td></tr>';
|
||||
@@ -261,13 +261,13 @@ function quiz_print_question_list($quiz, $allowdelete=true, $showbreaks=true) {
|
||||
echo "<td>";
|
||||
if ($count != 0) {
|
||||
echo "<a title=\"$strmoveup\" href=\"edit.php?up=$count&sesskey=$USER->sesskey\"><img
|
||||
src=\"../../pix/t/up.gif\" border=\"0\" alt=\"$strmoveup\" /></a>";
|
||||
src=\"$CFG->pixpath/t/up.gif\" border=\"0\" alt=\"$strmoveup\" /></a>";
|
||||
}
|
||||
echo "</td>";
|
||||
echo "<td>";
|
||||
if ($count < $lastindex-1) {
|
||||
echo "<a title=\"$strmovedown\" href=\"edit.php?down=$count&sesskey=$USER->sesskey\"><img
|
||||
src=\"../../pix/t/down.gif\" border=\"0\" alt=\"$strmovedown\" /></a>";
|
||||
src=\"$CFG->pixpath/t/down.gif\" border=\"0\" alt=\"$strmovedown\" /></a>";
|
||||
}
|
||||
echo "</td>";
|
||||
|
||||
@@ -295,14 +295,14 @@ function quiz_print_question_list($quiz, $allowdelete=true, $showbreaks=true) {
|
||||
$context = $quiz->id ? '&contextquiz='.$quiz->id : '';
|
||||
$quiz_id = $quiz->id ? '&quizid=' . $quiz->id : '';
|
||||
echo "<a title=\"$strpreview\" href=\"javascript:void();\" onClick=\"openpopup('/mod/quiz/preview.php?id=$qnum$quiz_id','$strpreview','scrollbars=yes,resizable=yes,width=700,height=480', false)\">
|
||||
<img src=\"../../pix/t/preview.gif\" border=\"0\" alt=\"$strpreview\" /></a>";
|
||||
<img src=\"$CFG->pixpath/t/preview.gif\" border=\"0\" alt=\"$strpreview\" /></a>";
|
||||
if ($canedit) {
|
||||
echo "<a title=\"$stredit\" href=\"question.php?id=$qnum$context\">
|
||||
<img src=\"../../pix/t/edit.gif\" border=\"0\" alt=\"$stredit\" /></a>";
|
||||
<img src=\"$CFG->pixpath/t/edit.gif\" border=\"0\" alt=\"$stredit\" /></a>";
|
||||
}
|
||||
if ($allowdelete) {
|
||||
echo "<a title=\"$strremove\" href=\"edit.php?delete=$count&sesskey=$USER->sesskey\">
|
||||
<img src=\"../../pix/t/removeright.gif\" border=\"0\" alt=\"$strremove\" /></a>";
|
||||
<img src=\"$CFG->pixpath/t/removeright.gif\" border=\"0\" alt=\"$strremove\" /></a>";
|
||||
}
|
||||
|
||||
echo "</td>";
|
||||
@@ -439,7 +439,7 @@ function quiz_print_category_form($course, $current, $recurse=1, $showhidden=fal
|
||||
*/
|
||||
function quiz_print_cat_question_list($course, $categoryid, $quizid,
|
||||
$recurse=1, $page, $perpage, $showhidden=false, $sortorder='qtype, name ASC') {
|
||||
global $QUIZ_QUESTION_TYPE, $USER;
|
||||
global $QUIZ_QUESTION_TYPE, $USER, $CFG;
|
||||
|
||||
$strcategory = get_string("category", "quiz");
|
||||
$strquestion = get_string("question", "quiz");
|
||||
@@ -566,20 +566,20 @@ function quiz_print_cat_question_list($course, $categoryid, $quizid,
|
||||
echo "<tr>\n<td>\n";
|
||||
if ($quizid) {
|
||||
echo "<a title=\"$straddtoquiz\" href=\"edit.php?addquestion=$question->id&sesskey=$USER->sesskey\"><img
|
||||
src=\"../../pix/t/moveleft.gif\" border=\"0\" alt=\"$straddtoquiz\" /></a> ";
|
||||
src=\"$CFG->pixpath/t/moveleft.gif\" border=\"0\" alt=\"$straddtoquiz\" /></a> ";
|
||||
}
|
||||
echo "<a title=\"$strpreview\" href=\"javascript:void();\" onClick=\"openpopup('/mod/quiz/preview.php?id=$question->id&quizid=$quizid','$strpreview','scrollbars=yes,resizable=yes,width=700,height=480', false)\"><img
|
||||
src=\"../../pix/t/preview.gif\" border=\"0\" alt=\"$strpreview\" /></a> ";
|
||||
src=\"$CFG->pixpath/t/preview.gif\" border=\"0\" alt=\"$strpreview\" /></a> ";
|
||||
if ($canedit) {
|
||||
echo "<a title=\"$stredit\" href=\"question.php?id=$question->id\"><img
|
||||
src=\"../../pix/t/edit.gif\" border=\"0\" alt=\"$stredit\" /></a> ";
|
||||
src=\"$CFG->pixpath/t/edit.gif\" border=\"0\" alt=\"$stredit\" /></a> ";
|
||||
// hide-feature
|
||||
if($question->hidden) {
|
||||
echo "<a title=\"$strrestore\" href=\"question.php?id=$question->id&hide=0&sesskey=$USER->sesskey\"><img
|
||||
src=\"../../pix/t/restore.gif\" border=\"0\" alt=\"$strrestore\" /></a>";
|
||||
src=\"$CFG->pixpath/t/restore.gif\" border=\"0\" alt=\"$strrestore\" /></a>";
|
||||
} else {
|
||||
echo "<a title=\"$strdelete\" href=\"question.php?id=$question->id&delete=$question->id\"><img
|
||||
src=\"../../pix/t/delete.gif\" border=\"0\" alt=\"$strdelete\" /></a>";
|
||||
src=\"$CFG->pixpath/t/delete.gif\" border=\"0\" alt=\"$strdelete\" /></a>";
|
||||
}
|
||||
}
|
||||
echo " <input title=\"$strselect\" type=\"checkbox\" name=\"q$question->id\" value=\"1\" />";
|
||||
|
||||
@@ -1812,12 +1812,13 @@ function quiz_print_question_icon($question, $editlink=true, $return = false) {
|
||||
// ULPGc ecastro
|
||||
function quiz_get_question_review($quiz, $question) {
|
||||
// returns a question icon
|
||||
global $CFG;
|
||||
$qnum = $question->id;
|
||||
$strpreview = get_string('previewquestion', 'quiz');
|
||||
$context = $quiz->id ? '&contextquiz='.$quiz->id : '';
|
||||
$quiz_id = $quiz->id ? '&quizid=' . $quiz->id : '';
|
||||
return "<a title=\"$strpreview\" href=\"javascript:void();\" onClick=\"openpopup('/mod/quiz/preview.php?id=$qnum$quiz_id','$strpreview','scrollbars=yes,resizable=yes,width=700,height=480', false)\">
|
||||
<img src=\"../../pix/t/preview.gif\" border=\"0\" alt=\"$strpreview\" /></a>";
|
||||
<img src=\"$CFG->pixpath/t/preview.gif\" border=\"0\" alt=\"$strpreview\" /></a>";
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
delete_records('quiz_rqp_types', 'id', $type->id);
|
||||
} else {
|
||||
foreach ($servers as $server) {
|
||||
$actions = '<a title="' . $strinfo . '" href="types.php?info='.$server->id.'&sesskey='.sesskey().'"><img src="../../../../pix/i/info.gif" border="0" alt="'.$strinfo.'" align="absbottom" /></a> <a title="'.$strdelete.'" href="types.php?delete='.$server->id.'&sesskey='.sesskey().'"><img src="../../../../pix/t/delete.gif" border="0" alt="'.$strdelete.'" /></a>';
|
||||
$actions = '<a title="' . $strinfo . '" href="types.php?info='.$server->id.'&sesskey='.sesskey().'"><img src="'.$CFG->pixpath.'/i/info.gif" border="0" alt="'.$strinfo.'" align="absbottom" /></a> <a title="'.$strdelete.'" href="types.php?delete='.$server->id.'&sesskey='.sesskey().'"><img src="../../../../pix/t/delete.gif" border="0" alt="'.$strdelete.'" /></a>';
|
||||
$serverurl = ($info == $server->id) ? '<b>'.$server->url.'</b>' : $server->url;
|
||||
$table->add_data(array($type->name, $serverurl, $actions));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user