You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(58) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(53) |
Feb
(56) |
Mar
|
Apr
|
May
(30) |
Jun
(78) |
Jul
(121) |
Aug
(155) |
Sep
(77) |
Oct
(61) |
Nov
(45) |
Dec
(94) |
2006 |
Jan
(116) |
Feb
(33) |
Mar
(11) |
Apr
(23) |
May
(60) |
Jun
(89) |
Jul
(130) |
Aug
(109) |
Sep
(124) |
Oct
(63) |
Nov
(82) |
Dec
(45) |
2007 |
Jan
(31) |
Feb
(35) |
Mar
(123) |
Apr
(36) |
May
(18) |
Jun
(134) |
Jul
(133) |
Aug
(241) |
Sep
(126) |
Oct
(31) |
Nov
(15) |
Dec
(5) |
2008 |
Jan
(11) |
Feb
(6) |
Mar
(16) |
Apr
(29) |
May
(43) |
Jun
(149) |
Jul
(27) |
Aug
(29) |
Sep
(37) |
Oct
(20) |
Nov
(4) |
Dec
(6) |
2009 |
Jan
(34) |
Feb
(30) |
Mar
(16) |
Apr
(6) |
May
(1) |
Jun
(32) |
Jul
(22) |
Aug
(7) |
Sep
(18) |
Oct
(50) |
Nov
(22) |
Dec
(8) |
2010 |
Jan
(17) |
Feb
(15) |
Mar
(10) |
Apr
(9) |
May
(67) |
Jun
(30) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
(1) |
Dec
|
From: Sam H. v. a. <we...@ma...> - 2006-01-13 21:14:54
|
Log Message: ----------- LICENSE/README for 2.2-pre1. updated version number to 2.2-pre1 updated copyright date range to 2000-2006. updated README text to PGLanguageRelease2pt2pre1 Tags: ---- rel-2-2-dev Modified Files: -------------- pg: LICENSE README Revision Data ------------- Index: README =================================================================== RCS file: /webwork/cvs/system/pg/README,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -LREADME -LREADME -u -r1.1 -r1.1.4.1 --- README +++ README @@ -1,58 +1,46 @@ - WeBWorK Program Generation Language - Version 2.1 + Version 2.2-pre1 - Copyright 2000-2004, The WeBWorK Project + Copyright 2000-2006, The WeBWorK Project All rights reserved. Introduction - The [7]WeBWorKTeam is pleased to announce the release of version 2.1 - of the WeBWorK Program Generating Language (PG). This release includes - new features and bug fixes: - - * New [8]mathematical-expression parser (for use in writing PG - problems). - * Fixed generation of LaTeX version of sqrt. - * Fixed implementation of useBaseTenLog flag. - * Make combinations function C(n,k) return 0 when k>n, which is - standard. - * Fixed error when using cplx_cmp. - - (Contributiors: please feel free to add anything I've forgotten.) + This is a test prerelease of the upcoming WeBWorK Program Generating + Language (PG) 2.2. It contains numerous improvements over PG 2.1.3. Availability PG is distributed as a tarball. It is available on our SourceForge project page: - [9]http://sourceforge.net/project/showfiles.php?group_id=93112 + [1]http://sourceforge.net/project/showfiles.php?group_id=93112 To use this library, you will probably want to download WeBWorK. See - [10]AvailableVersions for more information. + [2]AvailableVersions for more information. - Installation directly from CVS is also possible. Refer to the - [11]InstallationManualV2pt1 for more information. + Installing directly from CVS is also possible. Refer to the + [3]InstallationManualV2pt2 for more information. Installation Documentation on installing and configuring PG is available in the - WeBWorK [12]InstallationManualV2pt1. If you are upgrading an existing - installation, be sure to read the section [13]Upgrading an existing + WeBWorK [4]InstallationManualV2pt2. If you are upgrading an existing + installation, be sure to read the section [5]Upgrading an existing WeBWorK installation. Help - If you need help installing or using PG 2.1, consult [14]WeBWorKDocs - and [15]WeBWorKFAQs. + If you need help installing or using PG 2.2, consult [6]WeBWorKDocs + and [7]WeBWorKFAQs. - You can also visit the [16]WeBWorK discussion group and post your + You can also visit the [8]WeBWorK discussion group and post your question there. The developers monitor this forum. Bug Reports & Feature Requests Submit bug reports and feature requests at - [17]http://bugs.webwork.rochester.edu/. We can't fix bugs and add + [9]http://bugs.webwork.rochester.edu/. We can't fix bugs and add features if you don't tell us about them! Patches @@ -61,22 +49,17 @@ CVS code, you save us and yourself time. A bug in this release may be fixed in CVS, and we can more easily handle patches against the latest code. Check out the latest development version from CVS and patch - against that. Consult the [18]WeBWorKCVS topic for more information. - - -- [19]SamHathaway - 28 Oct 2004 + against that. Consult the [10]WeBWorKCVS topic for more information. References - 7. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/WeBWorKTeam - 8. http://devel.webwork.rochester.edu/doc/cvs/webwork2_rel-2-1/doc/parser/ - 9. http://sourceforge.net/project/showfiles.php?group_id=93112 - 10. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/AvailableVersions - 11. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/InstallationManualV2pt1 - 12. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/InstallationManualV2pt1 - 13. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/InstallationManualV2pt1#Upgrading_an_existing_WeBWorK_in - 14. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/WeBWorKDocs - 15. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/WeBWorKFAQs - 16. http://webhost.math.rochester.edu/webworkdocs/discuss/ - 17. http://bugs.webwork.rochester.edu/ - 18. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/WeBWorKCVS - 19. http://devel.webwork.rochester.edu/twiki/bin/view/Main/SamHathaway + 1. http://sourceforge.net/project/showfiles.php?group_id=93112 + 2. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/AvailableVersions + 3. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/InstallationManualV2pt2 + 4. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/InstallationManualV2pt2 + 5. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/InstallationManualV2pt2#Upgrading_an_existing_WeBWorK_in + 6. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/WeBWorKDocs + 7. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/WeBWorKFAQs + 8. http://webhost.math.rochester.edu/webworkdocs/discuss/ + 9. http://bugs.webwork.rochester.edu/ + 10. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/WeBWorKCVS Index: LICENSE =================================================================== RCS file: /webwork/cvs/system/pg/LICENSE,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -LLICENSE -LLICENSE -u -r1.1 -r1.1.4.1 --- LICENSE +++ LICENSE @@ -1,9 +1,8 @@ - WeBWorK Program Generation Language - Version 2.1 + Version 2.2-pre1 - Copyright 2000-2004, The WeBWorK Project + Copyright 2000-2006, The WeBWorK Project All rights reserved. This program is free software; you can redistribute it and/or modify |
From: Sam H. v. a. <we...@ma...> - 2006-01-13 21:14:36
|
Log Message: ----------- LICENSE/README for 2.2-pre1. updated version number to 2.2-pre1 updated copyright date range to 2000-2006. updated README text to PGLanguageRelease2pt2pre1 Tags: ---- rel-2-2-dev Modified Files: -------------- webwork2: LICENSE README Revision Data ------------- Index: README =================================================================== RCS file: /webwork/cvs/system/webwork2/README,v retrieving revision 1.12 retrieving revision 1.12.2.1 diff -LREADME -LREADME -u -r1.12 -r1.12.2.1 --- README +++ README @@ -1,80 +1,102 @@ WeBWorK Online Homework Delivery System - Version 2.1 + Version 2.2-pre1 - Copyright 2000-2004, The WeBWorK Project + Copyright 2000-2006, The WeBWorK Project All rights reserved. Introduction - The [8]WeBWorKTeam is pleased to announce the release of WeBWorK 2.1. - This release includes new functionality and enhancements to the user - interface, database system, and PG language: - - * New sql_single database layout, for more efficient access to SQL - databases. - * New [9]mathematical-expression parser (for use in writing PG - problems). - * New File Manager module provides full access to course files. - (Will replace File Xfer module in a future release.) - * New Problem Set Detail module allows editing of set data (dates, - headers), editing of problems (source file, value, etc.), and - reordering of problems. - * Improvements to jsMath display mode. - * Many usability and cosmetic improvements. - * Many bugfixes. + This is a test prerelease of the upcoming WeBWorK 2.2. It contains + numerous improvements over WeBWorK 2.1.3. Some changes are as follows: - (Contributiors: please feel free to add anything I've forgotten.) + Removal of deprecated database layouts: The gdbm and sql database + layouts have been removed. If you have existing courses that use + either of these database layouts, you must convert them to use the + sql_single database layout before upgrading. Please consult + [1]InstallationManualV2pt2#Before_you_upgrade for more information. + + Gateway testing: allows a user to complete multiple versions of a + problem set. The instructor can optionally specify restrictions on + how often a new version can be viewed, how long a user has to + complete a version, and whether a proctor is required to + authenticate before a version is completed. + + jsMath 3.0: See + [2]http://www.math.union.edu/~dpvc/jsMath/changes.html for details. + + Status system: The status system maps status names (like + "Enrolled", "Drop", "Audit") to a list of behaviors the system + should have when dealing with users who have the status. (For + example, users who are auditing the course are allowed to log in + and are included in assignments, but are not included in scoring.) + See comments in global.conf for more information. + + Additional permissions: can_always_use_show_old_answers_default, + can_show_old_answers_by_default, download_hardcopy_format_pdf, + manage_course_files, proctor_quiz, view_problem_debugging_info, + view_proctored_tests. + + Hardcopy rewrite: Faster, smaller memory footprint, better error + handling. + + Course Configuration module: Allows web-based configuration of + commonly-modified settings. + + User Detail module: Replaces "Sets assigned to user" module, allows + customization of open/due/answer dates as well as + assigning/unassigning sets. + + Login and activity logs: Detailed login success and failure + information is logged to the login log. The activity log logs each + request issued to the WeBWorK system (if configured). + + Feedback improvements: Subject line is now customizable. User, set, + and problem record information is now printed in a more readable + format. + + File Manager improvements: Show dates and sizes of files, provide + better control over renaming of uploaded files whose names already + exist, allow the creation or gzipped tar archives from files in the + course directory, follow symbolic links that are to files or + directories within the course hierarchy (and outside of the course + directory, if configured). + + And of course, many UI improvements and bug fixes. Availability - WeBWorK 2.1 requires [10]PGLanguageRelease2pt1. Both WeBWorK and PG is - available on our SourceForge project page: - [11]http://sourceforge.net/project/showfiles.php?group_id=93112 + WeBWorK 2.2-pre1 is available from our CVS repository. Read + [3]WeBWorKCVSReadOnly for more information on how to set up a CVS + connection. For those who already have a CVS connection, this update + can be obtained by updating to the tag rel-2-2-pre1. + + WeBWorK 2.2-pre1 is also available as a tarball from our SourceForge + project page: + [4]http://sourceforge.net/project/showfiles.php?group_id=93112 - Installation directly from CVS is also possible. Refer to the - [12]InstallationManualV2pt1 for more information. + You must also install [5]PGLanguageRelease2pt2pre1 at the same time + you install WeBWorK 2.2-pre1. Installation - Documentation on installing and configuring WeBWorK is available in - the [13]InstallationManualV2pt1. If you are upgrading an existing - installation, be sure to read the section [14]Upgrading an existing - WeBWorK installation. - - Using the new 'sql_single' database layout - - The new sql_single database layout stores the data for all courses - using the layout in a single database, reducing the number of - connections that need to be made to the SQL server and eliminates the - need for database to be created and deleted as courses are created and - deleted. It also adds indexing to data tables, improving system speed. - - To learn more about the database options available in WeBWorK 2.1, - including the sql_single layout, consult the [15]Database - configuration section of [16]InstallationManualV2pt1 and the - [17]DatabaseLayoutManual. - - Before creating courses using the sql_single layout (or converting - existing courses), you must [18]create a single database and grant - access to it. - - We suggest that you convert all courses using the sql database layout - to use sql_single instead and add indexing to converted courses. - Instructions are available in the [19]CourseAdministrationManual. + Installation instructions are available from + [6]InstallationManualV2pt2. -Help + If you are upgrading, please read the section [7]Upgrading WeBWorK, + paying special attention to the subsections [8]Before you upgrade and + [9]Making changes for the new release. - If you need help installing or using WeBWorK 2.1, consult - [20]WeBWorKDocs and [21]WeBWorKFAQs. +Help - You can also visit the [22]WeBWorK discussion group and post your - question there. The developers monitor this forum. + If you need help installing or using WeBWorK 2.2, visit the + [10]WeBWorK discussion group and post your question there. The + developers monitor this forum. Bug Reports & Feature Requests Submit bug reports and feature requests at - [23]http://bugs.webwork.rochester.edu/. We can't fix bugs and add + [11]http://bugs.webwork.rochester.edu/. We can't fix bugs and add features if you don't tell us about them! Patches @@ -83,27 +105,19 @@ CVS code, you save us and yourself time. A bug in this release may be fixed in CVS, and we can more easily handle patches against the latest code. Check out the latest development version from CVS and patch - against that. Consult the [24]WeBWorKCVS topic for more information. - - -- [25]SamHathaway - 28 Oct 2004 + against that. Consult the [12]WeBWorKCVS topic for more information. References - 8. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/WeBWorKTeam - 9. http://devel.webwork.rochester.edu/doc/cvs/webwork2_rel-2-1/doc/parser/ - 10. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/PGLanguageRelease2pt1 - 11. http://sourceforge.net/project/showfiles.php?group_id=93112 - 12. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/InstallationManualV2pt1 - 13. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/InstallationManualV2pt1 - 14. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/InstallationManualV2pt1#Upgrading_an_existing_WeBWorK_in - 15. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/InstallationManualV2pt1#Database_configuration - 16. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/InstallationManualV2pt1 - 17. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/DatabaseLayoutManual - 18. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/InstallationManualV2pt1#Configration_for_the_sql_single_ - 19. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/CourseAdministrationManual - 20. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/WeBWorKDocs - 21. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/WeBWorKFAQs - 22. http://webhost.math.rochester.edu/webworkdocs/discuss/ - 23. http://bugs.webwork.rochester.edu/ - 24. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/WeBWorKCVS - 25. http://devel.webwork.rochester.edu/twiki/bin/view/Main/SamHathaway + 1. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/InstallationManualV2pt2#Before_you_upgrade + 2. http://www.math.union.edu/~dpvc/jsMath/changes.html + 3. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/WeBWorKCVSReadOnly + 4. http://sourceforge.net/project/showfiles.php?group_id=93112 + 5. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/PGLanguageRelease2pt2pre1 + 6. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/InstallationManualV2pt2 + 7. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/InstallationManualV2pt2#Upgrading_WeBWorK + 8. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/InstallationManualV2pt2#Before_you_upgrade + 9. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/InstallationManualV2pt2#Making_changes_for_the_new_relea + 10. http://webhost.math.rochester.edu/webworkdocs/discuss/ + 11. http://bugs.webwork.rochester.edu/ + 12. http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/WeBWorKCVS Index: LICENSE =================================================================== RCS file: /webwork/cvs/system/webwork2/LICENSE,v retrieving revision 1.5 retrieving revision 1.5.4.1 diff -LLICENSE -LLICENSE -u -r1.5 -r1.5.4.1 --- LICENSE +++ LICENSE @@ -1,9 +1,8 @@ - WeBWorK Online Homework Delivery System - Version 2.1 + Version 2.2-pre1 - Copyright 2000-2004, The WeBWorK Project + Copyright 2000-2006, The WeBWorK Project All rights reserved. This program is free software; you can redistribute it and/or modify |
From: dpvc v. a. <we...@ma...> - 2006-01-12 00:00:43
|
Log Message: ----------- Removed a debugging message (hope Mike doesn't still need this. :-) Tags: ---- rel-2-2-dev Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator/Instructor: PGProblemEditor.pm Revision Data ------------- Index: PGProblemEditor.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm,v retrieving revision 1.66.2.5 retrieving revision 1.66.2.6 diff -Llib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -Llib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -u -r1.66.2.5 -r1.66.2.6 --- lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm +++ lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm @@ -860,7 +860,7 @@ # the source file is relative to the templates directory. if ($self->isTempEditFilePath($forcedSourceFile) ) { $forcedSourceFile = $self->determineOriginalEditFilePath($forcedSourceFile); # original file path - $self->addgoodmessage("the original path to the file is $forcedSourceFile"); #FIXME debug + #$self->addgoodmessage("the original path to the file is $forcedSourceFile"); #FIXME debug } # bail if no source path for the problem is found ; die "Cannot find a file path to save to" unless( defined($forcedSourceFile) and ($forcedSourceFile =~ /\S/) ); |
From: dpvc v. a. <we...@ma...> - 2006-01-11 23:12:44
|
Log Message: ----------- Merge with HEAD (removal of commented-out messages) Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator/Instructor: PGProblemEditor.pm Revision Data ------------- Index: PGProblemEditor.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm,v retrieving revision 1.70 retrieving revision 1.71 diff -Llib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -Llib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -u -r1.70 -r1.71 --- lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm +++ lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm @@ -357,7 +357,6 @@ $self->addmessage($r->param('status_message') ||''); # record status messages carried over if this is a redirect $self->addbadmessage("Changes in this file have not yet been permanently saved.") if -r $tempFilePath; if ( not( -e $inputFilePath) ) { -## $self->addbadmessage("This file: $inputFilePath, cannot be found."); $self->addbadmessage("The file '".$self->shortPath($inputFilePath)."' cannot be found."); } elsif (not -w $inputFilePath ) { @@ -519,7 +518,6 @@ my $problemSeed = $self->{problemSeed}; my $uri = $r->uri; my $edit_level = $r->param('edit_level') || 0; -## my $file_type = $self->{file_type}; my $force_field = (defined($self->{sourceFilePath}) and $self->{sourceFilePath} ne "") ? CGI::hidden(-name=>'sourceFilePath', @@ -549,7 +547,6 @@ print CGI::p($header), -## CGI::start_form({method=>"POST", name=>"editor", action=>"$uri", target=>$target, enctype=>"application/x-www-form-urlencoded"}), CGI::start_form({method=>"POST", id=>"editor", name=>"editor", action=>"$uri", enctype=>"application/x-www-form-urlencoded"}), $self->hidden_authen_fields, @@ -573,7 +570,6 @@ CGI::textarea( -name => 'problemContents', -default => $problemContents, -rows => $rows, -columns => $columns, -override => 1, -## )," | ", ), ); @@ -593,7 +589,6 @@ my $actionForm = "${actionID}_form"; my $newWindow = ($actionID =~ m/^(view|add_problem|save)$/)? 1: 0; my $onChange = "setRadio($i,$newWindow)"; -## my $onChange = "document.userlist.action[$i].checked=true"; my %actionParams = $self->getActionParams($actionID); my $line_contents = $self->$actionForm($onChange, %actionParams); my $radio_params = {-type=>"radio", -name=>"action", -value=>$actionID}; @@ -812,7 +807,6 @@ ($file_type eq 'blank_problem') and do { $editFilePath = $ce->{webworkFiles}->{screenSnippets}->{blankProblem}; -## $self->addbadmessage("$editFilePath is blank problem template file and can not be edited directly. " $self->addbadmessage("'".$self->shortPath($editFilePath)."' is blank problem template file and can not be edited directly. " ."First use 'Save as' to make a local copy, then add the file to the current problem set, then edit the file." ); @@ -842,7 +836,6 @@ $editFilePath = $ce->{webworkFiles}->{screenSnippets}->{setHeader} if $file_type eq 'set_header'; $editFilePath = $ce->{webworkFiles}->{hardcopySnippets}->{setHeader} if $file_type eq 'hardcopy_header'; -## $self->addbadmessage("$editFilePath is the default header file and cannot be edited directly."); # $self->addbadmessage("'".$self->shortPath($editFilePath)."' is the default header file and cannot be edited directly.".CGI::br()."Any changes you make will have to be saved as another file."); #} @@ -887,14 +880,12 @@ # which is almost undoubtedly NOT desirable if (-d $editFilePath) { -## my $msg = "The file $editFilePath is a directory!"; my $msg = "The file '".$self->shortPath($editFilePath)."' is a directory!"; $self->{failure} = 1; $self->addbadmessage($msg); } if (-e $editFilePath and not -r $editFilePath) { #it's ok if the file doesn't exist, perhaps we're going to create it # with save as -## my $msg = "The file $editFilePath cannot be read!"; my $msg = "The file '".$self->shortPath($editFilePath)."' cannot be read!"; $self->{failure} = 1; $self->addbadmessage($msg); @@ -995,13 +986,10 @@ if ( not -w $ce->{courseDirs}->{templates} ) { $errorMessage = "Write permissions have not been enabled in the templates directory. No changes can be made."; } elsif ( not -w $currentDirectory ) { -## $errorMessage = "Write permissions have not been enabled in $currentDirectory. Changes must be saved to a different directory for viewing."; $errorMessage = "Write permissions have not been enabled in '".$self->shortPath($currentDirectory)."'. Changes must be saved to a different directory for viewing."; } elsif ( -e $outputFilePath and not -w $outputFilePath ) { -## $errorMessage = "Write permissions have not been enabled for $outputFilePath. Changes must be saved to another file for viewing."; $errorMessage = "Write permissions have not been enabled for '".$self->shortPath($outputFilePath)."'. Changes must be saved to another file for viewing."; } else { -## $errorMessage = "Unable to write to $outputFilePath: $writeFileErrors"; $errorMessage = "Unable to write to '".$self->shortPath($outputFilePath)."': $writeFileErrors"; } @@ -1072,14 +1060,11 @@ unless ($file_type eq 'course_info' || $file_type eq 'options_info') { $output_string .= join(" ", -## " problem using seed ", " using seed ", CGI::textfield(-name=>'action.view.seed',-value=>$self->{problemSeed},-onfocus=>$onChange), "and display mode ", CGI::popup_menu(-name=>'action.view.displayMode', -values=>$self->r->ce->{pg}->{displayModes}, - -default=>$self->{displayMode}, -onmousedown=>$onChange -## ), ".", - ) + -default=>$self->{displayMode}, -onmousedown=>$onChange) ); } @@ -1224,7 +1209,6 @@ }; return "" if $self->{file_type} eq 'course_info' || $self->{file_type} eq 'options_info'; return join(" ", -## "Add problem to set " , "Add to set " , CGI::popup_menu({name=>'action.add_problem.target_set', values=>\@allSetNames, default=>$setName, onmousedown=>$onChange}), " as ", @@ -1294,10 +1278,8 @@ my $setRecord = $self->r->db->getGlobalSet($targetSetName); $setRecord->set_header($sourceFilePath); if( $self->r->db->putGlobalSet($setRecord) ) { -## $self->addgoodmessage("Added $sourceFilePath to ". $targetSetName. " as new set header ") ; $self->addgoodmessage("Added '".$self->shortPath($sourceFilePath)."' to ". $targetSetName. " as new set header ") ; } else { -## $self->addbadmessage("Unable to make $sourceFilePath the set header for $targetSetName"); $self->addbadmessage("Unable to make '".$self->shortPath($sourceFilePath)."' the set header for $targetSetName"); } $self->{file_type} = 'set_header'; # change file type to set_header if it not already so @@ -1584,7 +1566,6 @@ if (defined $outputFilePath and -e $outputFilePath) { # setting $do_not_save stops saving and any redirects $do_not_save = 1; -## $self->addbadmessage(CGI::p("File $outputFilePath exists. File not saved.")); $self->addbadmessage(CGI::p("File '".$self->shortPath($outputFilePath)."' exists. File not saved. No changes have been made. You can change the file path for this problem manually from the 'Hmwk Sets Editor' page")); @@ -1597,8 +1578,6 @@ unless ($do_not_save ) { $self->saveFileChanges($outputFilePath); -## my $templatesPath = $self->r->ce->{courseDirs}->{templates}; -## $sourceFilePath =~ s|^$templatesPath/||; # make sure path relative to templates directory if ($saveMode eq 'rename' and -r $outputFilePath) { ################################################# @@ -1750,12 +1729,10 @@ # if (defined $outputFilePath and -e $outputFilePath) { # # setting $do_not_save stops saving and any redirects # $do_not_save = 1; -# ## $self->addbadmessage(CGI::p("File $outputFilePath exists. File not saved.")); # $self->addbadmessage(CGI::p("File '".$self->shortPath($outputFilePath)."' exists. # File not saved. No changes have been made. # You can change the file path for this problem manually from the 'Hmwk Sets Editor' page")); # } else { -# ## #$self->addgoodmessage("Saving to file $outputFilePath."); # #$self->addgoodmessage("Saving to file '".$self->shortPath($outputFilePath)."'."); # } # @@ -1776,7 +1753,6 @@ # my $problemRecord = $self->r->db->getGlobalProblem($setName,$problemNumber); # $problemRecord->source_file($new_file_name); # if ( $self->r->db->putGlobalProblem($problemRecord) ) { -# ## $self->addgoodmessage("The current source file for set $setName problem $problemNumber has been renamed to [TMPL]/$outputFilePath.") ; # $self->addgoodmessage("The current source file for problem $problemNumber has been renamed to '".$self->shortPath($outputFilePath)."'.") ; # } else { # $self->addbadmessage("Unable to change the source file path for set $setName, problem $problemNumber. Unknown error."); |
From: dpvc v. a. <we...@ma...> - 2006-01-11 23:11:16
|
Log Message: ----------- Removed commented-out messages that where changed to use the shortPath() function (I had left them in to make it easier to merge with new versions using CVS, but they need not be kept now that the changes have been included in the official version). Tags: ---- rel-2-2-dev Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator/Instructor: PGProblemEditor.pm Revision Data ------------- Index: PGProblemEditor.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm,v retrieving revision 1.66.2.4 retrieving revision 1.66.2.5 diff -Llib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -Llib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -u -r1.66.2.4 -r1.66.2.5 --- lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm +++ lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm @@ -357,7 +357,6 @@ $self->addmessage($r->param('status_message') ||''); # record status messages carried over if this is a redirect $self->addbadmessage("Changes in this file have not yet been permanently saved.") if -r $tempFilePath; if ( not( -e $inputFilePath) ) { -## $self->addbadmessage("This file: $inputFilePath, cannot be found."); $self->addbadmessage("The file '".$self->shortPath($inputFilePath)."' cannot be found."); } elsif (not -w $inputFilePath ) { @@ -517,7 +516,6 @@ my $problemSeed = $self->{problemSeed}; my $uri = $r->uri; my $edit_level = $r->param('edit_level') || 0; -## my $file_type = $self->{file_type}; my $force_field = (defined($self->{sourceFilePath}) and $self->{sourceFilePath} ne "") ? CGI::hidden(-name=>'sourceFilePath', @@ -547,7 +545,6 @@ print CGI::p($header), -## CGI::start_form({method=>"POST", name=>"editor", action=>"$uri", target=>$target, enctype=>"application/x-www-form-urlencoded"}), CGI::start_form({method=>"POST", id=>"editor", name=>"editor", action=>"$uri", enctype=>"application/x-www-form-urlencoded"}), $self->hidden_authen_fields, @@ -571,7 +568,6 @@ CGI::textarea( -name => 'problemContents', -default => $problemContents, -rows => $rows, -columns => $columns, -override => 1, -## )," | ", ), ); @@ -591,7 +587,6 @@ my $actionForm = "${actionID}_form"; my $newWindow = ($actionID =~ m/^(view|add_problem|save)$/)? 1: 0; my $onChange = "setRadio($i,$newWindow)"; -## my $onChange = "document.userlist.action[$i].checked=true"; my %actionParams = $self->getActionParams($actionID); my $line_contents = $self->$actionForm($onChange, %actionParams); my $radio_params = {-type=>"radio", -name=>"action", -value=>$actionID}; @@ -808,7 +803,6 @@ ($file_type eq 'blank_problem') and do { $editFilePath = $ce->{webworkFiles}->{screenSnippets}->{blankProblem}; -## $self->addbadmessage("$editFilePath is blank problem template file and can not be edited directly. " $self->addbadmessage("'".$self->shortPath($editFilePath)."' is blank problem template file and can not be edited directly. " ."First use 'Save as' to make a local copy, then add the file to the current problem set, then edit the file." ); @@ -838,7 +832,6 @@ $editFilePath = $ce->{webworkFiles}->{screenSnippets}->{setHeader} if $file_type eq 'set_header'; $editFilePath = $ce->{webworkFiles}->{hardcopySnippets}->{setHeader} if $file_type eq 'hardcopy_header'; -## $self->addbadmessage("$editFilePath is the default header file and cannot be edited directly."); # $self->addbadmessage("'".$self->shortPath($editFilePath)."' is the default header file and cannot be edited directly.".CGI::br()."Any changes you make will have to be saved as another file."); #} @@ -883,14 +876,12 @@ # which is almost undoubtedly NOT desirable if (-d $editFilePath) { -## my $msg = "The file $editFilePath is a directory!"; my $msg = "The file '".$self->shortPath($editFilePath)."' is a directory!"; $self->{failure} = 1; $self->addbadmessage($msg); } if (-e $editFilePath and not -r $editFilePath) { #it's ok if the file doesn't exist, perhaps we're going to create it # with save as -## my $msg = "The file $editFilePath cannot be read!"; my $msg = "The file '".$self->shortPath($editFilePath)."' cannot be read!"; $self->{failure} = 1; $self->addbadmessage($msg); @@ -991,13 +982,10 @@ if ( not -w $ce->{courseDirs}->{templates} ) { $errorMessage = "Write permissions have not been enabled in the templates directory. No changes can be made."; } elsif ( not -w $currentDirectory ) { -## $errorMessage = "Write permissions have not been enabled in $currentDirectory. Changes must be saved to a different directory for viewing."; $errorMessage = "Write permissions have not been enabled in '".$self->shortPath($currentDirectory)."'. Changes must be saved to a different directory for viewing."; } elsif ( -e $outputFilePath and not -w $outputFilePath ) { -## $errorMessage = "Write permissions have not been enabled for $outputFilePath. Changes must be saved to another file for viewing."; $errorMessage = "Write permissions have not been enabled for '".$self->shortPath($outputFilePath)."'. Changes must be saved to another file for viewing."; } else { -## $errorMessage = "Unable to write to $outputFilePath: $writeFileErrors"; $errorMessage = "Unable to write to '".$self->shortPath($outputFilePath)."': $writeFileErrors"; } @@ -1067,14 +1055,11 @@ my $output_string = "View"; unless ($file_type eq 'course_info' || $file_type eq 'options_info') { $output_string .= join(" ", -## " problem using seed ", " using seed ", CGI::textfield(-name=>'action.view.seed',-value=>$self->{problemSeed},-onfocus=>$onChange), "and display mode ", CGI::popup_menu(-name=>'action.view.displayMode', -values=>$self->r->ce->{pg}->{displayModes}, - -default=>$self->{displayMode}, -onmousedown=>$onChange -## ), ".", - ) + -default=>$self->{displayMode}, -onmousedown=>$onChange) ); } @@ -1218,7 +1203,6 @@ }; return "" if $self->{file_type} eq 'course_info' || $self->{file_type} eq 'options_info'; return join(" ", -## "Add problem to set " , "Add to set " , CGI::popup_menu({name=>'action.add_problem.target_set', values=>\@allSetNames, default=>$setName, onmousedown=>$onChange}), " as ", @@ -1288,10 +1272,8 @@ my $setRecord = $self->r->db->getGlobalSet($targetSetName); $setRecord->set_header($sourceFilePath); if( $self->r->db->putGlobalSet($setRecord) ) { -## $self->addgoodmessage("Added $sourceFilePath to ". $targetSetName. " as new set header ") ; $self->addgoodmessage("Added '".$self->shortPath($sourceFilePath)."' to ". $targetSetName. " as new set header ") ; } else { -## $self->addbadmessage("Unable to make $sourceFilePath the set header for $targetSetName"); $self->addbadmessage("Unable to make '".$self->shortPath($sourceFilePath)."' the set header for $targetSetName"); } $self->{file_type} = 'set_header'; # change file type to set_header if it not already so @@ -1577,7 +1559,6 @@ if (defined $outputFilePath and -e $outputFilePath) { # setting $do_not_save stops saving and any redirects $do_not_save = 1; -## $self->addbadmessage(CGI::p("File $outputFilePath exists. File not saved.")); $self->addbadmessage(CGI::p("File '".$self->shortPath($outputFilePath)."' exists. File not saved. No changes have been made. You can change the file path for this problem manually from the 'Hmwk Sets Editor' page")); @@ -1590,8 +1571,6 @@ unless ($do_not_save ) { $self->saveFileChanges($outputFilePath); -## my $templatesPath = $self->r->ce->{courseDirs}->{templates}; -## $sourceFilePath =~ s|^$templatesPath/||; # make sure path relative to templates directory if ($saveMode eq 'rename' and -r $outputFilePath) { ################################################# @@ -1739,12 +1718,10 @@ # if (defined $outputFilePath and -e $outputFilePath) { # # setting $do_not_save stops saving and any redirects # $do_not_save = 1; -# ## $self->addbadmessage(CGI::p("File $outputFilePath exists. File not saved.")); # $self->addbadmessage(CGI::p("File '".$self->shortPath($outputFilePath)."' exists. # File not saved. No changes have been made. # You can change the file path for this problem manually from the 'Hmwk Sets Editor' page")); # } else { -# ## #$self->addgoodmessage("Saving to file $outputFilePath."); # #$self->addgoodmessage("Saving to file '".$self->shortPath($outputFilePath)."'."); # } # @@ -1765,7 +1742,6 @@ # my $problemRecord = $self->r->db->getGlobalProblem($setName,$problemNumber); # $problemRecord->source_file($new_file_name); # if ( $self->r->db->putGlobalProblem($problemRecord) ) { -# ## $self->addgoodmessage("The current source file for set $setName problem $problemNumber has been renamed to [TMPL]/$outputFilePath.") ; # $self->addgoodmessage("The current source file for problem $problemNumber has been renamed to '".$self->shortPath($outputFilePath)."'.") ; # } else { # $self->addbadmessage("Unable to change the source file path for set $setName, problem $problemNumber. Unknown error."); |
From: dpvc v. a. <we...@ma...> - 2006-01-11 23:04:22
|
Log Message: ----------- Merge to HEAD (remove DPVC comments). Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator/Instructor: PGProblemEditor.pm Revision Data ------------- Index: PGProblemEditor.pm =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Instr= uctor/PGProblemEditor.pm,v retrieving revision 1.69 retrieving revision 1.70 diff -Llib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -Llib/W= eBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -u -r1.69 -r1.70 --- lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm +++ lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm @@ -1,9 +1,7 @@ ########################################################################= ######## # WeBWorK Online Homework Delivery System # Copyright =A9 2000-2003 The WeBWorK Project, http://openwebwork.sf.net= / - # $CVSHeader$ - #=20 # This program is free software; you can redistribute it and/or modify i= t under # the terms of either: (a) the GNU General Public License as published b= y the @@ -494,9 +492,6 @@ =20 my $protected_file =3D not -w $inputFilePath; =20 -## -## DPVC -## my $header =3D CGI::i("Editing problem".CGI::b("set $setName/ problem= $problemNumber</emphasis>").CGI::br()." in file $inputFilePath"); my $file_type =3D $self->{file_type}; my %titles =3D ( problem =3D>CGI::b("set $setName/problem $problemNumber"), @@ -508,9 +503,6 @@ source_path_for_problem_file =3D> " unassigned problem file: ".CGI::b= ("set $setName/problem $problemNumber"), ); my $header =3D CGI::i("Editing $titles{$file_type} in file '".$self->sh= ortPath($inputFilePath)."'"); -## -## /DPVC -## $header =3D ($self->isTempEditFilePath($inputFilePath) ) ? CGI::div({c= lass=3D>'temporaryFile'},$header) : $header; # use colors if temporary f= ile =09 #######################################################################= ## @@ -599,15 +591,15 @@ # Check permissions #next if FORM_PERMS()->{$actionID} and not $authz->hasPermissions($u= ser, FORM_PERMS()->{$actionID}); my $actionForm =3D "${actionID}_form"; - my $newWindow =3D ($actionID =3D~ m/^(view|add_problem|save)$/)? 1: = 0; ## DPVC - my $onChange =3D "setRadio($i,$newWindow)"; ## DPVC + my $newWindow =3D ($actionID =3D~ m/^(view|add_problem|save)$/)? 1: = 0; + my $onChange =3D "setRadio($i,$newWindow)"; ## my $onChange =3D "document.userlist.action[$i].checked=3Dtrue"; my %actionParams =3D $self->getActionParams($actionID); my $line_contents =3D $self->$actionForm($onChange, %actionParams); my $radio_params =3D {-type=3D>"radio", -name=3D>"action", -value=3D= >$actionID}; $radio_params->{checked}=3D1 if ($actionID eq $default_choice) ; - $radio_params->{onclick} =3D "setTarget($newWindow)"; ## DPVC - $radio_params->{id} =3D "action$i"; ## DPVC + $radio_params->{onclick} =3D "setTarget($newWindow)"; + $radio_params->{id} =3D "action$i"; print CGI::Tr({-valign=3D>"top"}, CGI::td({}, CGI::input($radio_params)), CGI::td({}, $line_contents) @@ -615,21 +607,12 @@ =09 $i++; } -# print CGI::Tr({}, CGI::td({-align=3D>"right"}, "Select above then:")= , -# CGI::td({-align=3D>"left"}, CGI::submit(-name=3D>'= submit', -value=3D>"Take Action!")), - ## - ## DPVC - ## my $checkbox =3D CGI::input({-type=3D>"checkbox", -id=3D>"newWindow",= -checked=3D>"checked", -onchange=3D>"updateTarget()"}); $checkbox =3D~ s/\n//; # remove unwanted linebreak print CGI::Tr({}, CGI::td({-colspan=3D>2}, "Select above then:", CGI::submit(-name=3D>'submit', -value=3D>"Take Acti= on!"), - CGI::script("document.write('$checkbox in another window')")) - ## - ## /DPVC - ## - ); + CGI::script("document.write('$checkbox in another window')"))); print CGI::end_table();=09 =09 =09 @@ -1531,18 +1514,6 @@ $shortFilePath =3D~ s|^$templatesDir/||; $shortFilePath =3D '' if $shortFilePath =3D~ m|^/|; # if it is still = an absolute path don't suggest that you save to it. my $allowedActions =3D (defined($setID) && $setID =3D~/\S/ && $setID ne= 'Undefined_Set') ? ['save_a_copy','rename' ] : ['save_a_copy']; -# return CGI::popup_menu(-name=3D>'action.save_as.saveMode', -values=3D= >['rename','save_a_copy'],=20 -# -default=3D>'rename',-labels=3D>{rename=3D>'Rename file path to '= ,save_a_copy=3D>'Create a copy of file at '} -# ). ": [TMPL]/".CGI::textfield(-name=3D>'action.save_as.target_file'= , -size=3D>40, -value=3D>$shortFilePath),; - -## -## DPVC -## - -# return "Save ". -# CGI::popup_menu(-name=3D>'action.save_as.saveMode', -values=3D>['re= name','save_a_copy'],=20 -# -default=3D>'rename',-labels=3D>{rename=3D>' as ',save_a_copy=3D>'= a copy to'} -# ). ": [TMPL]/".CGI::textfield(-name=3D>'action.save_as.target_file',= -size=3D>40, -value=3D>$shortFilePath),; =20 return CGI::popup_menu( -name=3D>'action.save_as.saveMode', -values=3D>$allowedActions= ,=20 @@ -1561,15 +1532,12 @@ # return CGI::popup_menu(-name=3D>'action.save_as.saveMode', -values=3D= >['save_a_copy'],=20 # -default=3D>'save_a_copy',-labels=3D>{save_a_copy=3D>'Save as'}, = -onmousedown=3D>$onChange # ). ": [TMPL]/".CGI::textfield(-name=3D>'action.save_as.target_file'= , -size=3D>40, -value=3D>$shortFilePath) -## -## /DPVC -## } =20 sub save_as_handler { my ($self, $genericParams, $actionParams, $tableParams) =3D @_; #$self->addgoodmessage("save_as_handler called"); - $self->{status_message} =3D ''; ## DPVC -- remove bogus old messages + $self->{status_message} =3D ''; ## DPVC -- remove bogus old messages my $courseName =3D $self->{courseID}; my $setName =3D $self->{setID}; my $problemNumber =3D $self->{problemID}; |
From: dpvc v. a. <we...@ma...> - 2006-01-11 23:02:35
|
Log Message: ----------- Remove unneeded DPVC comments (they were in the version I sent to Mike because I usually mark the changes I make that I'm not expecting to commit). Tags: ---- rel-2-2-dev Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator/Instructor: PGProblemEditor.pm Revision Data ------------- Index: PGProblemEditor.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm,v retrieving revision 1.66.2.3 retrieving revision 1.66.2.4 diff -Llib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -Llib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -u -r1.66.2.3 -r1.66.2.4 --- lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm +++ lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm @@ -490,9 +490,6 @@ my $protected_file = not -w $inputFilePath; -## -## DPVC -## my $header = CGI::i("Editing problem".CGI::b("set $setName/ problem $problemNumber</emphasis>").CGI::br()." in file $inputFilePath"); my $file_type = $self->{file_type}; my %titles = ( problem =>CGI::b("set $setName/problem $problemNumber"), @@ -504,9 +501,6 @@ source_path_for_problem_file => " unassigned problem file: ".CGI::b("set $setName/problem $problemNumber"), ); my $header = CGI::i("Editing $titles{$file_type} in file '".$self->shortPath($inputFilePath)."'"); -## -## /DPVC -## $header = ($self->isTempEditFilePath($inputFilePath) ) ? CGI::div({class=>'temporaryFile'},$header) : $header; # use colors if temporary file ######################################################################### @@ -595,15 +589,15 @@ # Check permissions #next if FORM_PERMS()->{$actionID} and not $authz->hasPermissions($user, FORM_PERMS()->{$actionID}); my $actionForm = "${actionID}_form"; - my $newWindow = ($actionID =~ m/^(view|add_problem|save)$/)? 1: 0; ## DPVC - my $onChange = "setRadio($i,$newWindow)"; ## DPVC + my $newWindow = ($actionID =~ m/^(view|add_problem|save)$/)? 1: 0; + my $onChange = "setRadio($i,$newWindow)"; ## my $onChange = "document.userlist.action[$i].checked=true"; my %actionParams = $self->getActionParams($actionID); my $line_contents = $self->$actionForm($onChange, %actionParams); my $radio_params = {-type=>"radio", -name=>"action", -value=>$actionID}; $radio_params->{checked}=1 if ($actionID eq $default_choice) ; - $radio_params->{onclick} = "setTarget($newWindow)"; ## DPVC - $radio_params->{id} = "action$i"; ## DPVC + $radio_params->{onclick} = "setTarget($newWindow)"; + $radio_params->{id} = "action$i"; print CGI::Tr({-valign=>"top"}, CGI::td({}, CGI::input($radio_params)), CGI::td({}, $line_contents) @@ -611,21 +605,12 @@ $i++; } -# print CGI::Tr({}, CGI::td({-align=>"right"}, "Select above then:"), -# CGI::td({-align=>"left"}, CGI::submit(-name=>'submit', -value=>"Take Action!")), - ## - ## DPVC - ## my $checkbox = CGI::input({-type=>"checkbox", -id=>"newWindow", -checked=>"checked", -onchange=>"updateTarget()"}); $checkbox =~ s/\n//; # remove unwanted linebreak print CGI::Tr({}, CGI::td({-colspan=>2}, "Select above then:", CGI::submit(-name=>'submit', -value=>"Take Action!"), - CGI::script("document.write('$checkbox in another window')")) - ## - ## /DPVC - ## - ); + CGI::script("document.write('$checkbox in another window')"))); print CGI::end_table(); @@ -1522,18 +1507,6 @@ $shortFilePath =~ s|^$templatesDir/||; $shortFilePath = '' if $shortFilePath =~ m|^/|; # if it is still an absolute path don't suggest that you save to it. my $allowedActions = (defined($setID) && $setID =~/\S/ && $setID ne 'Undefined_Set') ? ['save_a_copy','rename' ] : ['save_a_copy']; -# return CGI::popup_menu(-name=>'action.save_as.saveMode', -values=>['rename','save_a_copy'], -# -default=>'rename',-labels=>{rename=>'Rename file path to ',save_a_copy=>'Create a copy of file at '} -# ). ": [TMPL]/".CGI::textfield(-name=>'action.save_as.target_file', -size=>40, -value=>$shortFilePath),; - -## -## DPVC -## - -# return "Save ". -# CGI::popup_menu(-name=>'action.save_as.saveMode', -values=>['rename','save_a_copy'], -# -default=>'rename',-labels=>{rename=>' as ',save_a_copy=>'a copy to'} -# ). ": [TMPL]/".CGI::textfield(-name=>'action.save_as.target_file', -size=>40, -value=>$shortFilePath),; return CGI::popup_menu( -name=>'action.save_as.saveMode', -values=>$allowedActions, @@ -1552,15 +1525,12 @@ # return CGI::popup_menu(-name=>'action.save_as.saveMode', -values=>['save_a_copy'], # -default=>'save_a_copy',-labels=>{save_a_copy=>'Save as'}, -onmousedown=>$onChange # ). ": [TMPL]/".CGI::textfield(-name=>'action.save_as.target_file', -size=>40, -value=>$shortFilePath) -## -## /DPVC -## } sub save_as_handler { my ($self, $genericParams, $actionParams, $tableParams) = @_; #$self->addgoodmessage("save_as_handler called"); - $self->{status_message} = ''; ## DPVC -- remove bogus old messages + $self->{status_message} = ''; ## DPVC -- remove bogus old messages my $courseName = $self->{courseID}; my $setName = $self->{setID}; my $problemNumber = $self->{problemID}; |
From: dpvc v. a. <we...@ma...> - 2006-01-11 23:00:13
|
Log Message: ----------- Merge to HEAD (Don't scan templates/tmpEdit for pg files in the Library Browser). Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator/Instructor: SetMaker.pm Revision Data ------------- Index: SetMaker.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm,v retrieving revision 1.60 retrieving revision 1.61 diff -Llib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm -Llib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm -u -r1.60 -r1.61 --- lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm +++ lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm @@ -67,7 +67,7 @@ ## for additional problib buttons my %problib; ## filled in in global.conf my %ignoredir = ( - '.' => 1, '..' => 1, 'Library' => 1, 'CVS' => 1, + '.' => 1, '..' => 1, 'Library' => 1, 'CVS' => 1, 'tmpEdit' => 1, 'headers' => 1, 'macros' => 1, 'email' => 1, ); |
From: dpvc v. a. <we...@ma...> - 2006-01-11 22:56:41
|
Log Message: ----------- Don't scan templates/tmpEdit directory for pg files. Tags: ---- rel-2-2-dev Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator/Instructor: SetMaker.pm Revision Data ------------- Index: SetMaker.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm,v retrieving revision 1.59.2.1 retrieving revision 1.59.2.2 diff -Llib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm -Llib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm -u -r1.59.2.1 -r1.59.2.2 --- lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm +++ lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm @@ -67,7 +67,7 @@ ## for additional problib buttons my %problib; ## filled in in global.conf my %ignoredir = ( - '.' => 1, '..' => 1, 'Library' => 1, 'CVS' => 1, + '.' => 1, '..' => 1, 'Library' => 1, 'CVS' => 1, 'tmpEdit' => 1, 'headers' => 1, 'macros' => 1, 'email' => 1, ); |
From: dpvc v. a. <we...@ma...> - 2006-01-11 22:45:54
|
Log Message: ----------- Merge changes with HEAD (Re-target view and edit links to use the view and edit windows) Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator: ProblemSet.pm ProblemSets.pm webwork2/lib/WeBWorK/ContentGenerator/Instructor: ProblemList.pm ProblemSetDetail.pm SetMaker.pm Revision Data ------------- Index: ProblemSets.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/ProblemSets.pm,v retrieving revision 1.66 retrieving revision 1.67 diff -Llib/WeBWorK/ContentGenerator/ProblemSets.pm -Llib/WeBWorK/ContentGenerator/ProblemSets.pm -u -r1.66 -r1.67 --- lib/WeBWorK/ContentGenerator/ProblemSets.pm +++ lib/WeBWorK/ContentGenerator/ProblemSets.pm @@ -59,7 +59,7 @@ my $editorURL = $self->systemLink($editorPage, params => { file_type => "course_info" }); print CGI::p(CGI::b("Course Info"), " ", - CGI::a({href=>$editorURL}, "[edit]")); + CGI::a({href=>$editorURL, target=>"WW_Editor"}, "[edit]")); } else { print CGI::p(CGI::b("Course Info")); } Index: ProblemSet.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/ProblemSet.pm,v retrieving revision 1.71 retrieving revision 1.72 diff -Llib/WeBWorK/ContentGenerator/ProblemSet.pm -Llib/WeBWorK/ContentGenerator/ProblemSet.pm -u -r1.71 -r1.72 --- lib/WeBWorK/ContentGenerator/ProblemSet.pm +++ lib/WeBWorK/ContentGenerator/ProblemSet.pm @@ -210,8 +210,9 @@ my $displayMode = $r->param("displayMode") || $ce->{pg}->{options}->{displayMode}; if (defined $r->param("editMode") and $r->param("editMode") eq "temporaryFile") { - my $screenHeaderPath = $r->param('sourceFilePath'); - #$screenSetHeader = "$screenSetHeader.$userID.tmp"; + $screenSetHeader = $r->param('sourceFilePath'); + $self->addmessage(CGI::div({class=>'temporaryFile'}, "Viewing temporary file: ", + $screenSetHeader)); $displayMode = $r->param("displayMode") if $r->param("displayMode"); } @@ -243,13 +244,12 @@ ); if (defined($set) and $authz->hasPermissions($userID, "modify_problem_sets")) { - #FIXME ? can't edit the default set header this way my $editorPage = $urlpath->newFromModule("WeBWorK::ContentGenerator::Instructor::PGProblemEditor", courseID => $courseID, setID => $set->set_id, problemID => 0); my $editorURL = $self->systemLink($editorPage, params => { file_type => 'set_header'}); print CGI::p(CGI::b("Set Info"), " ", - CGI::a({href=>$editorURL}, "[edit]")); + CGI::a({href=>$editorURL, target=>"WW_Editor"}, "[edit]")); } else { print CGI::p(CGI::b("Set Info")); } Index: ProblemList.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Instructor/ProblemList.pm,v retrieving revision 1.33 retrieving revision 1.34 diff -Llib/WeBWorK/ContentGenerator/Instructor/ProblemList.pm -Llib/WeBWorK/ContentGenerator/Instructor/ProblemList.pm -u -r1.33 -r1.34 --- lib/WeBWorK/ContentGenerator/Instructor/ProblemList.pm +++ lib/WeBWorK/ContentGenerator/Instructor/ProblemList.pm @@ -522,12 +522,12 @@ $urlpath->new(type=>'instructor_problem_editor_withset_withproblem', args=>{courseID =>$courseName,setID=>$setName,problemID=>$problemID} ) - )}, "Edit it" ) . + ), target=>"WW_Editor"}, "Edit it" ) . ' '. CGI::a({href=>$self->systemLink( $urlpath->new(type=>'problem_detail', args=>{courseID =>$courseName,setID=>$setName,problemID=>$problemID} ), - params =>{effectiveUser => $editForUserName} )}, "Try it") . + params =>{effectiveUser => $editForUserName} ), target=>"WW_View"}, "Try it") . CGI::br() . CGI::start_table(). Index: ProblemSetDetail.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm,v retrieving revision 1.32 retrieving revision 1.33 diff -Llib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm -Llib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm -u -r1.32 -r1.33 --- lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm +++ lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm @@ -1250,8 +1250,8 @@ print CGI::Tr({}, CGI::td({}, [ CGI::start_table({border => 0, cellpadding => 0}) . CGI::Tr({}, CGI::td({}, $properties{$header}->{name})) . - CGI::Tr({}, CGI::td({}, CGI::a({href => $editHeaderLink}, "Edit it"))) . - CGI::Tr({}, CGI::td({}, CGI::a({href => $viewHeaderLink}, "View it"))) . + CGI::Tr({}, CGI::td({}, CGI::a({href => $editHeaderLink, target=>"WW_Editor"}, "Edit it"))) . + CGI::Tr({}, CGI::td({}, CGI::a({href => $viewHeaderLink, target=>"WW_View"}, "View it"))) . # CGI::Tr({}, CGI::td({}, CGI::checkbox({name => "defaultHeader", value => $header, label => "Use Default"}))) . CGI::end_table(), # "", @@ -1367,8 +1367,8 @@ print CGI::Tr({}, CGI::td({}, [ CGI::start_table({border => 0, cellpadding => 1}) . CGI::Tr({}, CGI::td({}, problem_number_popup($problemID, $maxProblemNumber))) . - CGI::Tr({}, CGI::td({}, CGI::a({href => $editProblemLink}, "Edit it"))) . - CGI::Tr({}, CGI::td({}, CGI::a({href => $viewProblemLink}, "Try it" . ($forOneUser ? " (as $editForUser[0])" : "")))) . + CGI::Tr({}, CGI::td({}, CGI::a({href => $editProblemLink, target=>"WW_Editor"}, "Edit it"))) . + CGI::Tr({}, CGI::td({}, CGI::a({href => $viewProblemLink, target=>"WW_View"}, "Try it" . ($forOneUser ? " (as $editForUser[0])" : "")))) . ($forUsers ? "" : CGI::Tr({}, CGI::td({}, CGI::checkbox({name => "deleteProblem", value => $problemID, label => "Delete it?"})))) . # CGI::Tr({}, CGI::td({}, "Delete it?" . CGI::input({type => "checkbox", name => "deleteProblem", value => $problemID}))) . ($forOneUser ? "" : CGI::Tr({}, CGI::td({}, CGI::checkbox({name => "markCorrect", value => $problemID, label => "Mark Correct?"})))) . Index: SetMaker.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm,v retrieving revision 1.59 retrieving revision 1.60 diff -Llib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm -Llib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm -u -r1.59 -r1.60 --- lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm +++ lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm @@ -832,7 +832,7 @@ setID=>"Undefined_Set", problemID=>"1"), params=>{sourceFilePath => "$sourceFileName", problemSeed=> $problem_seed} - )}, "Edit it" ); + ), target=>"WW_Editor"}, "Edit it" ); my $displayMode = $self->r->param("mydisplayMode"); $displayMode = $self->r->ce->{pg}->{options}->{displayMode} @@ -849,7 +849,7 @@ sourceFilePath => "$sourceFileName", displayMode => $displayMode, } - )}, "Try it"); + ), target=>"WW_View"}, "Try it"); my %add_box_data = ( -name=>"trial$cnt",-value=>1,-label=>"Add this problem to the target set on the next update"); if($mark & SUCCESS) { |
From: dpvc v. a. <we...@ma...> - 2006-01-11 22:28:31
|
Log Message: ----------- Re-target Edit and View links to WW_Editor and WW_View windows. Tags: ---- rel-2-2-dev Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator: ProblemSet.pm ProblemSets.pm webwork2/lib/WeBWorK/ContentGenerator/Instructor: ProblemList.pm ProblemSetDetail.pm SetMaker.pm Revision Data ------------- Index: ProblemSets.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/ProblemSets.pm,v retrieving revision 1.65.2.1 retrieving revision 1.65.2.2 diff -Llib/WeBWorK/ContentGenerator/ProblemSets.pm -Llib/WeBWorK/ContentGenerator/ProblemSets.pm -u -r1.65.2.1 -r1.65.2.2 --- lib/WeBWorK/ContentGenerator/ProblemSets.pm +++ lib/WeBWorK/ContentGenerator/ProblemSets.pm @@ -59,7 +59,7 @@ my $editorURL = $self->systemLink($editorPage, params => { file_type => "course_info" }); print CGI::p(CGI::b("Course Info"), " ", - CGI::a({href=>$editorURL}, "[edit]")); + CGI::a({href=>$editorURL, target=>"WW_Editor"}, "[edit]")); } else { print CGI::p(CGI::b("Course Info")); } Index: ProblemSet.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/ProblemSet.pm,v retrieving revision 1.70.2.2 retrieving revision 1.70.2.3 diff -Llib/WeBWorK/ContentGenerator/ProblemSet.pm -Llib/WeBWorK/ContentGenerator/ProblemSet.pm -u -r1.70.2.2 -r1.70.2.3 --- lib/WeBWorK/ContentGenerator/ProblemSet.pm +++ lib/WeBWorK/ContentGenerator/ProblemSet.pm @@ -211,7 +211,6 @@ if (defined $r->param("editMode") and $r->param("editMode") eq "temporaryFile") { $screenSetHeader = $r->param('sourceFilePath'); - #$screenSetHeader = "$screenSetHeader.$userID.tmp"; $self->addmessage(CGI::div({class=>'temporaryFile'}, "Viewing temporary file: ", $screenSetHeader)); $displayMode = $r->param("displayMode") if $r->param("displayMode"); @@ -245,13 +244,12 @@ ); if (defined($set) and $authz->hasPermissions($userID, "modify_problem_sets")) { - #FIXME ? can't edit the default set header this way my $editorPage = $urlpath->newFromModule("WeBWorK::ContentGenerator::Instructor::PGProblemEditor", courseID => $courseID, setID => $set->set_id, problemID => 0); my $editorURL = $self->systemLink($editorPage, params => { file_type => 'set_header'}); print CGI::p(CGI::b("Set Info"), " ", - CGI::a({href=>$editorURL}, "[edit]")); + CGI::a({href=>$editorURL, target=>"WW_Editor"}, "[edit]")); } else { print CGI::p(CGI::b("Set Info")); } Index: ProblemList.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Instructor/ProblemList.pm,v retrieving revision 1.33 retrieving revision 1.33.2.1 diff -Llib/WeBWorK/ContentGenerator/Instructor/ProblemList.pm -Llib/WeBWorK/ContentGenerator/Instructor/ProblemList.pm -u -r1.33 -r1.33.2.1 --- lib/WeBWorK/ContentGenerator/Instructor/ProblemList.pm +++ lib/WeBWorK/ContentGenerator/Instructor/ProblemList.pm @@ -522,12 +522,12 @@ $urlpath->new(type=>'instructor_problem_editor_withset_withproblem', args=>{courseID =>$courseName,setID=>$setName,problemID=>$problemID} ) - )}, "Edit it" ) . + ), target=>"WW_Editor"}, "Edit it" ) . ' '. CGI::a({href=>$self->systemLink( $urlpath->new(type=>'problem_detail', args=>{courseID =>$courseName,setID=>$setName,problemID=>$problemID} ), - params =>{effectiveUser => $editForUserName} )}, "Try it") . + params =>{effectiveUser => $editForUserName} ), target=>"WW_View"}, "Try it") . CGI::br() . CGI::start_table(). Index: ProblemSetDetail.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm,v retrieving revision 1.32 retrieving revision 1.32.2.1 diff -Llib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm -Llib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm -u -r1.32 -r1.32.2.1 --- lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm +++ lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm @@ -1250,8 +1250,8 @@ print CGI::Tr({}, CGI::td({}, [ CGI::start_table({border => 0, cellpadding => 0}) . CGI::Tr({}, CGI::td({}, $properties{$header}->{name})) . - CGI::Tr({}, CGI::td({}, CGI::a({href => $editHeaderLink}, "Edit it"))) . - CGI::Tr({}, CGI::td({}, CGI::a({href => $viewHeaderLink}, "View it"))) . + CGI::Tr({}, CGI::td({}, CGI::a({href => $editHeaderLink, target=>"WW_Editor"}, "Edit it"))) . + CGI::Tr({}, CGI::td({}, CGI::a({href => $viewHeaderLink, target=>"WW_View"}, "View it"))) . # CGI::Tr({}, CGI::td({}, CGI::checkbox({name => "defaultHeader", value => $header, label => "Use Default"}))) . CGI::end_table(), # "", @@ -1367,8 +1367,8 @@ print CGI::Tr({}, CGI::td({}, [ CGI::start_table({border => 0, cellpadding => 1}) . CGI::Tr({}, CGI::td({}, problem_number_popup($problemID, $maxProblemNumber))) . - CGI::Tr({}, CGI::td({}, CGI::a({href => $editProblemLink}, "Edit it"))) . - CGI::Tr({}, CGI::td({}, CGI::a({href => $viewProblemLink}, "Try it" . ($forOneUser ? " (as $editForUser[0])" : "")))) . + CGI::Tr({}, CGI::td({}, CGI::a({href => $editProblemLink, target=>"WW_Editor"}, "Edit it"))) . + CGI::Tr({}, CGI::td({}, CGI::a({href => $viewProblemLink, target=>"WW_View"}, "Try it" . ($forOneUser ? " (as $editForUser[0])" : "")))) . ($forUsers ? "" : CGI::Tr({}, CGI::td({}, CGI::checkbox({name => "deleteProblem", value => $problemID, label => "Delete it?"})))) . # CGI::Tr({}, CGI::td({}, "Delete it?" . CGI::input({type => "checkbox", name => "deleteProblem", value => $problemID}))) . ($forOneUser ? "" : CGI::Tr({}, CGI::td({}, CGI::checkbox({name => "markCorrect", value => $problemID, label => "Mark Correct?"})))) . Index: SetMaker.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm,v retrieving revision 1.59 retrieving revision 1.59.2.1 diff -Llib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm -Llib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm -u -r1.59 -r1.59.2.1 --- lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm +++ lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm @@ -832,7 +832,7 @@ setID=>"Undefined_Set", problemID=>"1"), params=>{sourceFilePath => "$sourceFileName", problemSeed=> $problem_seed} - )}, "Edit it" ); + ), target=>"WW_Editor"}, "Edit it" ); my $displayMode = $self->r->param("mydisplayMode"); $displayMode = $self->r->ce->{pg}->{options}->{displayMode} @@ -849,7 +849,7 @@ sourceFilePath => "$sourceFileName", displayMode => $displayMode, } - )}, "Try it"); + ), target=>"WW_View"}, "Try it"); my %add_box_data = ( -name=>"trial$cnt",-value=>1,-label=>"Add this problem to the target set on the next update"); if($mark & SUCCESS) { |
From: dpvc v. a. <we...@ma...> - 2006-01-10 03:38:52
|
Update of /webwork/cvs/system/webwork-modperl/htdocs/jsMath/uncompressed In directory devel.webwork.rochester.edu:/tmp/cvs-serv49542/uncompressed Log Message: Directory /webwork/cvs/system/webwork-modperl/htdocs/jsMath/uncompressed added to the repository |
From: dpvc v. a. <we...@ma...> - 2006-01-10 03:38:52
|
Update of /webwork/cvs/system/webwork-modperl/htdocs/jsMath/extensions In directory devel.webwork.rochester.edu:/tmp/cvs-serv49542/extensions Log Message: Directory /webwork/cvs/system/webwork-modperl/htdocs/jsMath/extensions added to the repository |
From: Sam H. v. a. <we...@ma...> - 2006-01-10 00:37:14
|
Log Message: ----------- Using Mike's fix for bug #942, because it was nicer. Forward-ported from rel-2-2-dev revision 1.75.2.2 to HEAD. Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator/Instructor: UserList.pm Revision Data ------------- Index: UserList.pm =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Instr= uctor/UserList.pm,v retrieving revision 1.76 retrieving revision 1.77 diff -Llib/WeBWorK/ContentGenerator/Instructor/UserList.pm -Llib/WeBWorK/= ContentGenerator/Instructor/UserList.pm -u -r1.76 -r1.77 --- lib/WeBWorK/ContentGenerator/Instructor/UserList.pm +++ lib/WeBWorK/ContentGenerator/Instructor/UserList.pm @@ -1327,23 +1327,17 @@ next; } =09 - # make sure permission level is defined - if (not defined $record{permission}) { - $record{permission} =3D $default_permission_level; - } - =09 - # make sure permission level is numeric - unless ($record{permission} =3D~ m/^[+\-]?\d*$/) { - $self->addbadmessage("permission level '$record{permission}' for user= '$user_id' is not an integer. using default permission level '$default_p= ermission_level'.\n"); - $record{permission} =3D $default_permission_level; - } - =09 my $User =3D $db->newUser(%record); my $PermissionLevel =3D $db->newPermissionLevel(user_id =3D> $user_id,= permission =3D> 0); my $Password =3D $db->newPassword(user_id =3D> $user_id, password =3D>= cryptPassword($record{student_id})); =09 # use password and permission from record if there if (exists $record{permission}) { + # make sure permission level is numeric + unless (defined($record{permission}) and $record{permission} =3D~ m/^= [+\-]?\d*$/) { + $self->addbadmessage("permission level=CA for user '$user_id' is not= defined or is not an integer. Set the permission level to the default pe= rmission level '$default_permission_level'.\n"); + $record{permission} =3D $default_permission_level; + } $PermissionLevel->permission($record{permission}); } =09 |
From: Sam H. v. a. <we...@ma...> - 2006-01-10 00:34:53
|
Log Message: ----------- Using Mike's fix for bug #942, because it was nicer. Tags: ---- rel-2-2-dev Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator/Instructor: UserList.pm Revision Data ------------- Index: UserList.pm =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Instr= uctor/UserList.pm,v retrieving revision 1.75.2.1 retrieving revision 1.75.2.2 diff -Llib/WeBWorK/ContentGenerator/Instructor/UserList.pm -Llib/WeBWorK/= ContentGenerator/Instructor/UserList.pm -u -r1.75.2.1 -r1.75.2.2 --- lib/WeBWorK/ContentGenerator/Instructor/UserList.pm +++ lib/WeBWorK/ContentGenerator/Instructor/UserList.pm @@ -1327,23 +1327,17 @@ next; } =09 - # make sure permission level is defined - if (not defined $record{permission}) { - $record{permission} =3D $default_permission_level; - } - =09 - # make sure permission level is numeric - unless ($record{permission} =3D~ m/^[+\-]?\d*$/) { - $self->addbadmessage("permission level '$record{permission}' for user= '$user_id' is not an integer. using default permission level '$default_p= ermission_level'.\n"); - $record{permission} =3D $default_permission_level; - } - =09 my $User =3D $db->newUser(%record); my $PermissionLevel =3D $db->newPermissionLevel(user_id =3D> $user_id,= permission =3D> 0); my $Password =3D $db->newPassword(user_id =3D> $user_id, password =3D>= cryptPassword($record{student_id})); =09 # use password and permission from record if there if (exists $record{permission}) { + # make sure permission level is numeric + unless (defined($record{permission}) and $record{permission} =3D~ m/^= [+\-]?\d*$/) { + $self->addbadmessage("permission level=CA for user '$user_id' is not= defined or is not an integer. Set the permission level to the default pe= rmission level '$default_permission_level'.\n"); + $record{permission} =3D $default_permission_level; + } $PermissionLevel->permission($record{permission}); } =09 |
From: Sam H. v. a. <we...@ma...> - 2006-01-10 00:21:58
|
Log Message: ----------- Backporting jj's fix for bug #944. if the user includes "following files" in a multiple selection it shows up here as "" which causes the importing to die so, we select on filenames containing non-whitespace Originally fixed in HEAD revision 1.88 Back-ported to rel-2-2-dev without modification in this revision. Tags: ---- rel-2-2-dev Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator/Instructor: ProblemSetList.pm Revision Data ------------- Index: ProblemSetList.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetList.pm,v retrieving revision 1.87 retrieving revision 1.87.2.1 diff -Llib/WeBWorK/ContentGenerator/Instructor/ProblemSetList.pm -Llib/WeBWorK/ContentGenerator/Instructor/ProblemSetList.pm -u -r1.87 -r1.87.2.1 --- lib/WeBWorK/ContentGenerator/Instructor/ProblemSetList.pm +++ lib/WeBWorK/ContentGenerator/Instructor/ProblemSetList.pm @@ -1364,6 +1364,11 @@ my $db = $r->db; my $dir = $ce->{courseDirs}->{templates}; + # if the user includes "following files" in a multiple selection + # it shows up here as "" which causes the importing to die + # so, we select on filenames containing non-whitespace + @setDefFiles = grep(/\S/, @setDefFiles); + # FIXME: do we really want everything to fail on one bad file name? foreach my $fileName (@setDefFiles) { die "won't be able to read from file $dir/$fileName: does it exist? is it readable?" |
From: Sam H. v. a. <we...@ma...> - 2006-01-10 00:12:53
|
Log Message: ----------- Resolves bug #942, in which a missing permission level field causes a warning: This is in fact due to UserList assuming that $record{permission} is defined when it is allowed to be undefined (as per the format of classlist files). I added a case that sets is to $default_permission_level if it is not defined. FIXED in branch rel-2-2-dev revision 1.75.2.1. Forwarded-ported with no modifications to HEAD in this revision. Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator/Instructor: UserList.pm Revision Data ------------- Index: UserList.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Instructor/UserList.pm,v retrieving revision 1.75 retrieving revision 1.76 diff -Llib/WeBWorK/ContentGenerator/Instructor/UserList.pm -Llib/WeBWorK/ContentGenerator/Instructor/UserList.pm -u -r1.75 -r1.76 --- lib/WeBWorK/ContentGenerator/Instructor/UserList.pm +++ lib/WeBWorK/ContentGenerator/Instructor/UserList.pm @@ -1327,6 +1327,11 @@ next; } + # make sure permission level is defined + if (not defined $record{permission}) { + $record{permission} = $default_permission_level; + } + # make sure permission level is numeric unless ($record{permission} =~ m/^[+\-]?\d*$/) { $self->addbadmessage("permission level '$record{permission}' for user '$user_id' is not an integer. using default permission level '$default_permission_level'.\n"); |
From: Sam H. v. a. <we...@ma...> - 2006-01-10 00:11:06
|
Log Message: ----------- Resolves bug #942, in which a missing permission level field causes a warning: This is in fact due to UserList assuming that $record{permission} is defined when it is allowed to be undefined (as per the format of classlist files). I added a case that sets is to $default_permission_level if it is not defined. Tags: ---- rel-2-2-dev Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator/Instructor: UserList.pm Revision Data ------------- Index: UserList.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Instructor/UserList.pm,v retrieving revision 1.75 retrieving revision 1.75.2.1 diff -Llib/WeBWorK/ContentGenerator/Instructor/UserList.pm -Llib/WeBWorK/ContentGenerator/Instructor/UserList.pm -u -r1.75 -r1.75.2.1 --- lib/WeBWorK/ContentGenerator/Instructor/UserList.pm +++ lib/WeBWorK/ContentGenerator/Instructor/UserList.pm @@ -1327,6 +1327,11 @@ next; } + # make sure permission level is defined + if (not defined $record{permission}) { + $record{permission} = $default_permission_level; + } + # make sure permission level is numeric unless ($record{permission} =~ m/^[+\-]?\d*$/) { $self->addbadmessage("permission level '$record{permission}' for user '$user_id' is not an integer. using default permission level '$default_permission_level'.\n"); |
From: Sam H. v. a. <we...@ma...> - 2006-01-10 00:01:25
|
Log Message: ----------- I've modified the renameCourse code to simply issue a warning when a course directory (other than the course root dir) is not movable. I've also added error checking for some of the more common reasons for directories to not be movable, so that the warning message is more informative. Resolves bug #943. Originally committed to branch rel-2-2-dev. Forward-ported without modification to HEAD. Modified Files: -------------- webwork2/lib/WeBWorK/Utils: CourseManagement.pm Revision Data ------------- Index: CourseManagement.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/Utils/CourseManagement.pm,v retrieving revision 1.27 retrieving revision 1.28 diff -Llib/WeBWorK/Utils/CourseManagement.pm -Llib/WeBWorK/Utils/CourseManagement.pm -u -r1.27 -r1.28 --- lib/WeBWorK/Utils/CourseManagement.pm +++ lib/WeBWorK/Utils/CourseManagement.pm @@ -28,6 +28,7 @@ use Carp; use DBI; use File::Path qw(rmtree); +use File::Spec; use WeBWorK::CourseEnvironment; use WeBWorK::Debug; use WeBWorK::Utils qw(runtime_use readDirectory); @@ -342,17 +343,47 @@ my %newCourseDirs = %{ $newCE->{courseDirs} }; my @courseDirNames = sort { $oldCourseDirs{$a} cmp $oldCourseDirs{$b} } keys %oldCourseDirs; foreach my $courseDirName (@courseDirNames) { - my $oldDir = $oldCourseDirs{$courseDirName}; - my $newDir = $newCourseDirs{$courseDirName}; + my $oldDir = File::Spec->canonpath($oldCourseDirs{$courseDirName}); + my $newDir = File::Spec->canonpath($newCourseDirs{$courseDirName}); if (-e $oldDir) { debug("oldDir $oldDir still exists. might move it...\n"); + + # check for a few likely error conditions, since the mv error is not that helpful + + # is the source really a directory + unless (-d $oldDir) { + warn "$courseDirName: Can't move '$oldDir' to '$newDir', since the source is not a directory. You will have to move this directory manually.\n"; + next; + } + + # does the destination already exist? if (-e $newDir) { - warn "Can't move '$oldDir' to '$newDir', since the target already exists"; - } else { - debug("Going to move $oldDir to $newDir...\n"); - my $mvResult = system $mvCmd, $oldDir, $newDir; - $mvResult and die "failed to move directory with command: '$mvCmd $oldDir $newDir' (errno: $mvResult): $!\n"; + warn "$courseDirName: Can't move '$oldDir' to '$newDir', since the target already exists. You will have to move this directory manually.\n"; + next; + } + + # is oldDir's parent writeable + my @oldDirElements = File::Spec->splitdir($oldDir); + pop @oldDirElements; + my $oldDirParent = File::Spec->catdir(@oldDirElements); + unless (-w $oldDirParent) { + warn "$courseDirName: Can't move '$oldDir' to '$newDir', since the source parent directory is not writeable. You will have to move this directory manually.\n"; + next; + } + + # is newDir's parent writeable? + my @newDirElements = File::Spec->splitdir($newDir); + pop @newDirElements; + my $newDirParent = File::Spec->catdir(@newDirElements); + unless (-w $newDirParent) { + warn "$courseDirName: Can't move '$oldDir' to '$newDir', since the destination parent directory is not writeable. You will have to move this directory manually.\n"; + next; } + + # try to move the directory + debug("Going to move $oldDir to $newDir...\n"); + my $mvResult = system $mvCmd, $oldDir, $newDir; + $mvResult and warn "$courseDirName: failed to move directory with command: '$mvCmd $oldDir $newDir' (errno: $mvResult): $! You will have to move this directory manually.\n"; } else { debug("oldDir $oldDir was already moved.\n"); } |
From: Sam H. v. a. <we...@ma...> - 2006-01-09 23:57:43
|
Log Message: ----------- I've modified the renameCourse code to simply issue a warning when a course directory (other than the course root dir) is not movable. I've also added error checking for some of the more common reasons for directories to not be movable, so that the warning message is more informative. Resolves bug #943. Tags: ---- rel-2-2-dev Modified Files: -------------- webwork2/lib/WeBWorK/Utils: CourseManagement.pm Revision Data ------------- Index: CourseManagement.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/Utils/CourseManagement.pm,v retrieving revision 1.27 retrieving revision 1.27.2.1 diff -Llib/WeBWorK/Utils/CourseManagement.pm -Llib/WeBWorK/Utils/CourseManagement.pm -u -r1.27 -r1.27.2.1 --- lib/WeBWorK/Utils/CourseManagement.pm +++ lib/WeBWorK/Utils/CourseManagement.pm @@ -28,6 +28,7 @@ use Carp; use DBI; use File::Path qw(rmtree); +use File::Spec; use WeBWorK::CourseEnvironment; use WeBWorK::Debug; use WeBWorK::Utils qw(runtime_use readDirectory); @@ -342,17 +343,47 @@ my %newCourseDirs = %{ $newCE->{courseDirs} }; my @courseDirNames = sort { $oldCourseDirs{$a} cmp $oldCourseDirs{$b} } keys %oldCourseDirs; foreach my $courseDirName (@courseDirNames) { - my $oldDir = $oldCourseDirs{$courseDirName}; - my $newDir = $newCourseDirs{$courseDirName}; + my $oldDir = File::Spec->canonpath($oldCourseDirs{$courseDirName}); + my $newDir = File::Spec->canonpath($newCourseDirs{$courseDirName}); if (-e $oldDir) { debug("oldDir $oldDir still exists. might move it...\n"); + + # check for a few likely error conditions, since the mv error is not that helpful + + # is the source really a directory + unless (-d $oldDir) { + warn "$courseDirName: Can't move '$oldDir' to '$newDir', since the source is not a directory. You will have to move this directory manually.\n"; + next; + } + + # does the destination already exist? if (-e $newDir) { - warn "Can't move '$oldDir' to '$newDir', since the target already exists"; - } else { - debug("Going to move $oldDir to $newDir...\n"); - my $mvResult = system $mvCmd, $oldDir, $newDir; - $mvResult and die "failed to move directory with command: '$mvCmd $oldDir $newDir' (errno: $mvResult): $!\n"; + warn "$courseDirName: Can't move '$oldDir' to '$newDir', since the target already exists. You will have to move this directory manually.\n"; + next; + } + + # is oldDir's parent writeable + my @oldDirElements = File::Spec->splitdir($oldDir); + pop @oldDirElements; + my $oldDirParent = File::Spec->catdir(@oldDirElements); + unless (-w $oldDirParent) { + warn "$courseDirName: Can't move '$oldDir' to '$newDir', since the source parent directory is not writeable. You will have to move this directory manually.\n"; + next; + } + + # is newDir's parent writeable? + my @newDirElements = File::Spec->splitdir($newDir); + pop @newDirElements; + my $newDirParent = File::Spec->catdir(@newDirElements); + unless (-w $newDirParent) { + warn "$courseDirName: Can't move '$oldDir' to '$newDir', since the destination parent directory is not writeable. You will have to move this directory manually.\n"; + next; } + + # try to move the directory + debug("Going to move $oldDir to $newDir...\n"); + my $mvResult = system $mvCmd, $oldDir, $newDir; + $mvResult and warn "$courseDirName: failed to move directory with command: '$mvCmd $oldDir $newDir' (errno: $mvResult): $! You will have to move this directory manually.\n"; } else { debug("oldDir $oldDir was already moved.\n"); } |
From: jj v. a. <we...@ma...> - 2006-01-09 19:19:02
|
Log Message: ----------- Fixed the following bug: if you are importing multiple sets and (stupidly) include the line "the following file(s)" in your multiple selection (which can happen if you are trying to get everything), then you would get a cryptic error and nothing would be imported. Modified Files: -------------- webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor: ProblemSetList.pm Revision Data ------------- Index: ProblemSetList.pm =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetList.pm,v retrieving revision 1.87 retrieving revision 1.88 diff -Llib/WeBWorK/ContentGenerator/Instructor/ProblemSetList.pm -Llib/WeBWorK/ContentGenerator/Instructor/ProblemSetList.pm -u -r1.87 -r1.88 --- lib/WeBWorK/ContentGenerator/Instructor/ProblemSetList.pm +++ lib/WeBWorK/ContentGenerator/Instructor/ProblemSetList.pm @@ -1364,6 +1364,11 @@ my $db = $r->db; my $dir = $ce->{courseDirs}->{templates}; + # if the user includes "following files" in a multiple selection + # it shows up here as "" which causes the importing to die + # so, we select on filenames containing non-whitespace + @setDefFiles = grep(/\S/, @setDefFiles); + # FIXME: do we really want everything to fail on one bad file name? foreach my $fileName (@setDefFiles) { die "won't be able to read from file $dir/$fileName: does it exist? is it readable?" |
From: Mike G. v. a. <we...@ma...> - 2006-01-09 00:08:30
|
Log Message: ----------- Changes to make sure that temporary files are read while editing. Tags: ---- rel-2-2-dev Modified Files: -------------- webwork-modperl/lib/WeBWorK/ContentGenerator: ProblemSet.pm Revision Data ------------- Index: ProblemSet.pm =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerator/ProblemSet.pm,v retrieving revision 1.70.2.1 retrieving revision 1.70.2.2 diff -Llib/WeBWorK/ContentGenerator/ProblemSet.pm -Llib/WeBWorK/ContentGenerator/ProblemSet.pm -u -r1.70.2.1 -r1.70.2.2 --- lib/WeBWorK/ContentGenerator/ProblemSet.pm +++ lib/WeBWorK/ContentGenerator/ProblemSet.pm @@ -210,8 +210,10 @@ my $displayMode = $r->param("displayMode") || $ce->{pg}->{options}->{displayMode}; if (defined $r->param("editMode") and $r->param("editMode") eq "temporaryFile") { - my $screenHeaderPath = $r->param('sourceFilePath'); + $screenSetHeader = $r->param('sourceFilePath'); #$screenSetHeader = "$screenSetHeader.$userID.tmp"; + $self->addmessage(CGI::div({class=>'temporaryFile'}, "Viewing temporary file: ", + $screenSetHeader)); $displayMode = $r->param("displayMode") if $r->param("displayMode"); } |
From: Mike G. v. a. <we...@ma...> - 2006-01-08 18:22:27
|
Log Message: ----------- Merging changes from rel-2-2-dev into HEAD Modified Files: -------------- webwork-modperl/lib/WeBWorK/ContentGenerator: Problem.pm ProblemSet.pm ProblemSets.pm webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor: PGProblemEditor.pm Revision Data ------------- Index: Problem.pm =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerato= r/Problem.pm,v retrieving revision 1.191 retrieving revision 1.192 diff -Llib/WeBWorK/ContentGenerator/Problem.pm -Llib/WeBWorK/ContentGener= ator/Problem.pm -u -r1.191 -r1.192 --- lib/WeBWorK/ContentGenerator/Problem.pm +++ lib/WeBWorK/ContentGenerator/Problem.pm @@ -831,7 +831,7 @@ my $editorPage =3D $urlpath->newFromModule("WeBWorK::ContentGenerator:= :Instructor::PGProblemEditor", courseID =3D> $courseName, setID =3D> $set->set_id, problemID =3D> $p= roblem->problem_id); my $editorURL =3D $self->systemLink($editorPage, params=3D>$forced_fie= ld); - $editorLink =3D CGI::p(CGI::a({href=3D>$editorURL}, "Edit this problem= ")); + $editorLink =3D CGI::p(CGI::a({href=3D>$editorURL,target =3D>'WW_Edito= r'}, "Edit this problem")); } =09 ##### translation errors? ##### Index: ProblemSets.pm =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerato= r/ProblemSets.pm,v retrieving revision 1.65 retrieving revision 1.66 diff -Llib/WeBWorK/ContentGenerator/ProblemSets.pm -Llib/WeBWorK/ContentG= enerator/ProblemSets.pm -u -r1.65 -r1.66 --- lib/WeBWorK/ContentGenerator/ProblemSets.pm +++ lib/WeBWorK/ContentGenerator/ProblemSets.pm @@ -51,7 +51,8 @@ # deal with instructor crap if ($authz->hasPermissions($user, "access_instructor_tools")) { if (defined $r->param("editMode") and $r->param("editMode") eq "tempo= raryFile") { - $course_info_path .=3D ".$user.tmp"; # this gets a big FIXME for obv= ious reasons + $course_info_path =3D $r->param("sourceFilePath"); + $self->addmessage(CGI::div({class=3D>'temporaryFile'}, "Viewing temp= orary file: ", $course_info_path)); } =09 my $editorPage =3D $urlpath->newFromModule("WeBWorK::ContentGenerator= ::Instructor::PGProblemEditor", courseID =3D> $courseID); Index: ProblemSet.pm =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerato= r/ProblemSet.pm,v retrieving revision 1.70 retrieving revision 1.71 diff -Llib/WeBWorK/ContentGenerator/ProblemSet.pm -Llib/WeBWorK/ContentGe= nerator/ProblemSet.pm -u -r1.70 -r1.71 --- lib/WeBWorK/ContentGenerator/ProblemSet.pm +++ lib/WeBWorK/ContentGenerator/ProblemSet.pm @@ -210,7 +210,8 @@ my $displayMode =3D $r->param("displayMode") || $ce->{pg}->{options= }->{displayMode}; =09 if (defined $r->param("editMode") and $r->param("editMode") eq "tempora= ryFile") { - $screenSetHeader =3D "$screenSetHeader.$userID.tmp"; + my $screenHeaderPath =3D $r->param('sourceFilePath'); + #$screenSetHeader =3D "$screenSetHeader.$userID.tmp"; $displayMode =3D $r->param("displayMode") if $r->param("displayMode"); } =09 Index: PGProblemEditor.pm =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerato= r/Instructor/PGProblemEditor.pm,v retrieving revision 1.68 retrieving revision 1.69 diff -Llib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -Llib/W= eBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -u -r1.68 -r1.69 --- lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm +++ lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm @@ -1,7 +1,9 @@ ########################################################################= ######## # WeBWorK Online Homework Delivery System # Copyright =A9 2000-2003 The WeBWorK Project, http://openwebwork.sf.net= / + # $CVSHeader$ + #=20 # This program is free software; you can redistribute it and/or modify i= t under # the terms of either: (a) the GNU General Public License as published b= y the @@ -399,12 +401,16 @@ sub title { my $self =3D shift; my $r =3D $self->r; + my $courseName =3D $r->urlpath->arg("courseID"); + my $setID =3D $r->urlpath->arg("setID"); my $problemNumber =3D $r->urlpath->arg("problemID"); my $file_type =3D $self->{'file_type'} || ''; - return "Set Header" if ($file_type eq 'set_header'); - return "Hardcopy Header" if ($file_type eq 'hardcopy_header'); - return "Course Information" if ($file_type eq 'course_info'); + + return "Set Header for set $setID" if ($file_type eq 'set_header'); + return "Hardcopy Header for set $setID" if ($file_type eq 'hardcopy_hea= der'); + return "Course Information for course $courseName" if ($file_type eq 'c= ourse_info'); return "Options Information" if ($file_type eq 'options_info'); + return 'Problem ' . $r->{urlpath}->name; } =20 @@ -711,6 +717,7 @@ } $path; } + sub determineOriginalEditFilePath { # determine the original path to a = file corresponding to a temporary edit file # returns path relative to the temp= late directory my $self =3D shift; @@ -760,6 +767,7 @@ $path =3D "$templatesDirectory/$path"; } my $tmpEditFileDirectory =3D $self->getTempEditFileDirectory(); + ($path =3D~/^$tmpEditFileDirectory/) ? 1: 0; } sub getFilePaths { @@ -1075,8 +1083,11 @@ } sub view_form { my ($self, $onChange, %actionParams) =3D @_; + my $file_type =3D $self->{file_type}; + return "" if $file_type eq 'hardcopy_header'; # these can't yet be = edited from temporary files #FIXME my $output_string =3D "View"; - unless ($self->{file_type} eq 'course_info' || $self->{file_type} eq 'o= ptions_info') { + unless ($file_type eq 'course_info' || $file_type eq 'options_info') { + $output_string .=3D join(" ", ## " problem using seed ", " using seed ", @@ -1140,7 +1151,7 @@ =09 } ); - } elsif ($file_type eq 'set_header' or $file_type eq 'hardcopy_header')= { # redirect to ProblemSet + } elsif ($file_type eq 'set_header' ) { # redirect to ProblemSet my $problemPage =3D $self->r->urlpath->newFromModule("WeBWorK::Content= Generator::ProblemSet", courseID =3D> $courseName, setID =3D> $setName,=20 ); @@ -1152,20 +1163,39 @@ problemSeed =3D> $problemSeed, editMode =3D> "temporaryFile", edit_level =3D> $edit_level, + sourceFilePath =3D> $tempFilePath, status_message =3D> uri_escape($self->{status_message}) =09 } );=09 + } elsif ($file_type eq 'hardcopy_header') { # redirect to ProblemSet?? = # it's difficult to view temporary changes for hardcopy headers + my $problemPage =3D $self->r->urlpath->newFromModule("WeBWorK::Content= Generator::ProblemSet", + courseID =3D> $courseName, setID =3D> $setName,=20 + ); + =09 + $viewURL =3D $self->systemLink($problemPage, + params =3D> { + set_header =3D> $tempFilePath, + displayMode =3D> $displayMode, + problemSeed =3D> $problemSeed, + editMode =3D> "temporaryFile", + edit_level =3D> $edit_level, + sourceFilePath =3D> $tempFilePath, + status_message =3D> uri_escape($self->{status_message}) =09 + } + );=09 =09 } elsif ($file_type eq 'course_info') { # redirec to ProblemSets.pm my $problemSetsPage =3D $self->r->urlpath->newFromModule("WeBWorK::Con= tentGenerator::ProblemSets", courseID =3D> $courseName); $viewURL =3D $self->systemLink($problemSetsPage, params =3D> { + course_info =3D> $tempFilePath, editMode =3D> "temporaryFile", edit_level =3D> $edit_level, + sourceFilePath =3D> $tempFilePath, status_message =3D> uri_escape($self->{status_message}) } ); @@ -1174,9 +1204,10 @@ courseID =3D> $courseName); $viewURL =3D $self->systemLink($optionsPage, params =3D> { - options_info =3D> $tempFilePath, + options_info =3D> $tempFilePath, editMode =3D> "temporaryFile", edit_level =3D> $edit_level, + sourceFilePath =3D> $tempFilePath, status_message =3D> uri_escape($self->{status_message}) } ); @@ -1373,7 +1404,7 @@ =09 } ); - } elsif ($file_type eq 'set_header' or $file_type eq 'hardcopy_header')= { # redirect to ProblemSet + } elsif ($file_type eq 'set_header' ) { # redirect to ProblemSet my $problemPage =3D $self->r->urlpath->newFromModule("WeBWorK::Content= Generator::ProblemSet", courseID =3D> $courseName, setID =3D> $setName,=20 ); @@ -1388,7 +1419,21 @@ =09 } );=09 + } elsif ( $file_type eq 'hardcopy_header') { # redirect to ProblemSet + my $problemPage =3D $self->r->urlpath->newFromModule('WeBWorK::Content= Generator::Hardcopy', + courseID =3D> $courseName, setID =3D> $setName,=20 + ); + =09 + $viewURL =3D $self->systemLink($problemPage, + params =3D> { + displayMode =3D> $displayMode, + problemSeed =3D> $problemSeed, + editMode =3D> "savedFile", + edit_level =3D> 0, + status_message =3D> uri_escape($self->{status_message}) =09 + } + );=09 =09 } elsif ($file_type eq 'course_info') { # redirect to ProblemSets.pm my $problemSetsPage =3D $self->r->urlpath->newFromModule("WeBWorK::Con= tentGenerator::ProblemSets", @@ -1435,6 +1480,7 @@ } =20 =20 + sub make_local_copy_form { my ($self, $genericParams, $actionParams, $tableParams) =3D @_; my $editFilePath =3D $self->{editFilePath}; # path to the permanent = file to be edited @@ -1472,6 +1518,7 @@ } save_as_handler($self, $genericParams, $actionParams, $tableParams); =20 + } sub save_as_form { # calls the save_as_handler=20 my ($self, $onChange, %actionParams) =3D @_; @@ -1651,7 +1698,9 @@ $self->addbadmessage("Don't recognize saveMode: |$saveMode|. Unknown e= rror."); die "Don't recognize saveMode: |$saveMode|. Unknown error." } - warn "save mode is $saveMode"; + + #warn "save mode is $saveMode"; + my $viewURL =3D $self->systemLink($problemPage,=20 params=3D>{ sourceFilePath =3D> $outputFilePath, #The path relative to= the templates directory is required. @@ -1689,6 +1738,8 @@ } =20 =20 + + # sub make_local_copy_handler { # my ($self, $genericParams, $actionParams, $tableParams) =3D @_; # #$self->addgoodmessage("make_local_copy_handler called"); @@ -1809,4 +1860,5 @@ # } =20 =20 + 1; |
From: Mike G. v. a. <we...@ma...> - 2006-01-08 18:10:18
|
Log Message: ----------- Changes that allow viewing of set_header files and course_info files during the editing process. Basically the technique for finding the source file is redirected to the temporary files. Tags: ---- rel-2-2-dev Modified Files: -------------- webwork-modperl/lib/WeBWorK/ContentGenerator: ProblemSet.pm ProblemSets.pm webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor: PGProblemEditor.pm Revision Data ------------- Index: ProblemSets.pm =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerator/ProblemSets.pm,v retrieving revision 1.65 retrieving revision 1.65.2.1 diff -Llib/WeBWorK/ContentGenerator/ProblemSets.pm -Llib/WeBWorK/ContentGenerator/ProblemSets.pm -u -r1.65 -r1.65.2.1 --- lib/WeBWorK/ContentGenerator/ProblemSets.pm +++ lib/WeBWorK/ContentGenerator/ProblemSets.pm @@ -51,7 +51,8 @@ # deal with instructor crap if ($authz->hasPermissions($user, "access_instructor_tools")) { if (defined $r->param("editMode") and $r->param("editMode") eq "temporaryFile") { - $course_info_path .= ".$user.tmp"; # this gets a big FIXME for obvious reasons + $course_info_path = $r->param("sourceFilePath"); + $self->addmessage(CGI::div({class=>'temporaryFile'}, "Viewing temporary file: ", $course_info_path)); } my $editorPage = $urlpath->newFromModule("WeBWorK::ContentGenerator::Instructor::PGProblemEditor", courseID => $courseID); Index: ProblemSet.pm =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerator/ProblemSet.pm,v retrieving revision 1.70 retrieving revision 1.70.2.1 diff -Llib/WeBWorK/ContentGenerator/ProblemSet.pm -Llib/WeBWorK/ContentGenerator/ProblemSet.pm -u -r1.70 -r1.70.2.1 --- lib/WeBWorK/ContentGenerator/ProblemSet.pm +++ lib/WeBWorK/ContentGenerator/ProblemSet.pm @@ -210,7 +210,8 @@ my $displayMode = $r->param("displayMode") || $ce->{pg}->{options}->{displayMode}; if (defined $r->param("editMode") and $r->param("editMode") eq "temporaryFile") { - $screenSetHeader = "$screenSetHeader.$userID.tmp"; + my $screenHeaderPath = $r->param('sourceFilePath'); + #$screenSetHeader = "$screenSetHeader.$userID.tmp"; $displayMode = $r->param("displayMode") if $r->param("displayMode"); } Index: PGProblemEditor.pm =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm,v retrieving revision 1.66.2.2 retrieving revision 1.66.2.3 diff -Llib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -Llib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -u -r1.66.2.2 -r1.66.2.3 --- lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm +++ lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm @@ -399,11 +399,13 @@ sub title { my $self = shift; my $r = $self->r; + my $courseName = $r->urlpath->arg("courseID"); + my $setID = $r->urlpath->arg("setID"); my $problemNumber = $r->urlpath->arg("problemID"); my $file_type = $self->{'file_type'} || ''; - return "Set Header" if ($file_type eq 'set_header'); - return "Hardcopy Header" if ($file_type eq 'hardcopy_header'); - return "Course Information" if ($file_type eq 'course_info'); + return "Set Header for set $setID" if ($file_type eq 'set_header'); + return "Hardcopy Header for set $setID" if ($file_type eq 'hardcopy_header'); + return "Course Information for course $courseName" if ($file_type eq 'course_info'); return "Options Information" if ($file_type eq 'options_info'); return 'Problem ' . $r->{urlpath}->name; } @@ -1075,8 +1077,10 @@ } sub view_form { my ($self, $onChange, %actionParams) = @_; + my $file_type = $self->{file_type}; + return "" if $file_type eq 'hardcopy_header'; # these can't yet be edited from temporary files #FIXME my $output_string = "View"; - unless ($self->{file_type} eq 'course_info' || $self->{file_type} eq 'options_info') { + unless ($file_type eq 'course_info' || $file_type eq 'options_info') { $output_string .= join(" ", ## " problem using seed ", " using seed ", @@ -1140,7 +1144,7 @@ } ); - } elsif ($file_type eq 'set_header' or $file_type eq 'hardcopy_header') { # redirect to ProblemSet + } elsif ($file_type eq 'set_header' ) { # redirect to ProblemSet my $problemPage = $self->r->urlpath->newFromModule("WeBWorK::ContentGenerator::ProblemSet", courseID => $courseName, setID => $setName, ); @@ -1152,11 +1156,28 @@ problemSeed => $problemSeed, editMode => "temporaryFile", edit_level => $edit_level, + sourceFilePath => $tempFilePath, status_message => uri_escape($self->{status_message}) } ); + } elsif ($file_type eq 'hardcopy_header') { # redirect to ProblemSet?? # it's difficult to view temporary changes for hardcopy headers + my $problemPage = $self->r->urlpath->newFromModule("WeBWorK::ContentGenerator::ProblemSet", + courseID => $courseName, setID => $setName, + ); + + $viewURL = $self->systemLink($problemPage, + params => { + set_header => $tempFilePath, + displayMode => $displayMode, + problemSeed => $problemSeed, + editMode => "temporaryFile", + edit_level => $edit_level, + sourceFilePath => $tempFilePath, + status_message => uri_escape($self->{status_message}) + } + ); } elsif ($file_type eq 'course_info') { # redirec to ProblemSets.pm my $problemSetsPage = $self->r->urlpath->newFromModule("WeBWorK::ContentGenerator::ProblemSets", @@ -1166,6 +1187,7 @@ course_info => $tempFilePath, editMode => "temporaryFile", edit_level => $edit_level, + sourceFilePath => $tempFilePath, status_message => uri_escape($self->{status_message}) } ); @@ -1174,9 +1196,10 @@ courseID => $courseName); $viewURL = $self->systemLink($optionsPage, params => { - options_info => $tempFilePath, + options_info => $tempFilePath, editMode => "temporaryFile", edit_level => $edit_level, + sourceFilePath => $tempFilePath, status_message => uri_escape($self->{status_message}) } ); @@ -1373,7 +1396,7 @@ } ); - } elsif ($file_type eq 'set_header' or $file_type eq 'hardcopy_header') { # redirect to ProblemSet + } elsif ($file_type eq 'set_header' ) { # redirect to ProblemSet my $problemPage = $self->r->urlpath->newFromModule("WeBWorK::ContentGenerator::ProblemSet", courseID => $courseName, setID => $setName, ); @@ -1388,7 +1411,21 @@ } ); + } elsif ( $file_type eq 'hardcopy_header') { # redirect to ProblemSet + my $problemPage = $self->r->urlpath->newFromModule('WeBWorK::ContentGenerator::Hardcopy', + courseID => $courseName, setID => $setName, + ); + + $viewURL = $self->systemLink($problemPage, + params => { + displayMode => $displayMode, + problemSeed => $problemSeed, + editMode => "savedFile", + edit_level => 0, + status_message => uri_escape($self->{status_message}) + } + ); } elsif ($file_type eq 'course_info') { # redirect to ProblemSets.pm my $problemSetsPage = $self->r->urlpath->newFromModule("WeBWorK::ContentGenerator::ProblemSets", |
From: Mike G. v. a. <we...@ma...> - 2006-01-08 01:40:06
|
Log Message: ----------- Removed warning message. Tags: ---- rel-2-2-dev Modified Files: -------------- webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor: PGProblemEditor.pm Revision Data ------------- Index: PGProblemEditor.pm =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm,v retrieving revision 1.66.2.1 retrieving revision 1.66.2.2 diff -Llib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -Llib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -u -r1.66.2.1 -r1.66.2.2 --- lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm +++ lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm @@ -1652,7 +1652,7 @@ $self->addbadmessage("Don't recognize saveMode: |$saveMode|. Unknown error."); die "Don't recognize saveMode: |$saveMode|. Unknown error." } - warn "save mode is $saveMode"; + #warn "save mode is $saveMode"; my $viewURL = $self->systemLink($problemPage, params=>{ sourceFilePath => $outputFilePath, #The path relative to the templates directory is required. |