--- loncom/publisher/publisher.html 2003/09/11 21:02:38 1.33 +++ loncom/publisher/publisher.html 2004/04/07 18:02:47 1.37 @@ -18,7 +18,7 @@ function getfilename() { (document.publisher.filename.value.indexOf('/adm/pubdir')==-1)) { document.publisher.submit(); } else { - alert('Cannot publish directory'); + alert('MT{Cannot publish directory}'); } } @@ -44,21 +44,21 @@ function getrfilename() { (document.rpublisher.filename.value.indexOf('/adm/pubdir')==-1)) { document.rpublisher.submit(); } else { - alert('Cannot retrieve directory'); + alert('MT{Cannot retrieve directory}'); } } function getactionfilename() { document.fileaction.filename.value=frameloc(); var test=document.fileaction.action.selectedIndex; - if (test == 4) { // trying to create a directory + if (test == 8) { // trying to create a directory if (document.fileaction.filename.value.indexOf('/adm/pubdir')!=-1) { document.fileaction.filename.value=document.dpublisher.filename.value; } if ((document.fileaction.filename.value.charAt( document.fileaction.filename.value.length-1)!='/') && (document.fileaction.filename.value.indexOf('/adm/pubdir')==-1)) { - alert('Must create new subdirectory inside a directory'); + alert('MT{Must create new subdirectory inside a directory}'); return; } } @@ -81,9 +81,27 @@ function getcurseed() { return 0; } +function getproblemtype() { + if (parent.LONCAPAToBePublished.document.lonhomework) { + var optionelement; + var valueIndex=0; + for (var optionIndex=0; + optionIndex < parent.LONCAPAToBePublished.document.lonhomework.problemtype.options.length; + optionIndex++) + { + optionElement=parent.LONCAPAToBePublished.document.lonhomework.problemtype.options[optionIndex]; + if (optionElement.selected) { + return optionElement.value; + } + } + } + return 0; +} + function getpostdata() { document.printout.postdata.value=frameloc(); document.printout.curseed.value=getcurseed(); + document.printout.problemtype.value=getproblemtype(); document.printout.submit(); } @@ -95,13 +113,13 @@ function getpostdata() {
- +
- +
- +
- + +
@@ -125,14 +144,14 @@ function getpostdata() {
- +
- +
@@ -140,19 +159,19 @@ function getpostdata() {    + + + + + + + + + + + + +