[system] / branches / rel-2-3-dev / webwork2 / lib / WeBWorK / CourseEnvironment.pm Repository:
ViewVC logotype

Log of /branches/rel-2-3-dev/webwork2/lib/WeBWorK/CourseEnvironment.pm

Parent Directory Parent Directory


Links to HEAD: (view) (download) (as text) (annotate)
Sticky Revision:

Revision 4396 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 24 21:07:52 2006 UTC (6 years, 9 months ago) by
File length: 11321 byte(s)
Diff to previous 4305
This commit was manufactured by cvs2svn to create branch 'rel-2-3-dev'.

Revision 4305 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 27 01:08:04 2006 UTC (6 years, 10 months ago) by sh002i
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 11321 byte(s)
Diff to previous 3973
remove any symbol that begins with an underscore from the course env.
this is to weed out the weird "_</path/to/database.conf" symbols that
were getting through, but it also prevents the purposeful use of
variables like "_some_internal_thing". which is not so bad.

Revision 3973 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 25 23:13:56 2006 UTC (7 years, 4 months ago) by sh002i
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 11319 byte(s)
Diff to previous 3734
forward-port from rel-2-2-dev: (update copyright date range -- 2000-2006.
this is probably overkill, since there are some files that were created
after 2000 and some files that were last modified before 2006.)

Revision 3734 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 26 16:46:04 2005 UTC (7 years, 7 months ago) by sh002i
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 11319 byte(s)
Diff to previous 3733
cleaned up error reporting for status methods. if arguments are not
defined and non-empty, a warning is given (using "carp") and an
undefined value is returned.

Revision 3733 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 26 16:40:32 2005 UTC (7 years, 7 months ago) by sh002i
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 11217 byte(s)
Diff to previous 3729
possible fix for problem when status_abbrev_has_behavior is used with an
abbrev that doesn't map to any status.

Revision 3729 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 26 16:21:54 2005 UTC (7 years, 7 months ago) by sh002i
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 11042 byte(s)
Diff to previous 3727
changed erorrs to warnings for the time being.

Revision 3727 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 26 15:51:15 2005 UTC (7 years, 7 months ago) by sh002i
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 11058 byte(s)
Diff to previous 3688
added error checking to ensure that arguments to status lookup methods
are defined.

Revision 3688 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 5 18:16:52 2005 UTC (7 years, 8 months ago) by sh002i
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 10179 byte(s)
Diff to previous 3682
Implemented status system as per bug #743.

The status system consists of a new hash in the course environment,
%statuses, that maps status names (like "Enrolled", "Drop", "Audit") to
(a) a list of allowed abbreviations for the status and (b) a list of
behaviors the system should have when dealing with users who have the
status.

I didn't want to have to mangle that hash-of-hashes-of-arrays myself in
many modules, but I also didn't want to devote an entire module
(Status.pm) to it. So, I'm trying a little experiment: I've added them
as methods to WeBWorK::CourseEnvironment. My thinkint is that since all
the data for these operations comes from the course environment, so why
not have them be course environment methods? Here they are:

    status_abbrev_to_name($status_abbrev)
        Given the abbreviation for a status, return the name. Returns undef
        if the abbreviation is not found.

    status_name_to_abbrevs($status_name)
        Returns the list of abbreviations for a given status. Returns an
        empty list if the status is not found.

    status_has_behavior($status_name, $behavior)
        Return true if $status_name lists $behavior.

    status_abbrev_has_behavior($status_abbrev, $behavior)
        Return true if the status abbreviated by $status_abbrev lists
        $behavior.

Since I removed the previous $siteDefaults{status} hash from
global.conf, I have already switched modules that formerly used that
hash over to using the new methods:

Authen.pm: use status_abbrev_has_behavior($status, "allow_course_access")
to determine if a user should be allowed to log in.

Feedback.pm: look up status abbreviation using status_abbrev_to_name()
and print the result for the status field in the email.

Instructor.pm: use status_abbrev_has_behavior($status, "include_in_assignment")
to determine if a user should be included in an assignment.

UserList.pm and UsersAssignedToSet.pm: use status_abbrev_to_name() to
get name of CSS class.

Revision 3682 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Oct 2 19:51:45 2005 UTC (7 years, 8 months ago) by jj
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 7710 byte(s)
Diff to previous 3674
New Config module.  It will put its course settings in a file simple.conf
along side course.conf.  Changes are:

  URLPath.pm: wiring so the Config module can be called

  ContentGenerator.pm: link in left panel to Config module

  CourseEnvironment.pm: evaluate simple.conf.  File name can be specified
    when creating a new CourseEnvironment.  This allows it to be bypassed
    (which is currently used), or to test a simple settings file (not
    used now, but it might be useful).

  Constants.pm: all data about configuration is stored here.  New values
    can just be added here, unless they are a new type.

  Config.pm: new module for limited course configuration.

