mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-19067 removed obsoleted string (never used in any STABLE branch)
This commit is contained in:
parent
739ee4e679
commit
6d40f12e5b
@ -51,16 +51,12 @@ $string['cannotfindanswer'] = 'Error: could not find answer';
|
||||
$string['cannotfindgrade'] = 'Error: could not find grades';
|
||||
$string['cannotfindrecords'] = 'Error: could not find lesson records';
|
||||
$string['cannotfinduser'] = 'Error: could not find users';
|
||||
$string['cannotdeleteanswer'] = 'Update page: unable to delete answer record';
|
||||
$string['cannotdeleteattempt'] = 'Error: could not delete old attempts';
|
||||
$string['cannotdeletebranch'] = 'Error: could not delete old seen branches';
|
||||
$string['cannotinsertanswer'] = 'Cannot insert answer record';
|
||||
$string['cannotinserthighscore'] = 'Insert of new high score Failed!';
|
||||
$string['cannotinsertpage'] = 'Cannot insert new page';
|
||||
$string['cannotinserttimer'] = 'Error: could not insert row into lesson_timer table';
|
||||
$string['cannotupdateanswer'] = 'Update page: answer not updated';
|
||||
$string['cannotupdatebook'] = 'Cannot update your book';
|
||||
$string['cannotupdategrade'] = 'Cannot update grade';
|
||||
$string['cannotupdatelink'] = 'Cannot update link';
|
||||
$string['cannotupdatepage'] = 'Update page: page not updated';
|
||||
$string['cannotupdatetimer'] = 'Error: could not update lesson_timer table';
|
||||
|
@ -61,7 +61,6 @@ $string['attlsname'] = 'ATTLS (20 item version)';
|
||||
$string['cannotfindsurveytmpt'] = 'No survey templates found!';
|
||||
$string['cannotfindquestion'] = 'Question doesn\'t exist';
|
||||
$string['cannotfindanswer'] = 'There are no answers for this survey yet.';
|
||||
$string['cannotinsertanswer'] = 'Encountered a problem trying to store your results. Sorry.';
|
||||
$string['ciq1'] = 'At what moment in class were you most engaged as a learner?';
|
||||
$string['ciq1short'] = 'Most engaged';
|
||||
$string['ciq2'] = 'At what moment in class were you most distanced as a learner?';
|
||||
|
@ -35,9 +35,7 @@
|
||||
$newpage->timecreated = $timenow;
|
||||
$newpage->title = get_string("clustertitle", "lesson");
|
||||
$newpage->contents = get_string("clustertitle", "lesson");
|
||||
if (!$newpageid = $DB->insert_record("lesson_pages", $newpage)) {
|
||||
print_error('cannotinsertpage', 'lesson');
|
||||
}
|
||||
$newpageid = $DB->insert_record("lesson_pages", $newpage);
|
||||
// update the linked list...
|
||||
if ($pageid != 0) {
|
||||
if (!$DB->set_field("lesson_pages", "nextpageid", $newpageid, array("id" => $pageid))) {
|
||||
|
@ -37,9 +37,7 @@
|
||||
$newpage->timecreated = $timenow;
|
||||
$newpage->title = get_string("endofbranch", "lesson");
|
||||
$newpage->contents = get_string("endofbranch", "lesson");
|
||||
if (!$newpageid = $DB->insert_record("lesson_pages", $newpage)) {
|
||||
print_error('cannotinsertpage', 'lesson');
|
||||
}
|
||||
$newpageid = $DB->insert_record("lesson_pages", $newpage);
|
||||
// update the linked list...
|
||||
if (!$DB->set_field("lesson_pages", "nextpageid", $newpageid, array("id" => $pageid))) {
|
||||
print_error('cannotupdatelink', 'lesson');
|
||||
|
@ -28,9 +28,7 @@
|
||||
$newpage->timecreated = $timenow;
|
||||
$newpage->title = get_string("endofclustertitle", "lesson");
|
||||
$newpage->contents = get_string("endofclustertitle", "lesson");
|
||||
if (!$newpageid = $DB->insert_record("lesson_pages", $newpage)) {
|
||||
print_error('cannotinsertpage', 'lesson');
|
||||
}
|
||||
$newpageid = $DB->insert_record("lesson_pages", $newpage);
|
||||
// update the linked list...
|
||||
if (!$DB->set_field("lesson_pages", "nextpageid", $newpageid, array("id" => $pageid))) {
|
||||
print_error('cannotupdatelink', 'lesson');
|
||||
|
@ -47,18 +47,11 @@
|
||||
$newpage->contents = trim($form->contents);
|
||||
$newpage->title = $newpage->title;
|
||||
$newpageid = $DB->insert_record("lesson_pages", $newpage);
|
||||
if (!$newpageid) {
|
||||
print_error('cannotinsertpage', 'lesson');
|
||||
}
|
||||
// update the linked list (point the previous page to this new one)
|
||||
if (!$DB->set_field("lesson_pages", "nextpageid", $newpageid, array("id" => $newpage->prevpageid))) {
|
||||
print_error('cannotupdatelink', 'lesson');
|
||||
}
|
||||
$DB->set_field("lesson_pages", "nextpageid", $newpageid, array("id" => $newpage->prevpageid));
|
||||
if ($page->nextpageid) {
|
||||
// new page is not the last page
|
||||
if (!$DB->set_field("lesson_pages", "prevpageid", $newpageid, array("id" => $page->nextpageid))) {
|
||||
print_error('cannotupdatelink', 'lesson');
|
||||
}
|
||||
$DB->set_field("lesson_pages", "prevpageid", $newpageid, array("id" => $page->nextpageid));
|
||||
}
|
||||
} else {
|
||||
// new page is the first page
|
||||
@ -90,9 +83,6 @@
|
||||
$newpage->contents = trim($form->contents);
|
||||
$newpage->title = $newpage->title;
|
||||
$newpageid = $DB->insert_record("lesson_pages", $newpage);
|
||||
if (!$newpageid) {
|
||||
print_error('cannotinsertpage', 'lesson');
|
||||
}
|
||||
} else {
|
||||
// there are existing pages put this at the start
|
||||
$newpage->lessonid = $lesson->id;
|
||||
|
@ -70,9 +70,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!$DB->update_record("lesson_answers", $oldanswer)) {
|
||||
print_error('cannotupdateanswer', 'lesson');
|
||||
}
|
||||
$DB->update_record("lesson_answers", $oldanswer);
|
||||
} else {
|
||||
// it's an "ordinary" page
|
||||
if ($page->qtype == LESSON_MATCHING) {
|
||||
@ -105,9 +103,7 @@
|
||||
if (isset($form->score[$i])) {
|
||||
$oldanswer->score = clean_param($form->score[$i], PARAM_INT);
|
||||
}
|
||||
if (!$DB->update_record("lesson_answers", $oldanswer)) {
|
||||
print_error('cannotupdateanswer', 'lesson');
|
||||
}
|
||||
$DB->update_record("lesson_answers", $oldanswer);
|
||||
} else {
|
||||
// it's a new answer
|
||||
$newanswer = new stdClass; // need to clear id if more than one new answer is ben added
|
||||
@ -152,9 +148,7 @@
|
||||
$form->responseeditor[$i] * LESSON_RESPONSE_EDITOR;
|
||||
$oldanswer->timemodified = $timenow;
|
||||
$oldanswer->answer = NULL;
|
||||
if (!$DB->update_record("lesson_answers", $oldanswer)) {
|
||||
print_error('cannotupdateanswer', 'lesson');
|
||||
}
|
||||
$DB->update_record("lesson_answers", $oldanswer);
|
||||
}
|
||||
} elseif (!empty($form->answerid[$i])) {
|
||||
// need to delete blanked out answer
|
||||
|
@ -93,13 +93,9 @@ class qformat_default {
|
||||
$newpage->prevpageid = $pageid;
|
||||
$newpage->nextpageid = $page->nextpageid;
|
||||
// insert the page and reset $pageid
|
||||
if (!$newpageid = $DB->insert_record("lesson_pages", $newpage)) {
|
||||
print_error('cannotinsertpage', 'lesson');
|
||||
}
|
||||
$newpageid = $DB->insert_record("lesson_pages", $newpage);
|
||||
// update the linked list
|
||||
if (!$DB->set_field("lesson_pages", "nextpageid", $newpageid, array("id" => $pageid))) {
|
||||
print_error('cannotupdateanswer', 'lesson');
|
||||
}
|
||||
$DB->set_field("lesson_pages", "nextpageid", $newpageid, array("id" => $pageid));
|
||||
|
||||
} else {
|
||||
// new page is the first page
|
||||
@ -110,21 +106,13 @@ class qformat_default {
|
||||
$newpage->prevpageid = 0; // this is a first page
|
||||
$newpage->nextpageid = 0; // this is the only page
|
||||
$newpageid = $DB->insert_record("lesson_pages", $newpage);
|
||||
if (!$newpageid) {
|
||||
print_error('cannotinsertpage', 'lesson');
|
||||
}
|
||||
} else {
|
||||
// there are existing pages put this at the start
|
||||
$newpage->prevpageid = 0; // this is a first page
|
||||
$newpage->nextpageid = $page->id;
|
||||
$newpageid = $DB->insert_record("lesson_pages", $newpage);
|
||||
if (!$newpageid) {
|
||||
print_error('cannotinsertpage', 'lesson');
|
||||
}
|
||||
// update the linked list
|
||||
if (!$DB->set_field("lesson_pages", "prevpageid", $newpageid, array("id" => $page->id))) {
|
||||
print_error('cannotupdatelink', 'lesson');
|
||||
}
|
||||
$DB->set_field("lesson_pages", "prevpageid", $newpageid, array("id" => $page->id));
|
||||
}
|
||||
}
|
||||
// reset $pageid and put the page ID in $question, used in save_question_option()
|
||||
|
@ -116,9 +116,7 @@
|
||||
$newhighscore->gradeid = $newgrade->id;
|
||||
$newhighscore->nickname = $name;
|
||||
|
||||
if (!$DB->insert_record('lesson_high_scores', $newhighscore)) {
|
||||
print_error('cannotinserthighscore', 'lesson');
|
||||
}
|
||||
$DB->insert_record('lesson_high_scores', $newhighscore);
|
||||
|
||||
// Log it
|
||||
add_to_log($course->id, 'lesson', 'update highscores', "highscores.php?id=$cm->id", $name, $cm->id);
|
||||
|
@ -543,15 +543,11 @@ function lesson_save_objects($branchtables, $lessonid, $after) {
|
||||
$branchtable->page->prevpageid = $prevpageid;
|
||||
|
||||
// insert the page
|
||||
if(!$id = $DB->insert_record('lesson_pages', $branchtable->page)) {
|
||||
print_error('cannotinsertpage', 'lesson');
|
||||
}
|
||||
$id = $DB->insert_record('lesson_pages', $branchtable->page);
|
||||
|
||||
// update the link of the page previous to the one we just updated
|
||||
if ($prevpageid != 0) { // if not the first page
|
||||
if (!$DB->set_field("lesson_pages", "nextpageid", $id, array("id" => $prevpageid))) {
|
||||
print_error('cannotupdatepage', 'lesson');
|
||||
}
|
||||
$DB->set_field("lesson_pages", "nextpageid", $id, array("id" => $prevpageid));
|
||||
}
|
||||
|
||||
// insert the answers
|
||||
@ -565,9 +561,7 @@ function lesson_save_objects($branchtables, $lessonid, $after) {
|
||||
|
||||
// all done with inserts. Now check to update our last page (this is when we import between two lesson pages)
|
||||
if ($nextpageid != 0) { // if the next page is not the end of lesson
|
||||
if (!$DB->set_field("lesson_pages", "prevpageid", $id, array("id" => $nextpageid))) {
|
||||
print_error('cannotupdatepage', 'lesson');
|
||||
}
|
||||
$DB->set_field("lesson_pages", "prevpageid", $id, array("id" => $nextpageid));
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -581,9 +575,7 @@ function book_save_objects($chapters, $bookid, $pageid='0') {
|
||||
|
||||
// nothing fancy, just save them all in order
|
||||
foreach ($chapters as $chapter) {
|
||||
if (!$chapter->id = $DB->insert_record('book_chapters', $chapter)) {
|
||||
print_error('cannotupdatebook', 'lesson');
|
||||
}
|
||||
$chapter->id = $DB->insert_record('book_chapters', $chapter);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -326,9 +326,7 @@
|
||||
$startlesson->starttime = time();
|
||||
$startlesson->lessontime = time();
|
||||
|
||||
if (!$DB->insert_record('lesson_timer', $startlesson)) {
|
||||
print_error('cannotinserttimer', 'lesson');
|
||||
}
|
||||
$DB->insert_record('lesson_timer', $startlesson);
|
||||
if ($lesson->timed) {
|
||||
lesson_set_message(get_string('maxtimewarning', 'lesson', $lesson->maxtime), 'center');
|
||||
}
|
||||
|
@ -84,9 +84,7 @@
|
||||
$newdata->answer2 = "";
|
||||
}
|
||||
|
||||
if (! $DB->insert_record("survey_answers", $newdata)) {
|
||||
print_error('cannotinsertanswer', 'survey');
|
||||
}
|
||||
$DB->insert_record("survey_answers", $newdata);
|
||||
}
|
||||
|
||||
// Print the page and finish up.
|
||||
|
Loading…
x
Reference in New Issue
Block a user