MDL-19812 Upgraded calls to helpbutton, print_simple_box* and notify
This commit is contained in:
@@ -70,7 +70,7 @@
|
||||
// answer 1 jumpto next page
|
||||
echo $OUTPUT->select(html_select::make($jump, "jumpto[$i]", LESSON_NEXTPAGE, false));
|
||||
}
|
||||
helpbutton("jumpto", get_string("jump", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("jumpto", get_string("jump", "lesson"), "lesson"));
|
||||
echo "</td></tr>\n";
|
||||
}
|
||||
// close table and form
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<input type="hidden" name="sesskey" value="<?php echo sesskey() ?>" />
|
||||
<?php
|
||||
echo '<b>'.get_string("questiontype", "lesson").":</b> \n";
|
||||
echo helpbutton("questiontypes", get_string("questiontype", "lesson"), "lesson")."<br />";
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("questiontypes", get_string("questiontype", "lesson"), "lesson"))."<br />";
|
||||
lesson_qtype_menu($LESSON_QUESTION_TYPE, $qtype,
|
||||
"lesson.php?id=$cm->id&action=addpage&pageid=".$pageid.$linkadd);
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
$qoptionstr = get_string('multianswer', 'lesson');
|
||||
}
|
||||
echo "<label for=\"qoption\"><strong>$qoptionstr</strong></label><input type=\"checkbox\" id=\"qoption\" name=\"qoption\" value=\"1\"/>";
|
||||
helpbutton("questionoption", get_string("questionoption", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("questionoption", get_string("questionoption", "lesson"), "lesson"));
|
||||
echo '</p>';
|
||||
}
|
||||
?>
|
||||
@@ -95,7 +95,7 @@
|
||||
// answer 1 jumpto next page
|
||||
echo $OUTPUT->select(html_select::make($jump, "jumpto[$i]", LESSON_NEXTPAGE, false));
|
||||
}
|
||||
helpbutton("jumpto", get_string("jump", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("jumpto", get_string("jump", "lesson"), "lesson"));
|
||||
if($lesson->custom) {
|
||||
if ($i) {
|
||||
echo get_string("score", "lesson")." $iplus1: <input type=\"text\" name=\"score[$i]\" value=\"0\" size=\"5\" />";
|
||||
@@ -109,7 +109,7 @@
|
||||
case LESSON_ESSAY :
|
||||
echo "<tr><td><b>".get_string("jump", "lesson").":</b> \n";
|
||||
echo $OUTPUT->select(html_select::make($jump, "jumpto[0]", LESSON_NEXTPAGE, false));
|
||||
helpbutton("jumpto", get_string("jump", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("jumpto", get_string("jump", "lesson"), "lesson"));
|
||||
if ($lesson->custom) {
|
||||
echo get_string("score", "lesson").": <input type=\"text\" name=\"score[0]\" value=\"1\" size=\"5\" />";
|
||||
}
|
||||
@@ -137,7 +137,7 @@
|
||||
if ($i == 2) {
|
||||
echo "<tr><td><b>".get_string("correctanswerjump", "lesson").":</b> \n";
|
||||
echo $OUTPUT->select(html_select::make($jump, "jumpto[$i]", LESSON_NEXTPAGE, false));
|
||||
helpbutton("jumpto", get_string("jump", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("jumpto", get_string("jump", "lesson"), "lesson"));
|
||||
if($lesson->custom) {
|
||||
echo get_string("correctanswerscore", "lesson").": <input type=\"text\" name=\"score[$i]\" value=\"1\" size=\"5\" />";
|
||||
}
|
||||
@@ -145,7 +145,7 @@
|
||||
} elseif ($i == 3) {
|
||||
echo "<tr><td><b>".get_string("wronganswerjump", "lesson").":</b> \n";
|
||||
echo $OUTPUT->select(html_select::make($jump, "jumpto[$i]", 0, false));
|
||||
helpbutton("jumpto", get_string("jump", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("jumpto", get_string("jump", "lesson"), "lesson"));
|
||||
if($lesson->custom) {
|
||||
echo get_string("wronganswerscore", "lesson").": <input type=\"text\" name=\"score[$i]\" value=\"0\" size=\"5\" />";
|
||||
}
|
||||
@@ -173,7 +173,7 @@
|
||||
// answer 1 jumpto next page
|
||||
echo $OUTPUT->select(html_select::make($jump, "jumpto[$i]", LESSON_NEXTPAGE, false));
|
||||
}
|
||||
helpbutton("jumpto", get_string("jump", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("jumpto", get_string("jump", "lesson"), "lesson"));
|
||||
if($lesson->custom) {
|
||||
if ($i) {
|
||||
echo get_string("score", "lesson")." $iplus1: <input type=\"text\" name=\"score[$i]\" value=\"0\" size=\"5\" />";
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
switch ($page->qtype) {
|
||||
case LESSON_MULTICHOICE :
|
||||
echo '<b>'.get_string("questiontype", "lesson").":</b> \n";
|
||||
echo helpbutton("questiontypes", get_string("questiontype", "lesson"), "lesson")."<br />";
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("questiontypes", get_string("questiontype", "lesson"), "lesson"))."<br />";
|
||||
lesson_qtype_menu($LESSON_QUESTION_TYPE, $page->qtype,
|
||||
"lesson.php?id=$cm->id&action=editpage&pageid=$page->id",
|
||||
"getElementById('editpage').redisplay.value=1;getElementById('editpage').submit();");
|
||||
@@ -76,12 +76,12 @@
|
||||
} else {
|
||||
echo "<input type=\"checkbox\" id=\"qoption\" name=\"qoption\" value=\"1\" />";
|
||||
}
|
||||
helpbutton("questionoption", get_string("questionoption", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("questionoption", get_string("questionoption", "lesson"), "lesson"));
|
||||
echo "</p>\n";
|
||||
break;
|
||||
case LESSON_SHORTANSWER :
|
||||
echo '<b>'.get_string("questiontype", "lesson").":</b> \n";
|
||||
echo helpbutton("questiontypes", get_string("questiontype", "lesson"), "lesson")."<br />";
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("questiontypes", get_string("questiontype", "lesson"), "lesson"))."<br />";
|
||||
lesson_qtype_menu($LESSON_QUESTION_TYPE, $page->qtype,
|
||||
"lesson.php?id=$cm->id&action=editpage&pageid=$page->id",
|
||||
"getElementById('editpage').redisplay.value=1;getElementById('editpage').submit();");
|
||||
@@ -91,7 +91,7 @@
|
||||
} else {
|
||||
echo "<input type=\"checkbox\" id=\"qoption\" name=\"qoption\" value=\"1\" />";
|
||||
}
|
||||
helpbutton("questionoption", get_string("questionoption", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("questionoption", get_string("questionoption", "lesson"), "lesson"));
|
||||
echo "</p>\n";
|
||||
break;
|
||||
case LESSON_TRUEFALSE :
|
||||
@@ -99,7 +99,7 @@
|
||||
case LESSON_MATCHING :
|
||||
case LESSON_NUMERICAL :
|
||||
echo '<b>'.get_string("questiontype", "lesson").":</b> \n";
|
||||
echo helpbutton("questiontypes", get_string("questiontype", "lesson"), "lesson")."<br />";
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("questiontypes", get_string("questiontype", "lesson"), "lesson"))."<br />";
|
||||
lesson_qtype_menu($LESSON_QUESTION_TYPE, $page->qtype,
|
||||
"lesson.php?id=$cm->id&action=editpage&pageid=$page->id",
|
||||
"getElementById('editpage').redisplay.value=1;getElementById('editpage').submit();");
|
||||
@@ -170,13 +170,13 @@
|
||||
if ($flags & LESSON_ANSWER_EDITOR) {
|
||||
echo " [<label for=\"answereditor[$n]\">".get_string("useeditor", "lesson")."</label>: ".
|
||||
"<input type=\"checkbox\" id=\"answereditor[$n]\" name=\"answereditor[$n]\" value=\"1\" checked=\"checked\" />";
|
||||
helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("useeditor", get_string("useeditor", "lesson"), "lesson"));
|
||||
echo "]<br />\n";
|
||||
print_textarea($usehtmleditor, 20, 70, 630, 300, "answer[$n]", $answer->answer);
|
||||
} else {
|
||||
echo " [<label for=\"answereditor[$n]\">".get_string("useeditor", "lesson")."</label>: ".
|
||||
"<input type=\"checkbox\" id=\"answereditor[$n]\" name=\"answereditor[$n]\" value=\"1\" />";
|
||||
helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("useeditor", get_string("useeditor", "lesson"), "lesson"));
|
||||
echo "]<br />\n";
|
||||
print_textarea(false, 6, 70, 630, 300, "answer[$n]", $answer->answer);
|
||||
}
|
||||
@@ -185,13 +185,13 @@
|
||||
if ($flags & LESSON_ANSWER_EDITOR) {
|
||||
echo " [<label for=\"answereditor[$n]\">".get_string("useeditor", "lesson")."</label>: ".
|
||||
"<input type=\"checkbox\" id=\"answereditor[$n]\" name=\"answereditor[$n]\" value=\"1\" checked=\"checked\" />";
|
||||
helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("useeditor", get_string("useeditor", "lesson"), "lesson"));
|
||||
echo "]<br />\n";
|
||||
print_textarea($usehtmleditor, 20, 70, 630, 300, "answer[$n]", $answer->answer);
|
||||
} else {
|
||||
echo " [<label for=\"answereditor[$n]\">".get_string("useeditor", "lesson")."</label>: ".
|
||||
"<input type=\"checkbox\" id=\"answereditor[$n]\" name=\"answereditor[$n]\" value=\"1\" />";
|
||||
helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("useeditor", get_string("useeditor", "lesson"), "lesson"));
|
||||
echo "]<br />\n";
|
||||
print_textarea(false, 6, 70, 630, 300, "answer[$n]", $answer->answer);
|
||||
}
|
||||
@@ -201,13 +201,13 @@
|
||||
if ($flags & LESSON_ANSWER_EDITOR) {
|
||||
echo " [<label for=\"answereditor[$n]\">".get_string("useeditor", "lesson")."</label>: ".
|
||||
"<input type=\"checkbox\" id=\"answereditor[$n]\" name=\"answereditor[$n]\" value=\"1\" checked=\"checked\" />";
|
||||
helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("useeditor", get_string("useeditor", "lesson"), "lesson"));
|
||||
echo "]<br />\n";
|
||||
print_textarea($usehtmleditor, 20, 70, 630, 300, "answer[$n]", $answer->answer);
|
||||
} else {
|
||||
echo " [<label for=\"answereditor[$n]\">".get_string("useeditor", "lesson")."</label>: ".
|
||||
"<input type=\"checkbox\" id=\"answereditor[$n]\" name=\"answereditor[$n]\" value=\"1\" />";
|
||||
helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("useeditor", get_string("useeditor", "lesson"), "lesson"));
|
||||
echo "]<br />\n";
|
||||
print_textarea(false, 6, 70, 630, 300, "answer[$n]", $answer->answer);
|
||||
}
|
||||
@@ -216,13 +216,13 @@
|
||||
if ($flags & LESSON_RESPONSE_EDITOR) {
|
||||
echo " [<label for=\"responseeditor[$n]\">".get_string("useeditor", "lesson")."</label>: ".
|
||||
"<input type=\"checkbox\" id=\"responseeditor[$n]\" name=\"responseeditor[$n]\" value=\"1\" checked=\"checked\" />";
|
||||
helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("useeditor", get_string("useeditor", "lesson"), "lesson"));
|
||||
echo "]<br />\n";
|
||||
print_textarea($usehtmleditor, 20, 70, 630, 300, "response[$n]", $answer->response);
|
||||
} else {
|
||||
echo " [<label for=\"responseeditor[$n]\">".get_string("useeditor", "lesson")."</label>: ".
|
||||
"<input type=\"checkbox\" id=\"responseeditor[$n]\" name=\"responseeditor[$n]\" value=\"1\" />";
|
||||
helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("useeditor", get_string("useeditor", "lesson"), "lesson"));
|
||||
echo "]<br />\n";
|
||||
print_textarea(false, 6, 70, 630, 300, "response[$n]", $answer->response);
|
||||
}
|
||||
@@ -237,14 +237,14 @@
|
||||
if ($flags & LESSON_ANSWER_EDITOR and $page->qtype != LESSON_SHORTANSWER and $page->qtype != LESSON_NUMERICAL) {
|
||||
echo " [<label for=\"answereditor[$n]\">".get_string("useeditor", "lesson")."</label>: ".
|
||||
"<input type=\"checkbox\" id=\"answereditor[$n]\" name=\"answereditor[$n]\" value=\"1\" checked=\"checked\" />";
|
||||
helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("useeditor", get_string("useeditor", "lesson"), "lesson"));
|
||||
echo "]<br />\n";
|
||||
print_textarea($usehtmleditor, 20, 70, 630, 300, "answer[$n]", $answer->answer);
|
||||
} else {
|
||||
if ($page->qtype != LESSON_SHORTANSWER and $page->qtype != LESSON_NUMERICAL) {
|
||||
echo " [<label for=\"answereditor[$n]\">".get_string("useeditor", "lesson")."</label>: ".
|
||||
"<input type=\"checkbox\" id=\"answereditor[$n]\" name=\"answereditor[$n]\" value=\"1\" />";
|
||||
helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("useeditor", get_string("useeditor", "lesson"), "lesson"));
|
||||
echo "]<br />\n";
|
||||
print_textarea(false, 6, 70, 630, 300, "answer[$n]", $answer->answer);
|
||||
} else {
|
||||
@@ -257,13 +257,13 @@
|
||||
if ($flags & LESSON_RESPONSE_EDITOR) {
|
||||
echo " [<label for=\"responseeditor[$n]\">".get_string("useeditor", "lesson")."</label>: ".
|
||||
"<input type=\"checkbox\" id=\"responseeditor[$n]\" name=\"responseeditor[$n]\" value=\"1\" checked=\"checked\" />";
|
||||
helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("useeditor", get_string("useeditor", "lesson"), "lesson"));
|
||||
echo "]<br />\n";
|
||||
print_textarea($usehtmleditor, 20, 70, 630, 300, "response[$n]", $answer->response);
|
||||
} else {
|
||||
echo " [<label for=\"responseeditor[$n]\">".get_string("useeditor", "lesson")."</label>: ".
|
||||
"<input type=\"checkbox\" id=\"responseeditor[$n]\" name=\"responseeditor[$n]\" value=\"1\" />";
|
||||
helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("useeditor", get_string("useeditor", "lesson"), "lesson"));
|
||||
echo "]<br />\n";
|
||||
print_textarea(false, 6, 70, 630, 300, "response[$n]", $answer->response);
|
||||
}
|
||||
@@ -274,13 +274,13 @@
|
||||
if ($flags & LESSON_ANSWER_EDITOR) {
|
||||
echo " [<label for=\"answereditor[$n]\">".get_string("useeditor", "lesson")."</label>: ".
|
||||
"<input type=\"checkbox\" id=\"answereditor[$n]\" name=\"answereditor[$n]\" value=\"1\" checked=\"checked\" />";
|
||||
helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("useeditor", get_string("useeditor", "lesson"), "lesson"));
|
||||
echo "]<br />\n";
|
||||
print_textarea($usehtmleditor, 20, 70, 630, 300, "answer[$n]", $answer->answer);
|
||||
} else {
|
||||
echo " [<label for=\"answereditor[$n]\">".get_string("useeditor", "lesson")."</label>: ".
|
||||
"<input type=\"checkbox\" id=\"answereditor[$n]\" name=\"answereditor[$n]\" value=\"1\" />";
|
||||
helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("useeditor", get_string("useeditor", "lesson"), "lesson"));
|
||||
echo "]<br />\n";
|
||||
print_textarea(false, 10, 70, 630, 300, "answer[$n]", $answer->answer);
|
||||
}
|
||||
@@ -292,15 +292,15 @@
|
||||
if ($n == 2) {
|
||||
echo "<tr><td><b>".get_string("correctanswerjump", "lesson").":</b> \n";
|
||||
echo $OUTPUT->select(html_select::make($jump, "jumpto[$n]", $answer->jumpto, false));
|
||||
helpbutton("jumpto", get_string("jump", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("jumpto", get_string("jump", "lesson"), "lesson"));
|
||||
if($lesson->custom)
|
||||
echo get_string("correctanswerscore", "lesson").": <input type=\"text\" name=\"score[$n]\" value=\"$answer->score\" size=\"5\" />";
|
||||
echo "</td></tr>\n";
|
||||
}
|
||||
if ($n == 3) {
|
||||
echo "<tr><td><b>".get_string("wronganswerjump", "lesson").":</b> \n";
|
||||
echo $OUTPUT->select(html_select::make($jump, "jumpto[$n]", $answer->jumpto, false);
|
||||
helpbutton("jumpto", get_string("jump", "lesson"), "lesson");
|
||||
echo $OUTPUT->select(html_select::make($jump, "jumpto[$n]", $answer->jumpto, false));
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("jumpto", get_string("jump", "lesson"), "lesson"));
|
||||
if($lesson->custom)
|
||||
echo get_string("wronganswerscore", "lesson").": <input type=\"text\" name=\"score[$n]\" value=\"$answer->score\" size=\"5\" />";
|
||||
echo "</td></tr>\n";
|
||||
@@ -310,7 +310,7 @@
|
||||
case LESSON_ESSAY :
|
||||
echo "<tr><td><b>".get_string("jump", "lesson").":</b> \n";
|
||||
echo $OUTPUT->select(html_select::make($jump, "jumpto[$n]", $answer->jumpto, false));
|
||||
helpbutton("jumpto", get_string("jump", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("jumpto", get_string("jump", "lesson"), "lesson"));
|
||||
if($lesson->custom) {
|
||||
echo get_string("score", "lesson").": <input type=\"text\" name=\"score[$n]\" value=\"$answer->score\" size=\"5\" />";
|
||||
}
|
||||
@@ -322,7 +322,7 @@
|
||||
case LESSON_NUMERICAL:
|
||||
echo "<tr><td><b>".get_string("jump", "lesson")." $nplus1:</b> \n";
|
||||
echo $OUTPUT->select(html_select::make($jump, "jumpto[$n]", $answer->jumpto, false));
|
||||
helpbutton("jumpto", get_string("jump", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("jumpto", get_string("jump", "lesson"), "lesson"));
|
||||
if($lesson->custom) {
|
||||
echo get_string("score", "lesson")." $nplus1: <input type=\"text\" name=\"score[$n]\" value=\"$answer->score\" size=\"5\" />";
|
||||
}
|
||||
@@ -334,7 +334,7 @@
|
||||
case LESSON_ENDOFBRANCH:
|
||||
echo "<tr><td><b>".get_string("jump", "lesson")." $nplus1:</b> \n";
|
||||
echo $OUTPUT->select(html_select::make($jump, "jumpto[$n]", $answer->jumpto, false));
|
||||
helpbutton("jumpto", get_string("jump", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("jumpto", get_string("jump", "lesson"), "lesson"));
|
||||
echo "</td></tr>\n";
|
||||
break;
|
||||
}
|
||||
@@ -362,14 +362,14 @@
|
||||
echo "<tr><td><b>".get_string("answer", "lesson")." $icorrected:</b>\n";
|
||||
echo " [".get_string("useeditor", "lesson").": ".
|
||||
"<input type=\"checkbox\" name=\"answereditor[$i]\" value=\"1\" />";
|
||||
helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("useeditor", get_string("useeditor", "lesson"), "lesson"));
|
||||
echo "]<br />\n";
|
||||
print_textarea(false, 10, 70, 630, 300, "answer[$i]");
|
||||
echo "</td></tr>\n";
|
||||
echo "<tr><td><b>".get_string("matchesanswer", "lesson")." $icorrected:</b>\n";
|
||||
echo " [".get_string("useeditor", "lesson").": ".
|
||||
"<input type=\"checkbox\" name=\"responseeditor[$i]\" value=\"1\" />";
|
||||
helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("useeditor", get_string("useeditor", "lesson"), "lesson"));
|
||||
echo "]<br />\n";
|
||||
print_textarea(false, 10, 70, 630, 300, "response[$i]");
|
||||
echo "</td></tr>\n";
|
||||
@@ -382,7 +382,7 @@
|
||||
if ($page->qtype != LESSON_SHORTANSWER and $page->qtype != LESSON_NUMERICAL) {
|
||||
echo " [".get_string("useeditor", "lesson").": ".
|
||||
"<input type=\"checkbox\" name=\"answereditor[$i]\" value=\"1\" />";
|
||||
helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("useeditor", get_string("useeditor", "lesson"), "lesson"));
|
||||
echo "]<br />\n";
|
||||
print_textarea(false, 10, 70, 630, 300, "answer[$i]");
|
||||
} else {
|
||||
@@ -393,7 +393,7 @@
|
||||
echo "<tr><td><b>".get_string("response", "lesson")." $iplus1:</b>\n";
|
||||
echo " [".get_string("useeditor", "lesson").": ".
|
||||
"<input type=\"checkbox\" name=\"responseeditor[$i]\" value=\"1\" />";
|
||||
helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("useeditor", get_string("useeditor", "lesson"), "lesson"));
|
||||
echo "]<br />\n";
|
||||
print_textarea(false, 10, 70, 630, 300, "response[$i]");
|
||||
echo "</td></tr>\n";
|
||||
@@ -402,7 +402,7 @@
|
||||
echo "<tr><td><b>".get_string("description", "lesson")." $iplus1:</b>\n";
|
||||
echo " [".get_string("useeditor", "lesson").": ".
|
||||
"<input type=\"checkbox\" name=\"answereditor[$i]\" value=\"1\" />";
|
||||
helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("useeditor", get_string("useeditor", "lesson"), "lesson"));
|
||||
echo "]<br />\n";
|
||||
print_textarea(false, 10, 70, 630, 300, "answer[$i]");
|
||||
echo "</td></tr>\n";
|
||||
@@ -413,7 +413,7 @@
|
||||
if ($i < 1) {
|
||||
echo "<tr><td><b>".get_string("jump", "lesson").":</b> \n";
|
||||
echo $OUTPUT->select(html_select::make($jump, "jumpto[$i]", 0, false));
|
||||
helpbutton("jumpto", get_string("jump", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("jumpto", get_string("jump", "lesson"), "lesson"));
|
||||
if($lesson->custom) {
|
||||
echo get_string("score", "lesson").": <input type=\"text\" name=\"score[$i]\" value=\"1\" size=\"5\" />";
|
||||
}
|
||||
@@ -424,7 +424,7 @@
|
||||
if ($i == 2) {
|
||||
echo "<tr><td><b>".get_string("correctanswerjump", "lesson").":</b> \n";
|
||||
echo $OUTPUT->select(html_select::make($jump, "jumpto[$i]", $answer->jumpto, false));
|
||||
helpbutton("jumpto", get_string("jump", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("jumpto", get_string("jump", "lesson"), "lesson"));
|
||||
if ($lesson->custom) {
|
||||
echo get_string("correctanswerscore", "lesson").": <input type=\"text\" name=\"score[$i]\" value=\"$answer->score\" size=\"5\" />";
|
||||
}
|
||||
@@ -433,7 +433,7 @@
|
||||
if ($i == 3) {
|
||||
echo "<tr><td><b>".get_string("wronganswerjump", "lesson").":</b> \n";
|
||||
echo $OUTPUT->select(html_select::make($jump, "jumpto[$i]", $answer->jumpto, false));
|
||||
helpbutton("jumpto", get_string("jump", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("jumpto", get_string("jump", "lesson"), "lesson"));
|
||||
if ($lesson->custom) {
|
||||
echo get_string("wronganswerscore", "lesson").": <input type=\"text\" name=\"score[$i]\" value=\"$answer->score\" size=\"5\" />";
|
||||
}
|
||||
@@ -447,7 +447,7 @@
|
||||
case LESSON_NUMERICAL:
|
||||
echo "<tr><td><b>".get_string("jump", "lesson")." $iplus1:</b> \n";
|
||||
echo $OUTPUT->select(html_select::make($jump, "jumpto[$i]", 0, false));
|
||||
helpbutton("jumpto", get_string("jump", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("jumpto", get_string("jump", "lesson"), "lesson"));
|
||||
if($lesson->custom) {
|
||||
echo get_string("score", "lesson")." $iplus1: <input type=\"text\" name=\"score[$i]\" value=\"0\" size=\"5\" />";
|
||||
}
|
||||
@@ -456,7 +456,7 @@
|
||||
case LESSON_BRANCHTABLE :
|
||||
echo "<tr><td><b>".get_string("jump", "lesson")." $iplus1:</b> \n";
|
||||
echo $OUTPUT->select(html_select::make($jump, "jumpto[$i]", 0, false));
|
||||
helpbutton("jumpto", get_string("jump", "lesson"), "lesson");
|
||||
echo $OUTPUT->help_icon(moodle_help_icon::make("jumpto", get_string("jump", "lesson"), "lesson"));
|
||||
echo "</td></tr>\n";
|
||||
break;
|
||||
}
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@
|
||||
if (empty($firstpage)) {
|
||||
// There are no pages; give teacher some options
|
||||
if (has_capability('mod/lesson:edit', $context)) {
|
||||
print_simple_box( "<table cellpadding=\"5\" border=\"0\">\n<tr><th scope=\"col\">".get_string("whatdofirst", "lesson")."</th></tr><tr><td>".
|
||||
echo $OUTPUT->box( "<table cellpadding=\"5\" border=\"0\">\n<tr><th scope=\"col\">".get_string("whatdofirst", "lesson")."</th></tr><tr><td>".
|
||||
"<a href=\"import.php?id=$cm->id&pageid=0\">".
|
||||
get_string("importquestions", "lesson")."</a></td></tr><tr><td>".
|
||||
"<a href=\"importppt.php?id=$cm->id&pageid=0\">".
|
||||
|
||||
@@ -31,22 +31,22 @@ class qformat_default {
|
||||
}
|
||||
|
||||
function importprocess($filename, $lesson, $pageid) {
|
||||
global $DB;
|
||||
global $DB, $OUTPUT;
|
||||
|
||||
/// Processes a given file. There's probably little need to change this
|
||||
$timenow = time();
|
||||
|
||||
if (! $lines = $this->readdata($filename)) {
|
||||
notify("File could not be read, or was empty");
|
||||
echo $OUTPUT->notification("File could not be read, or was empty");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (! $questions = $this->readquestions($lines)) { // Extract all the questions
|
||||
notify("There are no questions in this file!");
|
||||
echo $OUTPUT->notification("There are no questions in this file!");
|
||||
return false;
|
||||
}
|
||||
|
||||
notify(get_string('importcount', 'lesson', sizeof($questions)));
|
||||
echo $OUTPUT->notification(get_string('importcount', 'lesson', sizeof($questions)));
|
||||
|
||||
$count = 0;
|
||||
|
||||
@@ -128,18 +128,18 @@ class qformat_default {
|
||||
$result = lesson_save_question_options($question);
|
||||
|
||||
if (!empty($result->error)) {
|
||||
notify($result->error);
|
||||
echo $OUTPUT->notification($result->error);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!empty($result->notice)) {
|
||||
notify($result->notice);
|
||||
echo $OUTPUT->notification($result->notice);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
// the Bad ones
|
||||
default :
|
||||
notify(get_string('unsupportedqtype', 'lesson', $question->qtype));
|
||||
echo $OUTPUT->notification(get_string('unsupportedqtype', 'lesson', $question->qtype));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
|
||||
switch ($mode) {
|
||||
case 'add':
|
||||
print_simple_box_start('center');
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter');
|
||||
echo '<div class="mdl-align">
|
||||
<form id="nickname" method ="post" action="'.$CFG->wwwroot.'/mod/lesson/highscores.php" autocomplete="off">
|
||||
<input type="hidden" name="id" value="'.$cm->id.'" />
|
||||
@@ -146,7 +146,7 @@
|
||||
echo get_string("entername", "lesson").": <input type=\"text\" name=\"name\" size=\"7\" maxlength=\"5\" />\n<p>\n";
|
||||
lesson_print_submit_link(get_string("submitname", "lesson"), 'nickname');
|
||||
echo "</p>\n</form>\n</div>\n";
|
||||
print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
break;
|
||||
default:
|
||||
$params = array ("lessonid" => $lesson->id);
|
||||
|
||||
@@ -43,11 +43,11 @@
|
||||
$form->format = clean_param($form->format, PARAM_SAFEDIR); // For safety
|
||||
|
||||
if (empty($_FILES['newfile'])) { // file was just uploaded
|
||||
notify(get_string("uploadproblem") );
|
||||
echo $OUTPUT->notification(get_string("uploadproblem") );
|
||||
}
|
||||
|
||||
if ((!is_uploaded_file($_FILES['newfile']['tmp_name']) or $_FILES['newfile']['size'] == 0)) {
|
||||
notify(get_string("uploadnofilefound") );
|
||||
echo $OUTPUT->notification(get_string("uploadnofilefound") );
|
||||
|
||||
} else { // Valid file is found
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
}
|
||||
|
||||
echo "<hr>";
|
||||
print_continue("view.php?id=$cm->id");
|
||||
echo $OUTPUT->continue_button("view.php?id=$cm->id");
|
||||
echo $OUTPUT->footer();
|
||||
exit;
|
||||
}
|
||||
@@ -86,7 +86,7 @@
|
||||
|
||||
print_heading_with_help($strimportquestions, "import", "lesson");
|
||||
|
||||
print_simple_box_start("center");
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter');
|
||||
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=\"pageid\" value=\"$pageid\" />\n";
|
||||
@@ -108,7 +108,7 @@
|
||||
|
||||
echo "</table>";
|
||||
echo "</form>";
|
||||
print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
|
||||
@@ -50,11 +50,11 @@
|
||||
if ($form = data_submitted()) { /// Filename
|
||||
|
||||
if (empty($_FILES['newfile'])) { // file was just uploaded
|
||||
notify(get_string("uploadproblem") );
|
||||
echo $OUTPUT->notification(get_string("uploadproblem") );
|
||||
}
|
||||
|
||||
if ((!is_uploaded_file($_FILES['newfile']['tmp_name']) or $_FILES['newfile']['size'] == 0)) {
|
||||
notify(get_string("uploadnofilefound") );
|
||||
echo $OUTPUT->notification(get_string("uploadnofilefound") );
|
||||
|
||||
} else { // Valid file is found
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
}
|
||||
|
||||
echo "<hr>";
|
||||
print_continue("$CFG->wwwroot/mod/$modname/view.php?id=$cm->id");
|
||||
echo $OUTPUT->continue_button("$CFG->wwwroot/mod/$modname/view.php?id=$cm->id");
|
||||
echo $OUTPUT->footer();
|
||||
exit;
|
||||
}
|
||||
@@ -85,7 +85,7 @@
|
||||
|
||||
print_heading_with_help($strimportppt, "importppt", "lesson");
|
||||
|
||||
print_simple_box_start("center");
|
||||
echo $OUTPUT->box_start('generalbox boxaligncenter');
|
||||
echo "<form id=\"theform\" enctype=\"multipart/form-data\" method=\"post\">";
|
||||
echo "<input type=\"hidden\" name=\"id\" value=\"$cm->id\" />\n";
|
||||
echo "<input type=\"hidden\" name=\"pageid\" value=\"$pageid\" />\n";
|
||||
@@ -101,7 +101,7 @@
|
||||
|
||||
echo "</table>";
|
||||
echo "</form>";
|
||||
print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
|
||||
+5
-5
@@ -151,14 +151,14 @@ function lesson_delete_instance($id) {
|
||||
* @return boolean
|
||||
*/
|
||||
function lesson_delete_course($course, $feedback=true) {
|
||||
global $DB;
|
||||
global $DB, $OUTPUT;
|
||||
|
||||
$count = $DB->count_records('lesson_default', array('course'=>$course->id));
|
||||
$DB->delete_records('lesson_default', array('course' => $course->id));
|
||||
|
||||
//Inform about changes performed if feedback is enabled
|
||||
if ($feedback) {
|
||||
notify(get_string('deletedefaults', 'lesson', $count));
|
||||
echo $OUTPUT->notification(get_string('deletedefaults', 'lesson', $count));
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -213,12 +213,12 @@ function lesson_user_outline($course, $user, $mod, $lesson) {
|
||||
* @return bool
|
||||
*/
|
||||
function lesson_user_complete($course, $user, $mod, $lesson) {
|
||||
global $DB;
|
||||
global $DB, $OUTPUT;
|
||||
|
||||
$params = array ("lessonid" => $lesson->id, "userid" => $user->id);
|
||||
if ($attempts = $DB->get_records_select("lesson_attempts", "lessonid = :lessonid AND userid = :userid", $params,
|
||||
"retry, timeseen")) {
|
||||
print_simple_box_start();
|
||||
echo $OUTPUT->box_start();
|
||||
$table->head = array (get_string("attempt", "lesson"), get_string("numberofpagesviewed", "lesson"),
|
||||
get_string("numberofcorrectanswers", "lesson"), get_string("time"));
|
||||
$table->width = "100%";
|
||||
@@ -253,7 +253,7 @@ function lesson_user_complete($course, $user, $mod, $lesson) {
|
||||
$table->data[] = array($retry + 1, $npages, $ncorrect, userdate($timeseen));
|
||||
}
|
||||
print_table($table);
|
||||
print_simple_box_end();
|
||||
echo $OUTPUT->box_end();
|
||||
// also print grade summary
|
||||
$params = array ("lessonid" => $lesson->id, "userid" => $user->id);
|
||||
if ($grades = $DB->get_records_select("lesson_grades", "lessonid = :lessonid AND userid = :userid", $params,
|
||||
|
||||
@@ -347,7 +347,7 @@ function lesson_set_message($message, $class="notifyproblem", $align='center') {
|
||||
* @return boolean
|
||||
**/
|
||||
function lesson_print_messages() {
|
||||
global $SESSION;
|
||||
global $SESSION, $OUTPUT;
|
||||
|
||||
if (empty($SESSION->lesson_messages)) {
|
||||
// No messages to print
|
||||
@@ -355,7 +355,7 @@ function lesson_print_messages() {
|
||||
}
|
||||
|
||||
foreach($SESSION->lesson_messages as $message) {
|
||||
notify($message[0], $message[1], $message[2]);
|
||||
echo $OUTPUT->notification($message[0], $message[1], $message[2]);
|
||||
}
|
||||
|
||||
// Reset
|
||||
@@ -1530,7 +1530,7 @@ function lesson_grade($lesson, $ntries, $userid = 0) {
|
||||
* @return void
|
||||
**/
|
||||
function lesson_print_ongoing_score($lesson) {
|
||||
global $USER, $DB;
|
||||
global $USER, $DB, $OUTPUT;
|
||||
|
||||
$cm = get_coursemodule_from_instance('lesson', $lesson->id);
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
@@ -1548,11 +1548,11 @@ function lesson_print_ongoing_score($lesson) {
|
||||
if ($lesson->custom) {
|
||||
$a->score = $gradeinfo->earned;
|
||||
$a->currenthigh = $gradeinfo->total;
|
||||
print_simple_box(get_string("ongoingcustom", "lesson", $a), "center");
|
||||
echo $OUTPUT->box(get_string("ongoingcustom", "lesson", $a), "generalbox boxaligncenter");
|
||||
} else {
|
||||
$a->correct = $gradeinfo->earned;
|
||||
$a->viewed = $gradeinfo->attempts;
|
||||
print_simple_box(get_string("ongoingnormal", "lesson", $a), "center");
|
||||
echo $OUTPUT->box(get_string("ongoingnormal", "lesson", $a), "generalbox boxaligncenter");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1591,7 +1591,7 @@ function lesson_qtype_menu($qtypes, $selected="", $link="", $onclick="") {
|
||||
* @return boolean The return is not significant as of yet. Will return true/false.
|
||||
**/
|
||||
function lesson_print_progress_bar($lesson, $course) {
|
||||
global $CFG, $USER, $DB;
|
||||
global $CFG, $USER, $DB, $OUTPUT;
|
||||
|
||||
$cm = get_coursemodule_from_instance('lesson', $lesson->id);
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
@@ -1603,7 +1603,7 @@ function lesson_print_progress_bar($lesson, $course) {
|
||||
|
||||
// catch teachers
|
||||
if (has_capability('mod/lesson:manage', $context)) {
|
||||
notify(get_string('progressbarteacherwarning2', 'lesson'));
|
||||
echo $OUTPUT->notification(get_string('progressbarteacherwarning2', 'lesson'));
|
||||
return false;
|
||||
}
|
||||
if (!isset($USER->modattempts[$lesson->id])) {
|
||||
@@ -1756,6 +1756,7 @@ function lesson_add_pretend_blocks($page, $cm, $lesson, $timer = null) {
|
||||
* @return block_contents
|
||||
**/
|
||||
function lesson_mediafile_block_contents($cmid, $lesson) {
|
||||
global $OUTPUT;
|
||||
if (empty($lesson->mediafile)) {
|
||||
return null;
|
||||
}
|
||||
@@ -1765,7 +1766,7 @@ function lesson_mediafile_block_contents($cmid, $lesson) {
|
||||
$name = 'lessonmediafile';
|
||||
|
||||
$content = link_to_popup_window ($url, $name, get_string('mediafilepopup', 'lesson'), '', '', get_string('mediafilepopup', 'lesson'), $options, true);
|
||||
$content .= helpbutton("mediafilestudent", get_string("mediafile", "lesson"), "lesson", true, false, '', true);
|
||||
$content .= $OUTPUT->help_icon(moodle_help_icon::make("mediafilestudent", get_string("mediafile", "lesson"), "lesson"));
|
||||
|
||||
$bc = new block_contents();
|
||||
$bc->title = get_string('linkedmedia', 'lesson');
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
$filename = basename($file['basename'], '.'.$file['extension']);
|
||||
|
||||
echo "<div class=\"lessonmediafilecontrol\"><p>";
|
||||
notify(get_string('clicktodownload', 'lesson'));
|
||||
echo $OUTPUT->notification(get_string('clicktodownload', 'lesson'));
|
||||
echo "<a href=\"$fullurl\">".format_string($filename).'</a>';
|
||||
echo "</p></div>";
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
}
|
||||
|
||||
if ($nothingtodisplay) {
|
||||
notify(get_string('nolessonattempts', 'lesson'));
|
||||
echo $OUTPUT->notification(get_string('nolessonattempts', 'lesson'));
|
||||
echo $OUTPUT->footer();
|
||||
exit();
|
||||
}
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@
|
||||
echo '<fieldset class="invisiblefieldset">';
|
||||
echo '<input type="hidden" name="id" value="'. $cm->id .'" />' . "\n";
|
||||
if (optional_param('userpassword', 0, PARAM_CLEAN)) {
|
||||
notify(get_string('loginfail', 'lesson'));
|
||||
echo $OUTPUT->notification(get_string('loginfail', 'lesson'));
|
||||
}
|
||||
|
||||
echo get_string('passwordprotectedlesson', 'lesson', format_string($lesson->name))."<br /><br />\n".
|
||||
|
||||
Reference in New Issue
Block a user