MDL-28221 resource: fixed a typo in variable names
authorDavid Mudrak <david@moodle.com>
Mon, 11 Jul 2011 10:04:18 +0000 (12:04 +0200)
committerDavid Mudrak <david@moodle.com>
Mon, 11 Jul 2011 21:30:28 +0000 (23:30 +0200)
mod/resource/lib.php
mod/resource/locallib.php
mod/resource/mod_form.php

index be79a32..03c3b72 100644 (file)
@@ -82,7 +82,7 @@ function resource_get_post_actions() {
  * Add resource instance.
  * @param object $data
  * @param object $mform
- * @return int new resoruce instance id
+ * @return int new resource instance id
  */
 function resource_add_instance($data, $mform) {
     global $CFG, $DB;
index 55f6ef8..7690c2c 100644 (file)
@@ -322,11 +322,11 @@ function resource_print_intro($resource, $cm, $course, $ignoresettings=false) {
 function resource_print_tobemigrated($resource, $cm, $course) {
     global $DB, $OUTPUT;
 
-    $resoruce_old = $DB->get_record('resource_old', array('oldid'=>$resource->id));
+    $resource_old = $DB->get_record('resource_old', array('oldid'=>$resource->id));
     resource_print_header($resource, $cm, $course);
     resource_print_heading($resource, $cm, $course);
     resource_print_intro($resource, $cm, $course);
-    echo $OUTPUT->notification(get_string('notmigrated', 'resource', $resoruce_old->type));
+    echo $OUTPUT->notification(get_string('notmigrated', 'resource', $resource_old->type));
     echo $OUTPUT->footer();
     die;
 }
@@ -341,11 +341,11 @@ function resource_print_tobemigrated($resource, $cm, $course) {
 function resource_print_filenotfound($resource, $cm, $course) {
     global $DB, $OUTPUT;
 
-    $resoruce_old = $DB->get_record('resource_old', array('oldid'=>$resource->id));
+    $resource_old = $DB->get_record('resource_old', array('oldid'=>$resource->id));
     resource_print_header($resource, $cm, $course);
     resource_print_heading($resource, $cm, $course);
     resource_print_intro($resource, $cm, $course);
-    echo $OUTPUT->notification(get_string('notmigrated', 'resource', $resoruce_old->type));
+    echo $OUTPUT->notification(get_string('notmigrated', 'resource', $resource_old->type));
     echo $OUTPUT->footer();
     die;
 }
index c5e73d3..8e76f49 100644 (file)
@@ -39,8 +39,8 @@ class mod_resource_mod_form extends moodleform_mod {
 
         if ($this->current->instance and $this->current->tobemigrated) {
             // resource not migrated yet
-            $resoruce_old = $DB->get_record('resource_old', array('oldid'=>$this->current->instance));
-            $mform->addElement('static', 'warning', '', get_string('notmigrated', 'resource', $resoruce_old->type));
+            $resource_old = $DB->get_record('resource_old', array('oldid'=>$this->current->instance));
+            $mform->addElement('static', 'warning', '', get_string('notmigrated', 'resource', $resource_old->type));
             $mform->addElement('cancel');
             $this->standard_hidden_coursemodule_elements();
             return;