mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Removed $THEMEs and stuff.
I'm a little worried about this spaghetti code ... it's a mess!
This commit is contained in:
parent
d1b7d61e74
commit
fafd89a0f1
5 changed files with 20 additions and 28 deletions
|
@ -90,7 +90,7 @@
|
||||||
|
|
||||||
print_heading_with_help($strimportquestions, "import", "lesson");
|
print_heading_with_help($strimportquestions, "import", "lesson");
|
||||||
|
|
||||||
print_simple_box_start("center", "", "$THEME->cellheading");
|
print_simple_box_start("center");
|
||||||
echo "<form enctype=\"multipart/form-data\" method=\"post\" action=import.php>";
|
echo "<form enctype=\"multipart/form-data\" method=\"post\" action=import.php>";
|
||||||
echo "<input type=\"hidden\" name=\"id\" value=\"$cm->id\">\n";
|
echo "<input type=\"hidden\" name=\"id\" value=\"$cm->id\">\n";
|
||||||
echo "<input type=\"hidden\" name=\"pageid\" value=\"$pageid\">\n";
|
echo "<input type=\"hidden\" name=\"pageid\" value=\"$pageid\">\n";
|
||||||
|
|
|
@ -624,9 +624,9 @@
|
||||||
echo "<input type=\"hidden\" name=\"id\" value=\"$cm->id\">\n";
|
echo "<input type=\"hidden\" name=\"id\" value=\"$cm->id\">\n";
|
||||||
echo "<input type=\"hidden\" name=\"action\" value=\"navigation\">\n";
|
echo "<input type=\"hidden\" name=\"action\" value=\"navigation\">\n";
|
||||||
echo "<input type=\"hidden\" name=\"pageid\">\n";
|
echo "<input type=\"hidden\" name=\"pageid\">\n";
|
||||||
echo "<table bgcolor=\"$THEME->cellheading\" width=\"140px\">";
|
echo "<table class=\"lessonside\" width=\"140px\">";
|
||||||
echo "<tr><td>".get_string("lessonmenu", "lesson")."</td></tr>";
|
echo "<tr><td>".get_string("lessonmenu", "lesson")."</td></tr>";
|
||||||
echo "<tr><td class='main'>";
|
echo '<tr><td class="lessonmain">';
|
||||||
echo "<a href=\"../../course/view.php?id=$course->id\">".get_string("mainmenu", "lesson")."</a></td></tr>";
|
echo "<a href=\"../../course/view.php?id=$course->id\">".get_string("mainmenu", "lesson")."</a></td></tr>";
|
||||||
echo "<td class=\"leftmenu\">";
|
echo "<td class=\"leftmenu\">";
|
||||||
lesson_print_tree_menu($lesson->id, $firstpageid, $cm->id);
|
lesson_print_tree_menu($lesson->id, $firstpageid, $cm->id);
|
||||||
|
@ -2138,7 +2138,7 @@
|
||||||
if (!$title = trim($page->title)) {
|
if (!$title = trim($page->title)) {
|
||||||
$title = "<< ".get_string("notitle", "lesson")." >>";
|
$title = "<< ".get_string("notitle", "lesson")." >>";
|
||||||
}
|
}
|
||||||
echo "<tr><td bgcolor=\"$THEME->cellheading2\"><b>$title</b></td></tr>\n";
|
echo "<tr><td><b>$title</b></td></tr>\n";
|
||||||
echo "<tr><td><a href=\"lesson.php?id=$cm->id&sesskey=".$USER->sesskey."&action=moveit&pageid=$pageid&after={$page->id}\"><small>".
|
echo "<tr><td><a href=\"lesson.php?id=$cm->id&sesskey=".$USER->sesskey."&action=moveit&pageid=$pageid&after={$page->id}\"><small>".
|
||||||
get_string("movepagehere", "lesson")."</small></a></td></tr>\n";
|
get_string("movepagehere", "lesson")."</small></a></td></tr>\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -799,13 +799,13 @@
|
||||||
foreach ($answerpages as $page) {
|
foreach ($answerpages as $page) {
|
||||||
unset($table->data);
|
unset($table->data);
|
||||||
if ($page->grayout) { // set the color of text
|
if ($page->grayout) { // set the color of text
|
||||||
$fontstart = "<font color=\"#AAAAAA\">";
|
$fontstart = "<span class=\"dimmed\">";
|
||||||
$fontend = "</font>";
|
$fontend = "</font>";
|
||||||
$fontstart2 = $fontstart;
|
$fontstart2 = $fontstart;
|
||||||
$fontend2 = $fontend;
|
$fontend2 = $fontend;
|
||||||
} else {
|
} else {
|
||||||
$fontstart = "<font color=\"$THEME->cellheading2\">";
|
$fontstart = "";
|
||||||
$fontend = "</font>";
|
$fontend = "";
|
||||||
$fontstart2 = "";
|
$fontstart2 = "";
|
||||||
$fontend2 = "";
|
$fontend2 = "";
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,13 +9,10 @@ img {
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
background-image: url(<?PHP echo "$themeurl"?>/footer.jpg);
|
|
||||||
color: <?PHP echo $THEME->body?>;
|
|
||||||
padding-top:40px; margin-top:40px;
|
padding-top:40px; margin-top:40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer a:link, .footer v:link, .footer a:visited {
|
.footer a:link, .footer v:link, .footer a:visited {
|
||||||
color: <?PHP echo $THEME->body?>;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.leftmenu a:link, .leftmenu a:active, .leftmenu a:visited, .leftmenu1 a:link, .leftmenu1 a:active, .leftmenu1 a:visited{
|
.leftmenu a:link, .leftmenu a:active, .leftmenu a:visited, .leftmenu1 a:link, .leftmenu1 a:active, .leftmenu1 a:visited{
|
||||||
|
|
|
@ -100,11 +100,6 @@
|
||||||
// set up some general variables
|
// set up some general variables
|
||||||
$usehtmleditor = can_use_html_editor();
|
$usehtmleditor = can_use_html_editor();
|
||||||
$path = $CFG->wwwroot .'/course';
|
$path = $CFG->wwwroot .'/course';
|
||||||
if (empty($THEME->custompix)) {
|
|
||||||
$pixpath = $path .'/../pix';
|
|
||||||
} else {
|
|
||||||
$pixpath = $path .'/../theme/'. $CFG->theme .'/pix';
|
|
||||||
}
|
|
||||||
|
|
||||||
/************** navigation **************************************/
|
/************** navigation **************************************/
|
||||||
if ($action == 'navigation') {
|
if ($action == 'navigation') {
|
||||||
|
@ -343,7 +338,7 @@
|
||||||
echo '<input type="hidden" name="id" value="'. $cm->id .'" />';
|
echo '<input type="hidden" name="id" value="'. $cm->id .'" />';
|
||||||
echo '<input type="hidden" name="action" value="navigation" />';
|
echo '<input type="hidden" name="action" value="navigation" />';
|
||||||
echo '<input type="hidden" name="pageid" />';
|
echo '<input type="hidden" name="pageid" />';
|
||||||
echo "<table bgcolor=\"$THEME->cellheading\" width=\"140px\">";
|
echo "<table width=\"140px\">";
|
||||||
echo "<tr><td>".get_string('lessonmenu', 'lesson') .'</td></tr>';
|
echo "<tr><td>".get_string('lessonmenu', 'lesson') .'</td></tr>';
|
||||||
echo "<tr><td class=\"main\">";
|
echo "<tr><td class=\"main\">";
|
||||||
echo "<a href=\"../../course/view.php?id=$course->id\">".get_string("mainmenu", "lesson")."</a></td></tr>";
|
echo "<a href=\"../../course/view.php?id=$course->id\">".get_string("mainmenu", "lesson")."</a></td></tr>";
|
||||||
|
@ -1175,7 +1170,7 @@
|
||||||
echo get_string("treeview", "lesson")."<br /><br />";
|
echo get_string("treeview", "lesson")."<br /><br />";
|
||||||
echo "<a href=\"view.php?id=$id&viewAll=1\">".get_string("viewallpages", "lesson")."</a><br /><br />\n";
|
echo "<a href=\"view.php?id=$id&viewAll=1\">".get_string("viewallpages", "lesson")."</a><br /><br />\n";
|
||||||
echo "<table><tr><td>";
|
echo "<table><tr><td>";
|
||||||
lesson_print_tree($page->id, $lesson->id, $cm->id, $pixpath);
|
lesson_print_tree($page->id, $lesson->id, $cm->id, $CFG->pixpath);
|
||||||
echo "</td></tr></table>";
|
echo "</td></tr></table>";
|
||||||
echo "<br /><a href=\"view.php?id=$id&viewAll=1\">".get_string("viewallpages", "lesson")."</a>\n";
|
echo "<br /><a href=\"view.php?id=$id&viewAll=1\">".get_string("viewallpages", "lesson")."</a>\n";
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
|
@ -1241,24 +1236,24 @@
|
||||||
/// CDC-FLAG /// end tree code (note, there is an "}" below for an else above)
|
/// CDC-FLAG /// end tree code (note, there is an "}" below for an else above)
|
||||||
while (true) {
|
while (true) {
|
||||||
echo "<tr><td>\n";
|
echo "<tr><td>\n";
|
||||||
echo "<table width=\"100%\" border=\"1\"><tr><td bgcolor=\"$THEME->cellheading2\" colspan=\"2\"><b>$page->title</b> \n";
|
echo "<table width=\"100%\" border=\"1\"><tr><th colspan=\"2\">$page->title \n";
|
||||||
if (isteacheredit($course->id)) {
|
if (isteacheredit($course->id)) {
|
||||||
if ($npages > 1) {
|
if ($npages > 1) {
|
||||||
echo "<a title=\"".get_string("move")."\" href=\"lesson.php?id=$cm->id&action=move&pageid=$page->id\">\n".
|
echo "<a title=\"".get_string("move")."\" href=\"lesson.php?id=$cm->id&action=move&pageid=$page->id\">\n".
|
||||||
"<img src=\"$pixpath/t/move.gif\" hspace=\"2\" height=\"11\" width=\"11\" border=\"0\" alt=\"move\" /></a>\n";
|
"<img src=\"$CFG->pixpath/t/move.gif\" hspace=\"2\" height=\"11\" width=\"11\" border=\"0\" alt=\"move\" /></a>\n";
|
||||||
}
|
}
|
||||||
echo "<a title=\"".get_string("update")."\" href=\"lesson.php?id=$cm->id&action=editpage&pageid=$page->id\">\n".
|
echo "<a title=\"".get_string("update")."\" href=\"lesson.php?id=$cm->id&action=editpage&pageid=$page->id\">\n".
|
||||||
"<img src=\"$pixpath/t/edit.gif\" hspace=\"2\" height=\"11\" width=\"11\" border=\"0\" alt=\"edit\" /></a>\n".
|
"<img src=\"$CFG->pixpath/t/edit.gif\" hspace=\"2\" height=\"11\" width=\"11\" border=\"0\" alt=\"edit\" /></a>\n".
|
||||||
"<a title=\"".get_string("delete")."\" href=\"lesson.php?id=$cm->id&sesskey=".$USER->sesskey."&action=confirmdelete&pageid=$page->id\">\n".
|
"<a title=\"".get_string("delete")."\" href=\"lesson.php?id=$cm->id&sesskey=".$USER->sesskey."&action=confirmdelete&pageid=$page->id\">\n".
|
||||||
"<img src=\"$pixpath/t/delete.gif\" hspace=\"2\" height=\"11\" width=\"11\" border=\"0\" alt=\"delete\" /></a>\n";
|
"<img src=\"$CFG->pixpath/t/delete.gif\" hspace=\"2\" height=\"11\" width=\"11\" border=\"0\" alt=\"delete\" /></a>\n";
|
||||||
}
|
}
|
||||||
echo "</td></tr>\n";
|
echo "</th></tr>\n";
|
||||||
echo "<tr><td colspan=\"2\">\n";
|
echo "<tr><td colspan=\"2\">\n";
|
||||||
print_simple_box(format_text($page->contents), "center");
|
print_simple_box(format_text($page->contents), "center");
|
||||||
echo "</td></tr>\n";
|
echo "</td></tr>\n";
|
||||||
// get the answers in a set order, the id order
|
// get the answers in a set order, the id order
|
||||||
if ($answers = get_records("lesson_answers", "pageid", $page->id, "id")) {
|
if ($answers = get_records("lesson_answers", "pageid", $page->id, "id")) {
|
||||||
echo "<tr><td bgcolor=\"$THEME->cellheading2\" colspan=\"2\" align=\"center\"><b>\n";
|
echo "<tr><td colspan=\"2\" align=\"center\"><b>\n";
|
||||||
switch ($page->qtype) {
|
switch ($page->qtype) {
|
||||||
case LESSON_ESSAY : /// CDC-FLAG /// 6/16/04 this line and the next
|
case LESSON_ESSAY : /// CDC-FLAG /// 6/16/04 this line and the next
|
||||||
echo $LESSON_QUESTION_TYPE[$page->qtype];
|
echo $LESSON_QUESTION_TYPE[$page->qtype];
|
||||||
|
@ -1299,7 +1294,7 @@
|
||||||
case LESSON_TRUEFALSE:
|
case LESSON_TRUEFALSE:
|
||||||
case LESSON_SHORTANSWER:
|
case LESSON_SHORTANSWER:
|
||||||
case LESSON_NUMERICAL:
|
case LESSON_NUMERICAL:
|
||||||
echo "<tr><td bgcolor=\"$THEME->cellheading2\" align=\"right\" valign=\"top\" width=\"20%\">\n";
|
echo "<tr><td align=\"right\" valign=\"top\" width=\"20%\">\n";
|
||||||
/// CDC-FLAG /// 6/11/04
|
/// CDC-FLAG /// 6/11/04
|
||||||
if ($lesson->custom) {
|
if ($lesson->custom) {
|
||||||
// if the score is > 0, then it is correct
|
// if the score is > 0, then it is correct
|
||||||
|
@ -1343,7 +1338,7 @@
|
||||||
$n++;
|
$n++;
|
||||||
$i--;
|
$i--;
|
||||||
} else {
|
} else {
|
||||||
echo "<tr><td bgcolor=\"$THEME->cellheading2\" align=\"right\" valign=\"top\" width=\"20%\">\n";
|
echo "<tr><td align=\"right\" valign=\"top\" width=\"20%\">\n";
|
||||||
if ($lesson->custom) {
|
if ($lesson->custom) {
|
||||||
// if the score is > 0, then it is correct
|
// if the score is > 0, then it is correct
|
||||||
if ($answer->score > 0) {
|
if ($answer->score > 0) {
|
||||||
|
@ -1427,7 +1422,7 @@
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
// print_simple_box_end(); /// CDC-FLAG /// not sure if i commented this out... hehe
|
// print_simple_box_end(); /// CDC-FLAG /// not sure if i commented this out... hehe
|
||||||
echo "<tr><td bgcolor=\"$THEME->cellheading2\" colspan=\"2\" align=\"center\">";
|
echo "<tr><td colspan=\"2\" align=\"center\">";
|
||||||
if ($page->qtype != LESSON_ENDOFBRANCH) {
|
if ($page->qtype != LESSON_ENDOFBRANCH) {
|
||||||
echo "<input type=\"button\" value=\"";
|
echo "<input type=\"button\" value=\"";
|
||||||
if ($page->qtype == LESSON_BRANCHTABLE) {
|
if ($page->qtype == LESSON_BRANCHTABLE) {
|
||||||
|
@ -1821,7 +1816,7 @@
|
||||||
krsort($topscores);
|
krsort($topscores);
|
||||||
|
|
||||||
echo "<table cellspacing=\"10px\">";
|
echo "<table cellspacing=\"10px\">";
|
||||||
echo "<tr align=\"center\" bgcolor=\"$THEME->cellheading2\"><td>".get_string("rank", "lesson")."</td><td>$course->students</td><td>".get_string("scores", "lesson")."</td></tr>";
|
echo "<tr align=\"center\"><td>".get_string("rank", "lesson")."</td><td>$course->students</td><td>".get_string("scores", "lesson")."</td></tr>";
|
||||||
$printed = 0;
|
$printed = 0;
|
||||||
while (true) {
|
while (true) {
|
||||||
$temp = current($topscores);
|
$temp = current($topscores);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue