Permalink
Browse files

Enabling image edit also in student view (Bug #1792)

  • Loading branch information...
1 parent 975dabb commit c1137f58c7408e2ab6052a501d3329c142467d36 julmis committed Aug 27, 2004
Showing with 11 additions and 2 deletions.
  1. +11 −2 lib/editor/popups/insert_image_std.php
@@ -2,12 +2,12 @@
include("../../../config.php");
- require_variable($id);
+ require_variable($id);
if (!$course = get_record("course", "id", $id)) {
$course->fullname = ""; // Just to keep display happy, though browsing may fail
}
-
+
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -23,6 +23,15 @@
function Init() {
__dlg_init();
+ var param = window.dialogArguments;
+ if (param) {
+ var alt = param["f_url"].substring(param["f_url"].lastIndexOf('/') + 1);
+ document.getElementById("f_url").value = param["f_url"];
+ document.getElementById("f_alt").value = param["f_alt"] ? param["f_alt"] : alt;
+ document.getElementById("f_border").value = parseInt(param["f_border"] || 0);
+ document.getElementById("f_vert").value = param["f_vert"] != -1 ? param["f_vert"] : 0;
+ document.getElementById("f_horiz").value = param["f_horiz"] != -1 ? param["f_horiz"] : 0;
+ }
document.getElementById("f_url").focus();
};

0 comments on commit c1137f5

Please sign in to comment.