Merge branch 'MDL-29668' of git://github.com/stronk7/moodle
authorSam Hemelryk <sam@moodle.com>
Sun, 9 Oct 2011 23:09:34 +0000 (12:09 +1300)
committerSam Hemelryk <sam@moodle.com>
Sun, 9 Oct 2011 23:09:34 +0000 (12:09 +1300)
lib/simpletest/testpagelib_moodlepage.php
mod/assignment/lib.php
mod/choice/renderer.php
question/engine/datalib.php
version.php

index 2c66b45..ccaf287 100644 (file)
@@ -67,7 +67,7 @@ class moodle_page_test extends UnitTestCase {
     }
 
     public function tearDown() {
-        global $COURSE;
+        global $COURSE, $PAGE;
         $this->testpage = NULL;
         $COURSE = $this->originalcourse;
         $PAGE = $this->originalpage;
index f698054..e3fca57 100644 (file)
@@ -1922,8 +1922,12 @@ class assignment_base {
                     $button->set_format_by_file($file);
                     $output .= $button->to_html(PORTFOLIO_ADD_ICON_LINK);
                 }
-                $output .= plagiarism_get_links(array('userid'=>$userid, 'file'=>$file, 'cmid'=>$this->cm->id, 'course'=>$this->course, 'assignment'=>$this->assignment));
-                $output .= '<br />';
+                
+                if ($CFG->enableplagiarism) {
+                    require_once($CFG->libdir.'/plagiarismlib.php');
+                    $output .= plagiarism_get_links(array('userid'=>$userid, 'file'=>$file, 'cmid'=>$this->cm->id, 'course'=>$this->course, 'assignment'=>$this->assignment));
+                    $output .= '<br />';
+                }
             }
             if ($CFG->enableportfolios && count($files) > 1  && $this->portfolio_exportable() && has_capability('mod/assignment:exportownsubmission', $this->context)) {
                 $button->set_callback_options('assignment_portfolio_caller', array('id' => $this->cm->id, 'submissionid' => $submission->id), '/mod/assignment/locallib.php');
index 4df3f6a..4ef840d 100644 (file)
@@ -204,11 +204,11 @@ class mod_choice_renderer extends plugin_renderer_base {
         if ($choices->viewresponsecapability && $choices->deleterepsonsecapability) {
             $selecturl = new moodle_url('#');
 
-            $selectallactions = new component_action('click',"select_all_in", array('div',null,'tablecontainer'));
+            $selectallactions = new component_action('click',"checkall");
             $selectall = new action_link($selecturl, get_string('selectall'), $selectallactions);
             $actiondata .= $this->output->render($selectall) . ' / ';
 
-            $deselectallactions = new component_action('click',"deselect_all_in", array('div',null,'tablecontainer'));
+            $deselectallactions = new component_action('click',"checknone");
             $deselectall = new action_link($selecturl, get_string('deselectall'), $deselectallactions);
             $actiondata .= $this->output->render($deselectall);
 
index a0eeb38..092eaa1 100644 (file)
@@ -695,8 +695,8 @@ ORDER BY
                 DELETE qu, qa, qas, qasd
                   FROM {question_usages}            qu
                   JOIN {question_attempts}          qa   ON qa.questionusageid = qu.id
-                  JOIN {question_attempt_steps}     qas  ON qas.questionattemptid = qa.id
-                  JOIN {question_attempt_step_data} qasd ON qasd.attemptstepid = qas.id
+             LEFT JOIN {question_attempt_steps}     qas  ON qas.questionattemptid = qa.id
+             LEFT JOIN {question_attempt_step_data} qasd ON qasd.attemptstepid = qas.id
                  WHERE qu.id ' . $qubaids->usage_id_in(),
                 $qubaids->usage_id_in_params());
     }
@@ -713,7 +713,7 @@ ORDER BY
         $this->db->execute('
                 DELETE qas, qasd
                   FROM {question_attempt_steps}     qas
-                  JOIN {question_attempt_step_data} qasd ON qasd.attemptstepid = qas.id
+             LEFT JOIN {question_attempt_step_data} qasd ON qasd.attemptstepid = qas.id
                  WHERE qas.questionattemptid ' . $test, $params);
     }
 
index ae350fd..f9757d8 100644 (file)
@@ -31,10 +31,10 @@ defined('MOODLE_INTERNAL') || die();
 
 
 
-$version  = 2011100700.00;              // YYYYMMDD      = weekly release date of this DEV branch
+$version  = 2011100700.01;              // YYYYMMDD      = weekly release date of this DEV branch
                                         //         RR    = release increments - 00 in DEV branches
                                         //           .XX = incremental changes
 
-$release  = '2.2dev (Build: 20111007)'; // Human-friendly version name
+$release  = '2.2dev (Build: 20111009)'; // Human-friendly version name
 
 $maturity = MATURITY_ALPHA;             // this version's maturity level