Note, it might be better to move the new variable in Constants.pm to
another file.  Committing changes to Constants.pm can be an extra
hassle since it contains some site specific configuration.

Revision 3674 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 30 19:32:17 2005 UTC (7 years, 8 months ago) by sh002i
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 7418 byte(s)
Diff to previous 2491
fix error reporting for include() function.

Revision 2491 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 12 02:30:32 2004 UTC (8 years, 11 months ago) by sh002i
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 7720 byte(s)
Diff to previous 2442
MORE CONFIG CHANGES -- PLEASE READ.

I've changed the way WeBWorK is configured yet again. The Apache
configuration for WeBWorK is now done with <Perl> sections. This solves
the problem of "seeding" global.conf with initial values for the various
root directories and base URLs. it also eliminates redundancy in the
Apache configuration file itself.

The Apache configuration for WeBWorK is now contained in the file
conf/webwork.apache-config. This file is used both for normal systems,
where WeBWorK is integrated into the main Apache server, and development
systems, where each developer runs his or her own Apache server.

Inside webwork.apache-config, seven configuation variables are set:

     $webwork_url            The base URL handled by Apache::WeBWorK.
     $webwork_dir            The path to the base webwork2 directory.
     $pg_dir                 The path to the base pg directory.

     $webwork_htdocs_url     The base URL of the WeBWorK htdocs directory.
     $webwork_htdocs_dir     The path to the WeBWorK htdocs directory.

     $webwork_courses_url    The base URL of the WeBWorK courses directory.
     $webwork_courses_dir    The path to the WeBWorK courses directory.

These variables are used to configure the <Location>, Alias, AliasMatch,
and <Directory> directives necessary for WeBWorK operation.
$webwork_root and $pg_root are also used in "use lib" lines to add the
WeBWorK and PG lib directories to @INC.

Additionally, the above values are shared with WeBWorK via the
%WeBWorK::SeedCE hash. WeBWorK.pm passes the contents of this hash
(along with a value for "courseName") to CourseEnvironment.pm when
initializing the course environment. In turn, CourseEnvironment.pm seeds
the course environment namespace with these variables before evaluating
global.conf and course.conf.

Revision 2442 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jul 4 14:04:24 2004 UTC (8 years, 11 months ago) by sh002i
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 6433 byte(s)
Diff to previous 1695
fixed docs, resolving bug #588.

Revision 1695 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jan 3 19:58:15 2004 UTC (9 years, 5 months ago) by sh002i
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 6387 byte(s)
Diff to previous 1663
cleaned up error reporting in the include() function. sadly, it still
doesn't work as expected (see FIXME in the source)

Revision 1663 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 9 01:12:32 2003 UTC (9 years, 6 months ago) by sh002i
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 5744 byte(s)
Diff to previous 1125
Normalized headers. All files now contain the text below as a header.
This is important since all files now (a) use the full name of the
package, (b) assign copyright to "The WeBWorK Project", (c) give the
full path of the file (relative to CVSROOT) instead of simply the file
name, and (d) include license and warranty information.

Here is the new header:

################################################################################
# WeBWorK Online Homework Delivery System
# Copyright © 2000-2003 The WeBWorK Projcct, http://openwebwork.sf.net/
# $CVSHeader$
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of either: (a) the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any later
# version, or (b) the "Artistic License" which comes with this package.
#
# This program 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 either the GNU General Public License or the
# Artistic License for more details.
################################################################################

Revision 1125 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 11 17:48:16 2003 UTC (10 years ago) by sh002i
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 5087 byte(s)
Diff to previous 1119
took out old code.
-sam

Revision 1119 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 11 14:11:41 2003 UTC (10 years ago) by gage
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 5640 byte(s)
Diff to previous 1093
Fixed error in match pattern in include
routine (the ..  should be \.\.)

Added some error messages (sent only to the
log unfortunately) if the config file can't
be evaluated.

One problem with do is that it does not
return error messages. eval does.  I don't
know if it takes more time.
--Mike

Revision 1093 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 9 22:08:57 2003 UTC (10 years ago) by malsyned
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 4988 byte(s)
Diff to previous 1092
&include code now prettier.
-Dennis

Revision 1092 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 9 22:05:01 2003 UTC (10 years ago) by malsyned
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 4995 byte(s)
Diff to previous 1085
&include now works like it's supposed to in the course environment
config files.  Sam will be happy.
-Dennis

