--- trunk/webwork-modperl/conf/global.conf.dist 2005/09/29 22:08:43 3670 +++ trunk/webwork-modperl/conf/global.conf.dist 2005/09/30 19:15:26 3671 @@ -2,7 +2,7 @@ ################################################################################ # WeBWorK Online Homework Delivery System # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ -# $CVSHeader: webwork2/conf/global.conf.dist,v 1.141 2005/09/23 23:31:15 sh002i Exp $ +# $CVSHeader: webwork2/conf/global.conf.dist,v 1.142 2005/09/27 03:58:06 sh002i Exp $ # # 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 @@ -476,81 +476,89 @@ # Authorization system ################################################################################ -# This lets you specify a minimum permission level needed to perform certain -# actions. For each pair in the hash below, in order to perform the action -# described by the key, the user must have a permission level greater than or -# equal to the value. - -my $guest = -5; -my $student = 0; -my $proctor = 2; -my $ta = 5; -my $professor = 10; -my $nobody = undef; +# this section lets you define which groups of users can perform which actions. +# this hash maps a numeric permission level to the name of a role. the number +# assigned to a role is significant -- roles with higher numbers are considered +# "more privileged", and are included when that role is listed for a privilege +# below. +# +%userRoles = ( + guest => -5, + student => 0, + proctor => 2, + ta => 5, + professor => 10, +); + +# this hash maps operations to the roles that are allowed to perform those +# operations. the role listed and any role with a higher permission level (in +# the %userRoles hash) will be allowed to perform the operation. If the role +# is undefined, no users will be allowed to perform the operation. +# %permissionLevels = ( - login => $guest, - report_bugs => $student, - submit_feedback => $student, - change_password => $student, - change_email_address => $student, + login => "guest", + report_bugs => "student", + submit_feedback => "student", + change_password => "student", + change_email_address => "student", - proctor_quiz => $proctor, + proctor_quiz => "proctor", - view_multiple_sets => $ta, - view_unopened_sets => $ta, - view_unpublished_sets => $ta, - view_answers => $ta, + view_multiple_sets => "ta", + view_unopened_sets => "ta", + view_unpublished_sets => "ta", + view_answers => "ta", - become_student => $professor, - access_instructor_tools => $ta, - score_sets => $professor, - send_mail => $professor, - receive_feedback => $ta, + become_student => "professor", + access_instructor_tools => "ta", + score_sets => "professor", + send_mail => "professor", + receive_feedback => "ta", - create_and_delete_problem_sets => $professor, - assign_problem_sets => $professor, - modify_problem_sets => $professor, - modify_student_data => $professor, - modify_classlist_files => $professor, - modify_set_def_files => $professor, - modify_scoring_files => $professor, - modify_problem_template_files => $professor, + create_and_delete_problem_sets => "professor", + assign_problem_sets => "professor", + modify_problem_sets => "professor", + modify_student_data => "professor", + modify_classlist_files => "professor", + modify_set_def_files => "professor", + modify_scoring_files => "professor", + modify_problem_template_files => "professor", - create_and_delete_courses => $professor, - fix_course_databases => $professor, + create_and_delete_courses => "professor", + fix_course_databases => "professor", ##### Behavior of the interactive problem processor ##### - show_correct_answers_before_answer_date => $ta, - show_solutions_before_answer_date => $ta, - avoid_recording_answers => $ta, + show_correct_answers_before_answer_date => "ta", + show_solutions_before_answer_date => "ta", + avoid_recording_answers => "ta", # Below this level, old answers are never initially shown - can_show_old_answers_by_default => $student, + can_show_old_answers_by_default => "student", # at this level, we look at showOldAnswers for default value # even after the due date - can_always_use_show_old_answers_default => $professor, - check_answers_before_open_date => $ta, - check_answers_after_open_date_with_attempts => $ta, - check_answers_after_open_date_without_attempts => $guest, - check_answers_after_due_date => $guest, - check_answers_after_answer_date => $guest, - record_answers_when_acting_as_student => $nobody, + can_always_use_show_old_answers_default => "professor", + check_answers_before_open_date => "ta", + check_answers_after_open_date_with_attempts => "ta", + check_answers_after_open_date_without_attempts => "guest", + check_answers_after_due_date => "guest", + check_answers_after_answer_date => "guest", + record_answers_when_acting_as_student => undef, # "record_answers_when_acting_as_student" takes precedence # over the following for professors acting as students: - record_answers_before_open_date => $nobody, - record_answers_after_open_date_with_attempts => $student, - record_answers_after_open_date_without_attempts => $nobody, - record_answers_after_due_date => $nobody, - record_answers_after_answer_date => $nobody, - dont_log_past_answers => $professor, + record_answers_before_open_date => undef, + record_answers_after_open_date_with_attempts => "student", + record_answers_after_open_date_without_attempts => undef, + record_answers_after_due_date => undef, + record_answers_after_answer_date => undef, + dont_log_past_answers => "professor", ##### Behavior of the Hardcopy Processor ##### - download_hardcopy_multiuser => $ta, - download_hardcopy_multiset => $ta, - download_hardcopy_format_pdf => $guest, - download_hardcopy_format_tex => $ta, + download_hardcopy_multiuser => "ta", + download_hardcopy_multiset => "ta", + download_hardcopy_format_pdf => "guest", + download_hardcopy_format_tex => "ta", ); ################################################################################