--- loncom/interface/londocs.pm 2009/10/31 19:58:48 1.409
+++ loncom/interface/londocs.pm 2009/12/07 02:22:24 1.411.2.1
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.409 2009/10/31 19:58:48 raeburn Exp $
+# $Id: londocs.pm,v 1.411.2.1 2009/12/07 02:22:24 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2478,7 +2478,7 @@ ENDHEADERS
('select_form_order' =>
['',1..$currentversion,'mostrecent'],
'' => '',
- 'mostrecent' => 'most recent',
+ 'mostrecent' => &mt('most recent'),
map {$_,$_} (1..$currentversion))));
$r->print('
| ');
my $lastold=1;
@@ -2618,6 +2618,14 @@ sub handler {
return OK if $r->header_only;
my $crstype = &Apache::loncommon::course_type();
+ my $coursedom=$env{'course.'.$env{'request.course.id'}.'.domain'};
+ if ($coursedom eq 'gcitest') {
+ my $allowed=&Apache::lonnet::allowed('mdc',$env{'request.course.id'});
+ if ($allowed) {
+ &concept_test_builder($r);
+ return OK;
+ }
+ }
# --------------------------------------------- Initialize help topics for this
foreach my $topic ('Adding_Course_Doc','Main_Course_Documents',
@@ -2972,9 +2980,9 @@ FUFORM
SEDFFORM
my @simpleeditdefaultforma = (
- { '' => "$uploadtag$lt{'srch'}" },
- { '' => "$lt{'impo'}$help{'Importing_LON-CAPA_Resource'}" },
- { '' => "$lt{'book'}" },
+ { '' => "$uploadtag$lt{'srch'}" },
+ { '' => "$lt{'impo'}$help{'Importing_LON-CAPA_Resource'}" },
+ { '' => "$lt{'book'}" },
);
$simpleeditdefaultform .= create_form_ul(create_list_elements(@simpleeditdefaultforma));
$simpleeditdefaultform .=(<
NGFFORM
@specialdocumentsforma=(
- {''=>$newpageform},
- {''=>$newsylform},
- {''=>$newgroupfileform},
+ {''=>$newpageform},
+ {''=>$newsylform},
+ {''=>$newgroupfileform},
);
}
- push @specialdocumentsforma, ({''=>$newnavform},
- {''=>$newsmppageform},
- {''=>$newsmpproblemform},
- {''=>$newdropboxform},
- {''=>$newexuploadform},
- {''=>$newbulform},
- {''=>$newaboutmeform},
- {''=>$newaboutsomeoneform},
- {''=>$newrosterform},);
+ push @specialdocumentsforma, ({''=>$newnavform},
+ {''=>$newsmppageform},
+ {''=>$newsmpproblemform},
+ {''=>$newdropboxform},
+ {''=>$newexuploadform},
+ {''=>$newbulform},
+ {''=>$newaboutmeform},
+ {''=>$newaboutsomeoneform},
+ {''=>$newrosterform},);
$specialdocumentsform = create_form_ul(create_list_elements(@specialdocumentsforma));
if($env{'form.pagepath'}) {
@specialdocumentsforma=(
- {''=>$newsmpproblemform},
- {''=>$newexuploadform}
+ {''=>$newsmpproblemform},
+ {''=>$newexuploadform}
);
$specialdocumentsform= create_form_ul(create_list_elements(@specialdocumentsforma));
}
my @tools = (
- {''=>$extresourcesform},
- {''=>$imspform},
- {''=>$recoverform},
+ {''=>$extresourcesform},
+ {''=>$imspform},
+ {''=>$recoverform},
);
my %orderhash = (
@@ -3409,9 +3417,9 @@ SNAMFORM
my @specialdocs = (
- {''=>$supnewextform},
- {''=>$supnewsylform},
- {''=>$supnewaboutmeform},
+ {''=>$supnewextform},
+ {''=>$supnewsylform},
+ {''=>$supnewaboutmeform},
);
my %suporderhash = (
'00' => ['Supnewfolder', $supnewfolderform],
@@ -3473,15 +3481,15 @@ sub generate_admin_options {
my $dumpbut=&dumpbutton();
my $exportbut=&exportbutton();
my @list = (
- {''=>"$lt{'vc'}$help{'Verify_Content'}"},
- {''=>"$lt{'cv'}$help{'Check_Resource_Versions'}"},
+ {''=>"$lt{'vc'}$help{'Verify_Content'}"},
+ {''=>"$lt{'cv'}$help{'Check_Resource_Versions'}"},
);
if($dumpbut ne ''){
- push @list, {''=>$dumpbut};
+ push @list, {''=>$dumpbut};
}
- push @list, ({''=>$exportbut},
- {''=>"$lt{'ls'}"},
- {''=>"$lt{'sl'}"},
+ push @list, ({''=>$exportbut},
+ {''=>"$lt{'ls'}"},
+ {''=>"$lt{'sl'}"},
);
return '';
@@ -3532,6 +3540,20 @@ sub generate_edit_table {
return $form;
}
+sub concept_test_builder {
+ my ($r) = @_;
+ $r->print(&Apache::loncommon::start_page('Assemble Test'));
+ &Apache::londocsgci::setdefaults();
+ if ($env{'form.phase'} eq 'storemap') {
+ &Apache::londocsgci::evaluate();
+ &Apache::londocsgci::store($r);
+ }
+ &Apache::londocsgci::load();
+ &Apache::londocsgci::listresources($r);
+ $r->print(&Apache::loncommon::end_page());
+ return;
+}
+
sub editing_js {
my ($udom,$uname) = @_;
my $now = time();