Revision 1085 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 9 18:28:46 2003 UTC (10 years ago) by malsyned
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 5011 byte(s)
Diff to previous 1051
I made an &include subroutine available to the global.conf and
course.conf evaluation environments.  It allows the inclusion of files
within the webworkRoot.
-Dennis

Revision 1051 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 6 21:47:51 2003 UTC (10 years ago) by sh002i
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 4398 byte(s)
Diff to previous 798
moved PG modules and macro files from webwork-modperl to pg
-sam

Revision 798 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Mar 21 23:30:16 2003 UTC (10 years, 3 months ago) by sh002i
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 4219 byte(s)
Diff to previous 700
initial support for WWDBv2:
        - DB.pm finished (except for getGlobalUser{Set,Problem} methods)
        - schema modules for password, permission, key, and user with
          WWDBv1 hash-bashed backends
        - GDBM driver
        - wwdb command-line frontend
-sam

Revision 700 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 10 17:28:21 2003 UTC (10 years, 5 months ago) by sh002i
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 4160 byte(s)
Diff to previous 695
"Home" (i.e. no course specified) now redirects to %webworkURLs{home}
-sam

Revision 695 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 8 16:23:52 2003 UTC (10 years, 5 months ago) by sh002i
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 4154 byte(s)
Diff to previous 494
$webworkURLRoot is now taken from Apache::WeBWorK instead of being
specified in global.conf.
-sam

Revision 494 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Aug 21 18:31:20 2002 UTC (10 years, 9 months ago) by sh002i
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 4070 byte(s)
Diff to previous 455
updated copyright header.
-sam

Revision 455 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 5 21:34:18 2002 UTC (10 years, 10 months ago) by sh002i
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 4092 byte(s)
Diff to previous 440
"normalized" files:
- (c) header on all files
- standard order of preamble lines:
	1. (c) header
	2. package PACKAGENAME;
	3. short summary of the package (pod's NAME section)
	4. use - pragmatic modules
	5. use - standard perl modules
	6. use - CPAN modules
	7. use - webwork modules
- ALWAYS use strict and use warnings
- use "use base" rather than "our @ISA"
so now we can be happy.
-sam

Revision 440 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 25 21:45:29 2002 UTC (10 years, 10 months ago) by sh002i
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 4085 byte(s)
Diff to previous 422
cleanup?
-sam

Revision 422 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jul 3 23:22:29 2002 UTC (10 years, 11 months ago) by sh002i
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 2363 byte(s)
Diff to previous 412
moved hash2string and array2string from CourseEnvironment to Utils.
-sam

Revision 412 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 25 20:29:22 2002 UTC (10 years, 11 months ago) by sh002i
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 3210 byte(s)
Diff to previous 401
global: added some new hashes. learn how to use diff.
CourseEnv: new uses WeBWorK::Utils
WW: commented out a silly debugging function
IO: fixed package name
Translator: changed behavior of evaluate_modules and
load_extra_packages: they now update the instance variable directly to
avoid sharing modules that weren't asked for "this time".
-sam

Revision 401 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 24 15:46:36 2002 UTC (10 years, 11 months ago) by sh002i
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 3410 byte(s)
Diff to previous 395
for now, readFile returns false on failure to open file. this is to get
around the $SIG{__DIE__} interception problem.
-sam

Revision 395 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 20 16:41:17 2002 UTC (11 years ago) by sh002i
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 3403 byte(s)
Diff to previous 394
removed the "die" in readFile()
-sam

Revision 394 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 20 16:37:59 2002 UTC (11 years ago) by sh002i
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 3411 byte(s)
Diff to previous 324
fixing eval thingies.
-sam

Revision 324 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu May 30 20:35:13 2002 UTC (11 years ago) by sh002i
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 3401 byte(s)
Diff to previous 319
added hash2string and array2string for debugging!
-sam

Revision 319 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu May 30 19:17:02 2002 UTC (11 years ago) by sh002i
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 2554 byte(s)
Diff to previous 311
takes symbols defined in config files (which are now perl code) as
course environment. ha HA!
-sam

Revision 311 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat May 25 00:40:54 2002 UTC (11 years ago) by sh002i
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 1604 byte(s)
Diff to previous 304
comments to global.conf, fixed new() in courseenv.
-0sam

Revision 304 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu May 23 18:35:16 2002 UTC (11 years ago) by malsyned
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 1568 byte(s)
Diff to previous 283
Added courseName to the $self hash.  That value is obtained from the parameter
passed to new().

Revision 283 - (view) (download) (as text) (annotate) - [select for diffs]
Added Wed May 22 18:44:14 2002 UTC (11 years ago) by malsyned
Original Path: trunk/webwork2/lib/WeBWorK/CourseEnvironment.pm
File length: 1469 byte(s)


This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

Sort log by:

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9