[LON-CAPA-cvs] cvs: loncom(GCI_3) /interface londocs.pm
raeburn
raeburn@source.lon-capa.org
Mon, 08 Nov 2010 19:47:04 -0000
raeburn Mon Nov 8 19:47:04 2010 EDT
Modified files: (Branch: GCI_3)
/loncom/interface londocs.pm
Log:
- Customization for GCI_3
- Creation of Concept Tests: menu to choose to upload classlist csv file
after user-defined concept test has been stored.
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.411.2.5 loncom/interface/londocs.pm:1.411.2.6
--- loncom/interface/londocs.pm:1.411.2.5 Sun Sep 19 14:49:17 2010
+++ loncom/interface/londocs.pm Mon Nov 8 19:47:04 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.411.2.5 2010/09/19 14:49:17 raeburn Exp $
+# $Id: londocs.pm,v 1.411.2.6 2010/11/08 19:47:04 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3545,6 +3545,30 @@
sub concept_test_builder {
my ($r,$cdom,$cnum) = @_;
&Apache::londocsgci::setdefaults();
+ if ($env{'form.context'} eq 'requestcrs') {
+ if ($env{'form.phase'} eq 'storemap') {
+ &Apache::londocsgci::evaluate();
+ my $error = &Apache::londocsgci::store('requestcrs',$cdom,$cnum);
+ my $output = '<p>';
+ if ($error) {
+ $output .= '<span class="LC_error">'.
+ &mt('An error occurred saving your concept test: [_1].',$error).
+ '</span>';
+ } else {
+ &Apache::lonuserstate::readmap($cdom.'/'.$cnum);
+ $output .= &mt('Your concept test has been saved.');
+ }
+ $output .= '</p>';
+ if (&Apache::lonrequestcourse::generate_page($r,'new','chooseitems')) {
+ my $formname = 'requestcrs';
+ $r->print('<br /><form name="'.$formname.'" method="post" action="/adm/requestcourse">');
+ my $title = &mt('Concept Test Created');
+ &Apache::lonrequestcourse::roster_upload_form($r,$output,$formname,$title);
+ }
+ $r->print(&Apache::loncommon::end_page());
+ return;
+ }
+ }
my $js = '
<script type="text/javascript">
// <![CDATA[