--- doc/gutshtml/SessionThree.html 2002/06/28 20:30:29 1.1 +++ doc/gutshtml/SessionThree.html 2003/07/22 14:47:00 1.2 @@ -1 +1,499 @@ - Session Three: Roles and lonnet/loncommon useful functions (Guy)

Session Three: Roles and lonnet/loncommon useful functions (Guy)

NAME

Apache::lonnet - Subroutines to ask questions about things in the network.


SYNOPSIS

Invoked by other LON-CAPA modules, when they need to talk to or about objects in the network.

  &Apache::lonnet::SUBROUTINENAME(ARGUMENTS);

Common parameters:


INTRODUCTION

This module provides subroutines which interact with the lonc/lond (TCP) network layer of LON-CAPA. And Can be used to ask about - classes - users - resources

For many of these objects you can also use this to store data about them or modify them in various ways.

This is part of the LearningOnline Network with CAPA project described at http://www.lon-capa.org.


RETURN MESSAGES


Session Environment Functions

User Information

User Roles

User Modification

Course Infomation

Course Modification

Resource Subroutines

Resource Information

Possible values for $varname are environment.lastname (or other item from the environment hash), user.name (or someother aspect about the user), resource.0.maxtries (or some other part and parameter of a resource)

Storing/Retrieving Data

Network Status Functions

Apache Request

Data to String to Data

Logging Routines

These routines allow one to make log messages in the lonnet.log and lonnet.perm logfiles.

General File Helper Routines

HTTP Helper Routines

 

Private: Underlying communication routines (Shouldn't call)

Private: Resource Access Logging

Private: Other

symblist($mapname,%newhash) : update symbolic storage links

Coding Guidelines

Things to keep in mind while coding handlers for LON-CAPA

1.    DON'T write to Access machine disks with permanent data, use store/restore

2.    DON'T use print(), use $request->print()

3.    DON'T launch children

4.    DO use $Apache::lonnet::perlvar{'lonDaemons'}/tmp for temporary data.

5.    DO query the return value of every file operation.

6.    DO use strict;

7.    DO use strict;

8.    DO familiarize your self with the functions in lonnet.pm and use them to communicate with other servers and when you handler needs to ask questions.

9.     DON'T use &Apache::lonnet::reply()


\ No newline at end of file + + + + + + Session Three: Roles and lonnet/loncommon useful functions (Guy) + + + +

+
+

Session Three: Roles and lonnet/loncommon useful + functions (Guy)

+

NAME

+

Apache::lonnet - Subroutines to ask questions about things in the network.

+
+
+
+

SYNOPSIS

+

Invoked by other LON-CAPA modules, when they need to talk to or about objects + in the network.

+
  &Apache::lonnet::SUBROUTINENAME(ARGUMENTS);
+

Common parameters:

+ +
+
+
+

INTRODUCTION

+

This module provides subroutines which interact with the lonc/lond (TCP) + network layer of LON-CAPA. And Can be used to ask about - classes - users + - resources

+

For many of these objects you can also use this to store data about them + or modify them in various ways.

+

This is part of the LearningOnline Network with CAPA project described at + http://www.lon-capa.org.

+
+
+
+

RETURN MESSAGES

+ +
+
+
+

Session + Environment Functions

+ +

User Information

+ +

User Roles

+ +

User Modification

+ +

Course Infomation

+ +

Course Modification

+ +

Resource Subroutines

+ +

Resource Information

+ +

Possible values for $varname are environment.lastname + (or other item from the environment hash), user.name (or someother aspect + about the user), resource.0.maxtries (or some other part and parameter of + a resource)

+ +

Storing/Retrieving Data

+ +

Network Status + Functions

+ +

Apache Request

+ +

Data to String + to Data

+ +

Logging Routines

+

These routines allow one to make log messages in the lonnet.log and lonnet.perm + logfiles.

+ +

General File + Helper Routines

+ +

HTTP Helper Routines

+ +
+

 

+

Private: Underlying communication routines (Shouldn't call)

+ +

Private: Resource + Access Logging

+ +

Private: Other

+

symblist($mapname,%newhash) : update symbolic storage links

+

Coding Guidelines

+

Things to keep in mind while coding handlers for LON-CAPA

+

1.    + DON'T write to Access machine disks + with permanent data, use store/restore

+

2.    + DON'T use print(), use $request->print()

+

3.    + DON'T launch children

+

4.    + DO use $Apache::lonnet::perlvar{'lonDaemons'}/tmp for temporary data.

+

5.    + DO query the return value of every + file operation.

+

6.    + DO use strict;

+

7.    + DO use strict;

+

8.    + DO familiarize your self with the + functions in lonnet.pm and use them to communicate with other servers and when + you handler needs to ask questions.

+

9.     DON'T use &Apache::lonnet::reply()

+
+
+ +