portfolio MDL-21079 updated a few more portfolio_callers
authorPenny Leach <penny@liip.ch>
Tue, 15 Dec 2009 12:37:06 +0000 (12:37 +0000)
committerPenny Leach <penny@liip.ch>
Tue, 15 Dec 2009 12:37:06 +0000 (12:37 +0000)
fixed a few more that were pointing to lib.php rather than locallib.php

lib/simpletest/testportfolioaddbutton.php
mod/assignment/lib.php
mod/assignment/type/online/assignment.class.php
mod/assignment/type/upload/assignment.class.php

index b7c6ba5..d93a37d 100644 (file)
@@ -44,7 +44,7 @@ class portfoliolibaddbutton_test extends FakeDBUnitTestCase {
     function test_set_formats() {
 
         $button = new portfolio_add_button();
-        $button->set_callback_options('assignment_portfolio_caller', array('id' => 6), '/mod/assignment/lib.php');
+        $button->set_callback_options('assignment_portfolio_caller', array('id' => 6), '/mod/assignment/locallib.php');
         $formats = array(PORTFOLIO_FORMAT_FILE, PORTFOLIO_FORMAT_IMAGE);
         $button->set_formats($formats);
 
index f8baef1..4dcecfc 100644 (file)
@@ -1820,7 +1820,7 @@ class assignment_base {
                 $output .= '<br />';
             }
             if (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));
+                $button->set_callback_options('assignment_portfolio_caller', array('id' => $this->cm->id), '/mod/assignment/locallib.php');
                 $output .= '<br />'  . $button->to_html();
             }
         }
index f5ada80..8236e1e 100644 (file)
@@ -109,7 +109,7 @@ class assignment_online extends assignment_base {
                     $text = file_rewrite_pluginfile_urls($submission->data1, 'pluginfile.php', $this->context->id, 'assignment_online_submission', $this->assignment->id);
                     echo format_text($text, $submission->data2);
                     $button = new portfolio_add_button();
-                    $button->set_callback_options('assignment_portfolio_caller', array('id' => $this->cm->id), '/mod/assignment/lib.php');
+                    $button->set_callback_options('assignment_portfolio_caller', array('id' => $this->cm->id), '/mod/assignment/locallib.php');
                     $button->set_formats(PORTFOLIO_FORMAT_PLAINHTML); //TODO this might have files?
                     $button->render();
                 } else if (!has_capability('mod/assignment:submit', $context)) { //fix for #4604
index 3d00d6f..056cfcb 100644 (file)
@@ -360,14 +360,14 @@ class assignment_upload extends assignment_base {
                 }
 
                 if (has_capability('mod/assignment:exportownsubmission', $this->context)) {
-                    $button->set_callback_options('assignment_portfolio_caller', array('id' => $this->cm->id, 'fileid' => $file->get_id()), '/mod/assignment/lib.php');
+                    $button->set_callback_options('assignment_portfolio_caller', array('id' => $this->cm->id, 'fileid' => $file->get_id()), '/mod/assignment/locallib.php');
                     $button->set_format_by_file($file);
                     $output .= $button->to_html(PORTFOLIO_ADD_ICON_LINK);
                 }
                 $output .= '<br />';
             }
             if (count($files) > 1 && has_capability('mod/assignment:exportownsubmission', $this->context)) {
-                $button->set_callback_options('assignment_portfolio_caller', array('id' => $this->cm->id), '/mod/assignment/lib.php');
+                $button->set_callback_options('assignment_portfolio_caller', array('id' => $this->cm->id), '/mod/assignment/locallib.php');
                 $button->reset_formats(); // reset what we set before, since it's multi-file
                 $output .= $button->to_html();
             }