[LON-CAPA-cvs] cvs: loncom /interface londocs.pm
www
lon-capa-cvs@mail.lon-capa.org
Tue, 13 May 2003 15:41:20 -0000
www Tue May 13 11:41:20 2003 EDT
Modified files:
/loncom/interface londocs.pm
Log:
Button to insert new uploaded problem. No way to edit or generate such a file
yet. Appears to be working when copying an existing problem file by hand into
the user space, but needs to be tested between different machines.
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.54 loncom/interface/londocs.pm:1.55
--- loncom/interface/londocs.pm:1.54 Thu May 1 12:13:50 2003
+++ loncom/interface/londocs.pm Tue May 13 11:41:20 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.54 2003/05/01 16:13:50 www Exp $
+# $Id: londocs.pm,v 1.55 2003/05/13 15:41:20 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -574,6 +574,15 @@
}
}
+function makesmpproblem() {
+ var title=prompt('Listed Title for the Problem');
+ if (title) {
+ this.document.forms.newsmpproblem.importdetail.value=
+ title+'=/adm/wrapper/uploaded/$udom/$uname/$now.problem';
+ this.document.forms.newsmpproblem.submit();
+ }
+}
+
function makebulboard() {
var title=prompt('Listed Title for the Bulletin Board');
if (title) {
@@ -732,6 +741,13 @@
<input type=hidden name="importdetail" value="">
<input name="newsmppg" type="button" value="Simple Page"
onClick="javascript:makesmppage();" /> $help{'Creating_From_Template'}
+</form>
+<form action="/adm/coursedocs" method="post" name="newsmpproblem">
+<input type="hidden" name="folder" value="$folder">
+<input type="hidden" name="foldername" value="$ENV{'form.foldername'}">
+<input type=hidden name="importdetail" value="">
+<input name="newsmpproblem" type="button" value="Simple Problem"
+onClick="javascript:makesmpproblem();" /> $help{'Creating_From_Template'}
</form>
<form action="/adm/coursedocs" method="post" name="newbul">
<input type="hidden" name="folder" value="$folder">