[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm lonpickresource.pm lonquickgrades.pm doc/loncapafiles loncapafiles.lpml
www
www@source.lon-capa.org
Wed, 04 May 2011 01:49:09 -0000
www Wed May 4 01:49:09 2011 EDT
Added files:
/loncom/interface lonpickresource.pm
Modified files:
/doc/loncapafiles loncapafiles.lpml
/loncom/interface loncommon.pm lonquickgrades.pm
Log:
Saving my work: resource/folder picking window
Index: doc/loncapafiles/loncapafiles.lpml
diff -u doc/loncapafiles/loncapafiles.lpml:1.733 doc/loncapafiles/loncapafiles.lpml:1.734
--- doc/loncapafiles/loncapafiles.lpml:1.733 Sat Apr 23 16:02:23 2011
+++ doc/loncapafiles/loncapafiles.lpml Wed May 4 01:49:05 2011
@@ -2,7 +2,7 @@
"http://lpml.sourceforge.net/DTD/lpml.dtd">
<!-- loncapafiles.lpml -->
-<!-- $Id: loncapafiles.lpml,v 1.733 2011/04/23 16:02:23 www Exp $ -->
+<!-- $Id: loncapafiles.lpml,v 1.734 2011/05/04 01:49:05 www Exp $ -->
<!--
@@ -2184,6 +2184,15 @@
<status>works/unverified</status>
</file>
<file>
+<source>loncom/interface/lonpickresource.pm</source>
+<target dist='default'>home/httpd/lib/perl/Apache/lonpickresource.pm</target>
+<categoryname>handler</categoryname>
+<description>
+Handler to pick a resource or folder from the course contents
+</description>
+<status>works/unverified</status>
+</file>
+<file>
<source>loncom/interface/lonpickcourse.pm</source>
<target dist='default'>home/httpd/lib/perl/Apache/lonpickcourse.pm</target>
<categoryname>handler</categoryname>
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1004 loncom/interface/loncommon.pm:1.1005
--- loncom/interface/loncommon.pm:1.1004 Tue May 3 23:51:18 2011
+++ loncom/interface/loncommon.pm Wed May 4 01:49:08 2011
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.1004 2011/05/03 23:51:18 www Exp $
+# $Id: loncommon.pm,v 1.1005 2011/05/04 01:49:08 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -443,10 +443,10 @@
// <![CDATA[
var reseditbrowser;
function openresbrowser(formname,reslink) {
- var url = '/adm/pickresource?form='+formname+'&reslink='.reslink;
+ var url = '/adm/pickresource?form='+formname+'&reslink='+reslink;
var title = 'Resource_Browser';
var options = 'scrollbars=1,resizable=1,menubar=0';
- options += ',width=700,height=600';
+ options += ',width=700,height=500';
reseditbrowser = open(url,title,options,'1');
reseditbrowser.focus();
}
Index: loncom/interface/lonquickgrades.pm
diff -u loncom/interface/lonquickgrades.pm:1.84 loncom/interface/lonquickgrades.pm:1.85
--- loncom/interface/lonquickgrades.pm:1.84 Tue May 3 23:51:19 2011
+++ loncom/interface/lonquickgrades.pm Wed May 4 01:49:08 2011
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Quick Student Grades Display
#
-# $Id: lonquickgrades.pm,v 1.84 2011/05/03 23:51:19 www Exp $
+# $Id: lonquickgrades.pm,v 1.85 2011/05/04 01:49:08 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -653,7 +653,7 @@
}
$r->print('</ul>');
if ($cangrade) {
- $r->print('<br />'.&Apache::loncommon::selectresource_link('quickform','addcont_'.$id.'_res',&mt('Add Problem or Folder')).'<br />'.
+ $r->print('<br />'.&Apache::loncommon::selectresource_link('quickform','addcont_'.$id,&mt('Add Problem or Folder')).'<br />'.
'<input type="hidden" name="addcont_'.$id.'_res" onChange='."'".'this.form.cmd.value="addcont_'.$id.'";this.form.submit();'."' />");
}
$r->print('</td>');
Index: loncom/interface/lonpickresource.pm
+++ loncom/interface/lonpickresource.pm
# The LearningOnline Network with CAPA
# Pick resource or folder in the course
#
# $Id: lonpickresource.pm,v 1.1 2011/05/04 01:49:08 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
# This file is part of the LearningOnline Network with CAPA (LON-CAPA).
#
# LON-CAPA is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# LON-CAPA is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LON-CAPA; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# /home/httpd/html/adm/gpl.txt
#
# http://www.lon-capa.org/
#
#
###############################################################
###############################################################
package Apache::lonpickresource;
use strict;
use Apache::Constants qw(:common);
use Apache::loncommon;
use Apache::lonnet;
use Apache::lonlocal;
use Apache::lonroles;
use Apache::lonuserutils;
use Apache::lonstathelpers;
use LONCAPA;
sub handler {
my $r = shift;
&Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
return OK if $r->header_only;
# ------------------------------------------------------------ Print the screen
$r->print(&Apache::loncommon::start_page("Selecting Resource",undef,
{'no_nav_bar' => 1}));
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['form','reslink']);
my $form='opener.document.'.$env{'form.form'};
my $reslink=$env{'form.reslink'};
$r->print('<form name="pickresource" action="/adm/pickresource">');
$r->print(&Apache::lonstathelpers::problem_selector('.',undef,1,1,'resource'));
$r->print('<input type="button" value="'.&mt('Pick').
'" onClick="if (this.form.resourcesymb.value!=null) { '.
$form.'.resourcesymb.value=this.form.resourcesymb.value;'.
$form.".cmd.value='".$reslink."';} window.close();".'" />');
$r->print('</form>');
$r->print(&Apache::loncommon::end_page());
return OK;
}
1;