Merge branch 'MDL-31428' of git://github.com/stronk7/moodle
authorAparup Banerjee <aparup@moodle.com>
Tue, 31 Jan 2012 03:15:26 +0000 (11:15 +0800)
committerAparup Banerjee <aparup@moodle.com>
Tue, 31 Jan 2012 03:15:26 +0000 (11:15 +0800)
backup/converter/moodle1/handlerlib.php
mod/quiz/backup/moodle2/backup_quiz_stepslib.php
mod/quiz/module.js
mod/resource/locallib.php
mod/url/locallib.php
question/engine/upgrade/upgradelib.php

index a6b7788..f0c9754 100644 (file)
@@ -345,6 +345,8 @@ class moodle1_root_handler extends moodle1_xml_handler {
         // {@see backup_general_helper::backup_is_samesite()}
         if (isset($backupinfo['original_site_identifier_hash'])) {
             $this->xmlwriter->full_tag('original_site_identifier_hash', $backupinfo['original_site_identifier_hash']);
+        } else {
+            $this->xmlwriter->full_tag('original_site_identifier_hash', null);
         }
         $this->xmlwriter->full_tag('original_course_id', $originalcourseinfo['original_course_id']);
         $this->xmlwriter->full_tag('original_course_fullname', $originalcourseinfo['original_course_fullname']);
index a8c9e54..bcf7d20 100644 (file)
@@ -81,7 +81,7 @@ class backup_quiz_activity_structure_step extends backup_questions_activity_stru
         $attempt = new backup_nested_element('attempt', array('id'), array(
             'uniqueid', 'userid', 'attemptnum', 'sumgrades',
             'timestart', 'timefinish', 'timemodified', 'layout',
-            'preview'));
+            'preview', 'currentpage'));
 
         // This module is using questions, so produce the related question states and sessions
         // attaching them to the $attempt element based in 'uniqueid' matching
index d9d217f..63c44d6 100644 (file)
@@ -186,11 +186,11 @@ M.mod_quiz.secure_window = {
         if (window.location.href.substring(0, 4) == 'file') {
             window.location = 'about:blank';
         }
-        Y.delegate('contextmenu', M.mod_quiz.secure_window.prevent, document.body, '*');
-        Y.delegate('mousedown', M.mod_quiz.secure_window.prevent_mouse, document.body, '*');
-        Y.delegate('mouseup', M.mod_quiz.secure_window.prevent_mouse, document.body, '*');
-        Y.delegate('dragstart', M.mod_quiz.secure_window.prevent, document.body, '*');
-        Y.delegate('selectstart', M.mod_quiz.secure_window.prevent, document.body, '*');
+        Y.delegate('contextmenu', M.mod_quiz.secure_window.prevent, document, '*');
+        Y.delegate('mousedown', M.mod_quiz.secure_window.prevent_mouse, document, '*');
+        Y.delegate('mouseup', M.mod_quiz.secure_window.prevent_mouse, document, '*');
+        Y.delegate('dragstart', M.mod_quiz.secure_window.prevent, document, '*');
+        Y.delegate('selectstart', M.mod_quiz.secure_window.prevent, document, '*');
         M.mod_quiz.secure_window.clear_status;
         Y.on('beforeprint', function() {
             Y.one(document.body).setStyle('display', 'none');
index dcd8dfe..df2b0b6 100644 (file)
@@ -155,6 +155,7 @@ function resource_display_frame($resource, $cm, $course, $file) {
         $navurl = "$CFG->wwwroot/mod/resource/view.php?id=$cm->id&amp;frameset=top";
         $title = strip_tags(format_string($course->shortname.': '.$resource->name));
         $framesize = $config->framesize;
+        $contentframetitle = format_string($resource->name);
         $modulename = s(get_string('modulename','resource'));
         $dir = get_string('thisdirection', 'langconfig');
 
@@ -167,7 +168,7 @@ function resource_display_frame($resource, $cm, $course, $file) {
   </head>
   <frameset rows="$framesize,*">
     <frame src="$navurl" title="$modulename" />
-    <frame src="$fileurl" title="$modulename" />
+    <frame src="$fileurl" title="$contentframetitle" />
   </frameset>
 </html>
 EOF;
index 6f02035..70e7efc 100644 (file)
@@ -228,6 +228,7 @@ function url_display_frame($url, $cm, $course) {
         $title = strip_tags($courseshortname.': '.format_string($url->name));
         $framesize = $config->framesize;
         $modulename = s(get_string('modulename','url'));
+        $contentframetitle = format_string($url->name);
         $dir = get_string('thisdirection', 'langconfig');
 
         $extframe = <<<EOF
@@ -239,7 +240,7 @@ function url_display_frame($url, $cm, $course) {
   </head>
   <frameset rows="$framesize,*">
     <frame src="$navurl" title="$modulename"/>
-    <frame src="$exteurl" title="$modulename"/>
+    <frame src="$exteurl" title="$contentframetitle"/>
   </frameset>
 </html>
 EOF;
index 7e682f0..8c6e175 100644 (file)
@@ -88,8 +88,9 @@ class question_engine_attempt_upgrader {
         global $CFG, $DB;
 
         // Look to see if the admin has set things up to only upgrade certain attempts.
-        $partialupgradefile = $CFG->dirroot . '/local/qeupgradehelper/partialupgrade.php';
-        $partialupgradefunction = 'local_qeupgradehelper_get_quizzes_to_upgrade';
+        $partialupgradefile = $CFG->dirroot . '/' . $CFG->admin .
+                '/tool/qeupgradehelper/partialupgrade.php';
+        $partialupgradefunction = 'tool_qeupgradehelper_get_quizzes_to_upgrade';
         if (is_readable($partialupgradefile)) {
             include_once($partialupgradefile);
             if (function_exists($partialupgradefunction)) {