--- loncom/lonnet/perl/lonnet.pm 2005/04/29 18:38:13 1.630 +++ loncom/lonnet/perl/lonnet.pm 2005/05/02 23:34:43 1.631 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.630 2005/04/29 18:38:13 banghart Exp $ +# $Id: lonnet.pm,v 1.631 2005/05/02 23:34:43 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2614,8 +2614,23 @@ sub put { return &reply("put:$udomain:$uname:$namespace:$items",$uhome); } -# ---------------------------------------------------------- putstore interface - +# ------------------------------------------------------------ newput interface + +sub newput { + my ($namespace,$storehash,$udomain,$uname)=@_; + if (!$udomain) { $udomain=$env{'user.domain'}; } + if (!$uname) { $uname=$env{'user.name'}; } + my $uhome=&homeserver($uname,$udomain); + my $items=''; + foreach my $key (keys(%$storehash)) { + $items.=&escape($key).'='.&freeze_escape($$storehash{$key}).'&'; + } + $items=~s/\&$//; + return &reply("newput:$udomain:$uname:$namespace:$items",$uhome); +} + +# --------------------------------------------------------- putstore interface + sub putstore { my ($namespace,$storehash,$udomain,$uname)=@_; if (!$udomain) { $udomain=$env{'user.domain'}; } @@ -6178,7 +6193,10 @@ revokecustomrole($udom,$uname,$url,$role =item * -coursedescription($courseid) : course description +coursedescription($courseid) : returns a hash of information about the +specified course id, including all environment settings for the +course, the description of the course will be in the hash under the +key 'description' =item *