]> git.mjollnir.org Git - moodle.git/commitdiff
Dialog update for students view
authorjulmis <julmis>
Mon, 23 Feb 2004 15:33:32 +0000 (15:33 +0000)
committerjulmis <julmis>
Mon, 23 Feb 2004 15:33:32 +0000 (15:33 +0000)
Original smaller dialogs for students.

lib/editor/htmlarea.php

index a529a154f5f9362c25d9a3030eb717e28a2aaea8..f229ea0a755eb2472ae6452aca79e75f2358aec9 100644 (file)
@@ -1430,7 +1430,12 @@ HTMLArea.prototype._createLink = function(link) {
                f_title  : link.title,
                f_target : link.target
        };
-       this._popupDialog("link.php?id=<?php print($id);?>", function(param) {
+       this._popupDialog("<?php
+       if(isteacher($id)) {
+       echo "link.php?id=$id";
+       } else {
+       echo "link_std.php?id=$id";
+       }?>", function(param) {
                if (!param)
                        return false;
                var a = link;
@@ -1474,7 +1479,12 @@ HTMLArea.prototype._insertImage = function(image) {
                f_width  : image.width,
                f_height : image.height
        };
-       this._popupDialog("insert_image.php?id=<?php echo $id ?>", function(param) {
+       this._popupDialog("<?php
+       if(isteacher($id)) {
+       echo "insert_image.php?id=$id";
+       } else {
+       echo "insert_image_std.php?id=$id";
+       }?>", function(param) {
                if (!param) {   // user must have pressed Cancel
                        return false;
                }