diff --git a/mod/resource/lib.php b/mod/resource/lib.php
index <HASH>..<HASH> 100644
--- a/mod/resource/lib.php
+++ b/mod/resource/lib.php
@@ -293,7 +293,7 @@ function add_instance($resource) {
         $resource->alltext = '';  
     }
 
-    if (!isset($recourse->popup)) {
+    if (!isset($resource->popup)) {
         $resource->popup = '';  
     }
MDL-<I> resource "Link to a file or web site", when created, doesn't open in a new window - fixed recourse typo