]> git.mjollnir.org Git - moodle.git/commitdiff
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 b7c6ba5df56c0367fcd4c58631f08d03799a89a6..d93a37dba7558ebb5c3a38d6692ffedd946e6312 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 f8baef1925b41e2f896970a8d116511e7b84bbe7..4dcecfc641dbe950d806a55434f301d6f332628f 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 f5ada80f60bab43ade8229b8409c46633a0863b2..8236e1e81977deb2ab3d56d27bcd0a95af754ae8 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 3d00d6ffd3bfbe1db68346babbefc98d455b3f88..056cfcb12e53381cde2a1410502f6319ae3535b9 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();
             }