[LON-CAPA-cvs] cvs: loncom /imspackages imsimportdocs.pm
bisitz
bisitz@source.lon-capa.org
Fri, 06 Nov 2009 17:16:53 -0000
bisitz Fri Nov 6 17:16:53 2009 EDT
Modified files:
/loncom/imspackages imsimportdocs.pm
Log:
Optimizations for IMS upload to course docs, part 1 (display_one):
- Replaced hardcoded HTML code by standard topic_bar calls
- No special font/... needed
- Added missing &mt() calls
- Wrapped warning messages in paragraphs and added warning style
- Consistent wording: "Exit now" -> just "Cancel"
- Removed unneccessary text which says in simple words: "Click upload to upload"
- Added "File: " in front of file selection box
- XHTML: lower case HTML attributes
Index: loncom/imspackages/imsimportdocs.pm
diff -u loncom/imspackages/imsimportdocs.pm:1.23 loncom/imspackages/imsimportdocs.pm:1.24
--- loncom/imspackages/imsimportdocs.pm:1.23 Mon Aug 17 03:52:09 2009
+++ loncom/imspackages/imsimportdocs.pm Fri Nov 6 17:16:53 2009
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: imsimportdocs.pm,v 1.23 2009/08/17 03:52:09 raeburn Exp $
+# $Id: imsimportdocs.pm,v 1.24 2009/11/06 17:16:53 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -207,96 +207,38 @@
my ($r) = @_;
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['folder']);
- $r->print(<<ENDBLOCK);
-<form action="/adm/imsimportdocs" method="post" enctype="multipart/form-data" name="pickcms">
- <table border='0' bgcolor='#F6F6F6' cellspacing='0' cellpadding ='0' width='100%'>
- <tr>
- <td colspan='2'>
- <table border='0' cellspacing='0' cellpadding='0'>
- <tr>
- <td colspan='2' align='left'>
- </td>
- </tr>
- <tr bgcolor='#CCCCFF'>
- <td valign="middle"><img src="/res/adm/pages/bl_step1.gif" alt="1" />
- </td>
- <td width='100%' align='left'>
- <font face='arial,helvetica,sans-serif'><b>Specify the Course Management system used to create the package.</b>
- </font>
- </td>
- </tr>
- <tr>
- <td colspan='2'> </td>
- </tr>
- <tr>
- <td> </td>
- <td>
- <font face='Arial,Helvetica,sans-serif'>
-Please choose the CMS used to create your IMS content package.
- <select name="source">
- <option value='-1' selected="true">Please select</option>
- <option value='bb5'>Blackboard 5</option>
- <option value='bb6'>Blackboard 6</option>
- <option value='angel5'>ANGEL 5.5</option>
- <option value='webctce4'>WebCT 4 Campus Edition</option>
- </select>
- </font>
- </td>
- </tr>
- <tr>
- <td colspan='2'> </td>
- </tr>
- <tr>
- <td colspan='2'> </td>
- </tr>
- <tr bgcolor='#CCCCFF'>
- <td valign="middle"><img src="/res/adm/pages/bl_step2.gif" alt="2" />
- </td>
- <td width='100%' align='left'>
- <font face='arial,helvetica,sans-serif'><b>Locate the IMS content package you wish to upload.</b>
- </font>
- </td>
- </tr>
- <tr>
- <td colspan='2'> </td>
- </tr>
- <tr>
- <td colspan='2'>
- <input type="hidden" name="folder" value="$env{'form.folder'}" />
- <input type="hidden" name="phase" value="two" />
- <input type="file" name="uploadname" size="40" />
- </td>
- </tr>
- <tr>
- <td colspan='2'> </td>
- </tr>
- <tr>
- <td> </td>
- <td><font face='arial,helvetica,sans-serif'>If you have selected the CMS, and located the IMS package, you should click the 'Upload IMS package' button to upload the file to the server.</font></td>
- </tr>
- <tr>
- <td colspan='2'> </td>
- </tr>
- <tr
- <td colspan='2'>
- <table border='0' cellspacing='0' cellpadding='0' width="100%">
- <tr>
- <td align='left'>
- <input type="button" name="exitpage" value="Exit now" onClick="javascript:self.close()" />
- </td>
- <td align='right'>
- <input type="button" name="nextpage" value="Upload IMS package" onClick="javascript:nextPage()" />
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
-</form>
-ENDBLOCK
+ $r->print(
+ '<form action="/adm/imsimportdocs" method="post"'
+ .' enctype="multipart/form-data" name="pickcms">'
+ .&Apache::lonhtmlcommon::topic_bar(
+ 1,&mt('Specify the Course Management system used to create the package'))
+ .&mt('Please choose the CMS used to create your IMS content package:').' '
+ .'<select name="source">'
+ .'<option value="-1" selected="selected">'.&mt('Please select').'</option>'
+ .'<option value="bb5">Blackboard 5</option>'
+ .'<option value="bb6">Blackboard 6</option>'
+ .'<option value="angel5">ANGEL 5.5</option>'
+ .'<option value="webctce4">WebCT 4 Campus Edition</option>'
+ .'</select>'
+ );
+ $r->print(
+ &Apache::lonhtmlcommon::topic_bar(
+ 2,&mt('Locate the IMS content package you wish to upload'))
+ .'<input type="hidden" name="folder" value="'.$env{'form.folder'}.'" />'
+ .'<input type="hidden" name="phase" value="two" />'
+ .&mt('File:')
+ .' <input type="file" name="uploadname" size="40" />'
+ );
+ $r->print(
+ '<hr />'
+ .'<p>'
+ .'<input type="button" name="exitpage" value="'.&mt('Cancel').'"'
+ .' onclick="javascript:self.close()" />'
+ .' '
+ .'<input type="button" name="nextpage" value="'.&mt('Upload IMS package').'"'
+ .' onclick="javascript:nextPage()" />'
+ .'</p>'
+ );
}
@@ -442,7 +384,7 @@
<td valign="middle"><img src="/res/adm/pages/bl_step4.gif" alt="4" />
</td>
<td width='100%' align='left'>
- <font face='arial,helvetica,sans-serif'><b>Choose display options for listing of contents of top level of package.</b></font>
+ <font face='arial,helvetica,sans-serif'><b>Choose display options for listing of contents of top level of package</b></font>
</td>
</tr>
<tr>
@@ -481,7 +423,7 @@
<table border='0' cellspacing='0' cellpadding='0' width="100%">
<tr>
<td align='left'>
- <input type='button' name='exitpage' value='Exit now' onClick="javascript:self.close()" />
+ <input type='button' name='exitpage' value='Cancel' onClick="javascript:self.close()" />
</td>
<td align='right'>
<input type="button" name="nextpage" value="Complete Import" onClick="javascript:nextPage($counter)" />
@@ -496,10 +438,19 @@
</table>
ENDDOCUMENT
} else {
- $r->print("Unpacking of your IMS package failed because an IMS manifest file was not located in the package\n");
+ $r->print(
+ '<p class="LC_warning">'
+ .&mt('Unpacking of your IMS package failed because an IMS manifest file was not located in the package.')
+ .'</p>'
+ );
}
} else {
- $r->print("Processing of your IMS package failed because the file you uploaded could not be unzipped\n");
+ $r->print(
+ '<p class="LC_warning">'
+ .&mt('Processing of your IMS package failed because the file you'
+ .' uploaded could not be unzipped.')
+ .'</p>'
+ );
}
}