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: Arnie P. v. a. <we...@ma...> - 2008-06-26 18:45:04
|
Update of /webwork/cvs/system/webwork2/courses.dist/modelCourse/templates/setOrientation In directory devel.webwork.rochester.edu:/home/apizer/webwork/webwork2/courses.dist/modelCourse/templates/setOrientation Log Message: Directory /webwork/cvs/system/webwork2/courses.dist/modelCourse/templates/setOrientation added to the repository |
From: Mike G. v. a. <we...@ma...> - 2008-06-26 18:25:45
|
Log Message: ----------- recommiting these files Tags: ---- rel-2-4-patches Added Files: ----------- webwork2/conf/templates/math2: gateway.template system.template Revision Data ------------- |
From: Mike G. v. a. <we...@ma...> - 2008-06-26 18:25:03
|
Log Message: ----------- trying to fix a glitch in the cvs -- these files disappeared Tags: ---- rel-2-4-patches Removed Files: ------------- webwork2/conf/templates/math2: gateway.template math2.css system.template Revision Data ------------- --- conf/templates/math2/gateway.template +++ /dev/null @@ -1,100 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<!-- -################################################################################ -# WeBWorK Online Homework Delivery System -# Copyright © 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/ -# $CVSHeader: webwork2/conf/templates/math2/gateway.template,v 1.1.2.1 2008/06/24 17:17:36 gage Exp $ -# -# This program is free software; you can redistribute it and/or modify it under -# the terms of either: (a) the GNU General Public License as published by the -# Free Software Foundation; either version 2, or (at your option) any later -# version, or (b) the "Artistic License" which comes with this package. -# -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the -# Artistic License for more details. -################################################################################ ---> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> -<meta http-equiv="content-type" content="text/html; charset=utf-8" /> -<meta http-equiv="Pragma" content="no-cache"/> -<meta http-equiv="expires" content="Wed, 21 Dec 2005 00:00:01 GMT"/> -<link rel="stylesheet" type="text/css" href="<!--#url type="webwork" name="htdocs"-->/css/math.css"/> -<!-- [gateway] since the left-side menus are gone, don't indent the main content area --> -<link rel="stylesheet" type="text/css" href="<!--#url type="webwork" name="htdocs"-->/css/gateway.css"/> -<title><!--#path style="text" text=" : " textonly="1"--></title> -<!--#head--> -<script language="javascript" type="text/javascript" - src="<!--#url type="webwork" name="htdocs"-->/js/gateway.js"></script> -</head> -<body bgcolor="white"> -<div id="masthead"> - <div id="loginstatus"> - <!--#loginstatus--> - </div> - <div id="logo"> - <img src="<!--#url type="webwork" name="htdocs"-->/images/webwork_rectangle.png" alt="WeBWorK" height="51" width="267" /> - </div> -</div> -<hr class="for-broken-browsers"/> -<div id="big-wrapper"> - <div id="breadcrumbs"> - <!--#path style="text" text=" → "--> - </div> - <div id="content"> - - <!--#if can="info"--> - <!--<div id="page-info">--> - <!--<div class="info-box" id="fisheye">--> - <!--#info--> - <!--</div>--> - <!--</div>--> - <!--#endif--> - - <!-- [gateway] removed nav button to go up --> - - <!--#if can="title"--> - <h1><!--#title--></h1> - <!--#endif--> - - <!--#if can="message"--> - <div class="Message"> - <!--#message--> - </div> - <!--#endif--> - - <!--#if can="body"--> - <div class="Body"> - <!--#body--> - </div> - <!--#endif--> - - <!--#if warnings="1"--> - <hr> - <div class="Warnings"> - <!--#warnings--> - </div> - <!--#endif--> - - <!--#if can="message"--> - <div class="Message"> - <!--#message--> - </div> - <!--#endif--> - - </div> <!-- content --> - <hr class="for-broken-browsers"/> - <div id="footer"> - <p id="last-modified">Page generated at <!--#timestamp--></p> - <div id="copyright"> - WeBWorK © 2000-2007 <a href="http://openwebwork.sf.net/">The WeBWorK Project</a> - </div> - </div> - <!-- [gateway] removed left sidebar --> -</div> <!-- big-wrapper --> - -</body> -</html> --- conf/templates/math2/math2.css +++ /dev/null @@ -1,507 +0,0 @@ -/* WeBWorK Online Homework Delivery System - * Copyright © 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/ - * $CVSHeader: webwork2/conf/templates/math2/math2.css,v 1.1.2.1 2008/06/24 17:17:36 gage Exp $ - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of either: (a) the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any later - * version, or (b) the "Artistic License" which comes with this package. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the - * Artistic License for more details. - */ - -/* --- Standard elements ---------------------------------------------------- */ - -body { - background: white; - color: black; - margin: .5em .5em 0 .5em; /* MSIE ignores bottom margin; Gecko doesn't */ - padding: 0; - font-family: Times, serif; - min-width: 25em; -} - -h1, h2, h3, h4, h5, h6 { - font-family: "Trebuchet MS", "Arial", "Helvetica", sans-serif; - /* FIXME "You have no background-color with your color" */ - color: #225; - background: transparent; -} -h1 { font-size: 170%; } -h2 { font-size: 140%; padding-bottom: 0; margin-bottom: .5ex } -h3 { font-size: 120%; } -h4 { font-size: 110%; } -h5 { font-size: 105%; } -h6 { font-size: 105%; } - -a:link { color: #00e; background-color: inherit; } -a:visited { color: #808; background-color: inherit; } - -/* --- Miscellaneous classes ---------------------------------------------- */ - -/* show only to CSS-ignorant browsers */ -.for-broken-browsers { display: none } - -/* for hiding floats from Netscape 4.x */ -.float-left { float: left; } -.float-right { float: right; } - -/* --- Compound titles (class) ---------------------------------------------- */ - -/* WeBWorK is not using this, but it might be nice to have it around later */ - -/* "Split" title, with main heading left-aligned above a horizontal line, - * and subheading right-aligned below the line. Usage: - * - * <h1 class="compound">Alumni Newsletter</h1> - * <h2 class="compound">Spring '00</h2> - */ - -/*h1.compound { - border-bottom: 1px solid #559; - text-align: left; - padding: .5ex 0 0 0; - margin: 0; -} -h2.compound { float: right; margin: 0; padding: 0 }*/ - -/* --- Info box (class) ----------------------------------------------------- */ - -/* FIXME as a quick hack, the info() escape outputs a DIV with this class. - * don't let the placement of these styles fool you -- <div style="info-box"> - * is output by WeBWorK! */ - -/* Common style for a small box to hold supplemental info; typically this - * box will appear in a sidebar. Sample usage: - * - * <div class="info-box"> - * <h2>Announcements</h2> - * <ul> - * <li>foo</li> - * </ul> - * <a class="more" href="bar">Older announcements...</a> - * </div> - */ - -.info-box { - border: 1px solid #559; - /* FIXME: these aren't valid CSS, but they sure look nice :-P */ - border-radius-topright: 1.5ex; border-radius-topleft: 1.5ex; - -moz-border-radius-topright: 1.5ex; -moz-border-radius-topleft: 1.5ex; - margin-bottom: 1ex; - margin-top: 0; - overflow: hidden; -} -.info-box h2, -.info-box h3, -.info-box h4, -.info-box h5, -.info-box h6 { - /* FIXME: these aren't valid CSS, but they sure look nice :-P */ - border-radius-topright: 1.5ex; border-radius-topleft: 1.5ex; - -moz-border-radius-topright: 1.5ex; -moz-border-radius-topleft: 1.5ex; - border-bottom: 1px solid #559; - font-size: 100%; - text-align: center; - background: #88d; - color: white; - margin: 0; - padding: 0 .5em 0 .5em; -} -.info-box h2 a, -.info-box h3 a, -.info-box h4 a, -.info-box h5 a, -.info-box h6 a { - color: #fff; - background: inherit; -} -.info-box ul, -.info-box ol { - margin: 1ex .5em 1ex 0; - padding-left: 3.5em; - font-size: 80%; -} -.info-box dl { - margin: 1ex .5em 1ex 1ex; - padding: 0; - font-size: 80%; -} -.info-box li, -.info-box dt { - margin: 0 0 .5ex 0; - padding: 0; - line-height: 2.2ex; -} -.info-box dt { font-weight: bold } -.info-box dd { - margin: 0 0 .5ex 1em; - padding: 0; - line-height: 2.2ex; -} -.info-box dd p { - margin-top: 0; -} -.info-box a.more { - float: right; - font-size: 80%; - font-style: italic; - margin-bottom: 1ex; - margin-right: .5em; -} - -.Message { -background-color:#ddd; -} -/* --- Fisheye view (id) ---------------------------------------------------- */ - -/* The "fisheye" view: a hierarchical view of the website to show the - * user where they are in the document hierarchy. Provides more "lateral" - * information than breadcrumbs, but not as much as a full sitemap. To - * appear within the #site-navigation div. Inherits many of its attributes - * from class info-box, and overrides some. - */ - -#mini-sitemap, -#fisheye { - font-family: "Trebuchet MS", "Arial", "Helvetica", sans-serif; - padding: 0 0 1ex 0; -} -#mini-sitemap a, -#fisheye a { - text-decoration: none; -} -#mini-sitemap a:hover, -#fisheye a:hover { - text-decoration: underline; -} -#mini-sitemap li, -#fisheye li { - line-height: 2.5ex; - margin: 0; -} -#mini-sitemap ul, -#fisheye ul { - font-size: 90%; - list-style-type: none; - margin: 0 .1em .3ex .3em; - padding: 0; -} -#mini-sitemap ul ul, -#fisheye ul ul { - font-size: 90%; - margin-left: 0; -} -#mini-sitemap ul li, -#fisheye ul li { - font-weight: bold; -} -#mini-sitemap ul ul ul, -#fisheye ul ul ul { - font-size: 95%; - margin-left: .3em; - padding-left: .5em; - border-left: 1px dotted gray; -} -#mini-sitemap ul ul li a.active, -#fisheye ul ul li a.active { - font-weight: bold; - color: black; - background-color: inherit; -} -#mini-sitemap ul ul ul li, -#fisheye ul ul ul li { - font-weight: normal; -} -#mini-sitemap ul ul ul ul, -#fisheye ul ul ul ul { - font-size: 90%; -} -#mini-sitemap ul ul ul ul ul, -#fisheye ul ul ul ul ul { - font-size: 90%; -} - -/* --- Common layout elements for documents using templates ----------------- */ - -/* The "masthead" of our document that tells users what site they're on. - * It contains a logo-ish title and some basic site navigation. The - * masthead should appear at the top of the page, but we're not positioning - * it absolutely because we can't know its height in advance. Therefore this - * element should be placed at the very top of the <body> of our HTML document. - */ -#masthead { - font-family: "Trebuchet MS", "Arial", "Helvetica", sans-serif; - font-size: 100%; - margin: 0; - padding: 0; - color: #fff; - border: 1px solid #000; - background-color: #038; - /* [ww] we could have some sort of spider web image here. */ - /*background-image: url("/images/mandel-wide.jpg");*/ - background-repeat: repeat-x; - background-position: top left; -} -#masthead a { - /* FIXME "You have no background-color with your color" */ - color: #fff; - background: transparent; -} -/* [ww] since this is a logo and not text, we need borders that are the same - * width all the way around. after we find a nice background image, we can - * turn these back on. */ -/*#masthead #logo { padding: .5ex .2em .1ex .5em }*/ -#masthead #logo { padding: 1ex } -/* [ww] don't need these -- logo itself an image */ -/*#masthead #logo h1 { - background-image: none; - background-color: transparent; - font-size: 100%; - font-weight: normal; - padding: 0; - margin: 0; - white-space: nowrap; - line-height: 1.9ex; -}*/ -/*#masthead #logo h2 { - background-color: transparent; - background-image: none; - font-weight: bold; - font-size: 210%; - line-height: 1.9ex; - margin: 0; - padding: 0; -}*/ -/* [ww] instead of a search form, we want the loginstatus there */ -/*#masthead form {*/ -#masthead #loginstatus { - float: right; - padding: 0; - margin: 1ex .5em .1ex .1em; - font-size: smaller; -} -#masthead #loginstatus #Nav { - padding: 1ex; -} - -/* "big-wrapper" contains everything other than the masthead. It's merely - * a relatively positioned div that allows us to use absolute positioning - * on elements within it -- and because it's relatively positioned, - * absolutely positioned objects *stay* within it. - */ -#big-wrapper { - position: relative; - top: 1ex; - width: 100%; - min-width: 18em; - margin: 0; - border: 0; -} - -/* - * A simple list of "breadcrumbs" showing a path of links from the root of - * the site's hierarchy to our present location. We are not positioning - * this element absolutely, because we don't know in advance how tall it - * will be, and we might want to place content under it. So when coding - * our HTML document, we'll probably want to include this element right - * before the main content. - */ - -#breadcrumbs { - margin-left: 10.4em; - margin-right: 0; - padding: 0 .4em; - border: 1px solid #559; - background: #88d; - color: #fff; - text-align: left; - font-size: 100%; - font-family: "Trebuchet MS", "Arial", sans-serif; -} -#breadcrumbs a { - font-size: 100%; - white-space: nowrap; - background-color: inherit; - color: #fff; - text-decoration: none; -} -#breadcrumbs a.active { font-weight: bold; } -#breadcrumbs a:hover { text-decoration: underline; } - - -/* For the more CSS-compliant browsers, we'd like to provide site-wide - * navigation links (e.g., a mini site map) to appear in a column along - * the left side of the page, just below the masthead. This column is - * absolutely positioned, so that ideally we should be able to include its - * contents anywhere within the body of our HTML documents. However, we - * probably want to include this data at the END of our documents -- after - * the main content -- so that it doesn't interfere with document flow in - * browsers that don't understand CSS (e.g., lynx) -- or in browsers for - * which we've disabled CSS via some hack (e.g. Netscape Navigator 4.x). - * - * We consider this meta-information to be non-essential; it is NOT part of - * the content, and may not be displayed in some circumstances. - */ -#site-navigation { - position: absolute; - left: 0; - top: 0; - margin: 0; - padding: 0; - width: 9.8em; -} - -/* The primary information content of the document, excluding masthead and - * site navigation. We want to leave a wide left margin to prevent overlap - * with our site map, which will be displayed on the left-hand side of the - * screen. - */ -#content { - margin: .5em 0 0 10.4em; - padding: 0 0 0 0; - font-family: "Times", serif; - /* border-left: 1px dotted #bbf; */ -} -#content h1 { margin: .4ex 0; } /* for crappy MSIE */ - - -#footer { - /* white-space: nowrap; */ - clear: both; - /* border-top: 1px solid #559; */ - margin: 0 .5em .2ex 10.4em; - padding: 0; - font-family: "Trebuchet MS", "Arial", "Helvetica", sans-serif; -} -#copyright { font-size: 75%; margin: 0;} -#last-modified { - clear: both; - font-family: "Trebuchet MS", "Arial", "Helvetica", sans-serif; - font-size: 75%; - background-color: inherit; - color: #444; - margin: 1ex 0 0 0; - padding: 0; - border-bottom: 1px solid #559; -} - -/* --- WeBWorK classes ------------------------------------------------------ */ - -/* These classes are emitted by WeBWorK code and should appear in ANY WeBWorK - * template. they need not be implemented the same way in each template though. - * (These are mostly copied from ur.css right atm.) - */ - -/* the info escape emits a DIV with this id. (note that the same DIV has class - * "info-box" which is given above in the "template styles" section. Regardless, - * it is emitted by WW code in ProblemSet.pl (not in system.template) ! */ -#InfoPanel { - font-size:100%; - float: right; - width: 40%; - overflow: auto; - margin-right: -1px; - background-color: #fff; -} -#InfoPanel ol { - font-size:100%; -} - -/* tables used for laying out form fields shouldn't have a border */ -table.FormLayout { border: 0; } -table.FormLayout tr { vertical-align: top; } -table.FormLayout th.LeftHeader { text-align: right; white-space: nowrap; } -table.FormLayout tr.ButtonRow { text-align: left; } -table.FormLayout tr.ButtonRowCenter { text-align: center; } - -/* for problems which are rendered by themselves, e.g., by Set Maker */ -div.RenderSolo { background-color: #E0E0E0; color: black; } -div.AuthorComment { background-color: #00E0E0; color: black; } - -/* minimal style for lists of links (generated by the links escape) */ -/*ul.LinksMenu { list-style: none; margin-left: 0; padding-left: 0; }*/ -/*ul.LinksMenu ul { list-style: none; margin-left: 0.5em; padding-left: 0; }*/ - -/* background styles for success and failure messages */ -div.WarningMessage { background-color: #ffcccc; padding: 3px 3px 3px 3px; } -div.ResultsWithoutError { color: inherit; background-color: #8F8; } /* green */ -div.ResultsWithError { color: #C33; background-color: inherit; } /* red */ -div.ResultsAlert { color: #F60; background-color: inherit; } /* orange */ - -/* styles used by WeBWorK::HTML::ScrollingRecordList */ -div.ScrollingRecordList { padding: 1em; white-space: nowrap; border: thin solid gray; } -div.ScrollingRecordList select.ScrollingRecordList { width: 99%; } - -/* wraps the View Options form (generated by &optionsMacro) */ -/* FIXME: can't this style information just go in div.Options above? */ -div.viewOptions { font-size: small } - -/* messages, attempt results, answer previews, etc. go in this DIV */ -/* this used to be "float:left", but that was suspected of causing MSIE peekaboo bug */ -div.problemHeader {} - -/* styles for the attemptResults table */ -table.attemptResults { - border-style: outset; - border-width: 1px; - margin: 0px 10pt; - border-spacing: 1px; -} -table.attemptResults td, -table.attemptResults th { - border-style: inset; - border-width: 1px; - text-align: center; - /*width: 15ex;*/ /* this was erroniously commented out with "#" */ - padding: 2px 5px 2px 5px; - color: inherit; - background-color: #DDDDDD; -} -/* override above settings in tables used to display ans_array results */ -table.attemptResults td td, -table.attemptResults td th, -table.ArrayLayout td { - border-style: none; - border-width: 0px; - padding: 0px; -} -table.attemptResults td.Message { - text-align: left; - padding: 2px 5px 2px 5px; - width: auto; -} -.attemptResultsSummary { font-style: italic; } -.parsehilight { color: inherit; background-color: yellow; } - -/* the problem TEXT itself does in this box */ -/* we used to make this a grey box, but surprise, MSIE is bug-ridden. */ -div.problem { } - -/* jsMath emits this class when appropriate math fonts aren't available */ -div.NoFontMessage { - padding: 10px; - border-style: solid; - border-width: 3px; - border-color: #DD0000; - color: inherit; - background-color: #FFF8F8; - width: 75%; - text-align: left; - margin: 10px auto 10px 12%; -} - -/* text colors for published and unpublished sets */ -font.Published { font-style: normal; font-weight: normal; color: #000000; background-color: inherit; } /* black */ -font.Unpublished { font-style: italic; font-weight: normal; color: #aaaaaa; background-color: inherit; } /* light grey */ - -/* styles used when editing a temporary file */ -.temporaryFile { font-style: italic; color: #F60; background-color: inherit; } - -/* text colors for Auditing, Current, and Dropped students */ -.Audit { font-style: normal; color: purple; background-color: inherit; } -.Enrolled { font-weight: normal; color: black; background-color: inherit; } -.Drop { font-style: italic; color: gray; background-color: inherit; } --- conf/templates/math2/system.template +++ /dev/null @@ -1,128 +0,0 @@ -<!DOCTYPE html - PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<!-- -################################################################################ -# WeBWorK Online Homework Delivery System -# Copyright © 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/ -# $CVSHeader: webwork2/conf/templates/math2/system.template,v 1.1.2.3 2008/06/26 14:59:23 gage Exp $ -# -# This program is free software; you can redistribute it and/or modify it under -# the terms of either: (a) the GNU General Public License as published by the -# Free Software Foundation; either version 2, or (at your option) any later -# version, or (b) the "Artistic License" which comes with this package. -# -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the -# Artistic License for more details. -################################################################################ ---> - - -<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"> -<head> -<meta http-equiv="content-type" content="text/html; charset=utf-8" /> -<link rel="stylesheet" type="text/css" href="<!--#url type="webwork" name="htdocs"-->/css/math2.css"/> -<title><!--#path style="text" text=" : " textonly="1"--></title> -<!--#head--> -</head> -<body bgcolor="white" onload="if (typeof(initializeAction) == 'function') {initializeAction()}"> - -<div id="masthead"> - <div id="loginstatus"> - <!--#loginstatus--> - <!--#if can="nav"--> - <div id="Nav"> - <!--#nav style="images" imageprefix="/webwork2_files/images/nav" imagesuffix=".gif" separator=" "--> - </div> - <!--#endif--> - - </div> - <div id="logo"> - <img src="<!--#url type="webwork" name="htdocs"-->/images/webwork_rectangle.png" alt="WeBWorK" height="51" width="267" /> - </div> -</div> -<hr class="for-broken-browsers"/> -<div id="big-wrapper"> - <div id="breadcrumbs"> - <!--#path style="text" text=" → "--> - </div> - <div id="content" > - - <!--#if can="title"--> - <span style="font-size:larger; color:#00F; float:left; width:60%; "><!--#title--></span> - <!--#endif--> - <!--#if can="message"--> - <span class="Message" style=" float:right; width:40%; right:0;"> - <!--#message--> - </span> - <!--#endif--> - - <hr style="clear:both"/> - <!--#if can="info"--> - <!-- styles could be different for different pages so they are not set here --> - <!--#info--> - <!--#endif--> - - <!--#if can="body"--> - <!--#if warnings="1"--> - <div class="Body" style="background-color:#ffcccc"> - <p style="font-size:larger"> - Warning -- there may be something wrong with this question. Please inform your instructor - including the warning messages below. - </p> - <!--#else--> - <div class="Body" style="background-color:#ffffff"> - <!--#endif--> - - <!--#body--> - </div> - <!--#endif--> - - <!--#if warnings="1"--> - - <hr/> - <div class="Warnings"> - <!--#warnings--> - </div> - <!--#endif--> - - <!--#if can="message"--> - <div class="Message"> - <!--#message--> - </div> - <!--#endif--> - - - <hr class="for-broken-browsers"/> - <div id="footer"> - <p id="last-modified">Page generated at <!--#timestamp--></p> - <div id="copyright"> - WeBWorK © 2000-2007 <a href="http://openwebwork.sf.net/">The WeBWorK Project</a> - </div> - </div> - <div id="site-navigation"> - <!--#if can="links"--> - <div class="info-box" id="fisheye"> - <h2>Main Menu</h2> - <!--#links--> - </div> - <!--#endif--> - <!--#if can="siblings"--> - <!--#siblings--> - <!--#endif--> - <!--#if can="options"--> - <div class="info-box" id="fisheye"> - <h2>Display Options</h2> - <!--#options--> - </div> - <!--#endif--> - </div> - -</div><!--content--> -</div> <!-- big-wrapper --> - -</body> -</html> |
From: Mike G. v. a. <we...@ma...> - 2008-06-26 17:39:17
|
Log Message: ----------- This file was a duplicate of setOrientation.def and was put in CVS by accident Tags: ---- rel-2-4-patches Removed Files: ------------- webwork2/courses.dist/modelCourse/templates: setOrientation.pl Revision Data ------------- --- courses.dist/modelCourse/templates/setOrientation.pl +++ /dev/null @@ -1,21 +0,0 @@ -setNumber=Orientation -openDate = 6/26/04 at 11:30am -dueDate = 4/4/05 at 12:20pm -answerDate = 4/5/05 at 12:00pm -screenHeaderFile = unionLibrary/parserOrientation/setHeader.pg -problemList = -unionLibrary/parserOrientation/prob01.pg, 1 -unionLibrary/parserOrientation/prob02.pg, 1 -unionLibrary/parserOrientation/prob03.pg, 1 -unionLibrary/parserOrientation/prob04.pg, 1 -unionLibrary/parserOrientation/prob05/prob05.pg, 1 -unionLibrary/parserOrientation/prob06.pg, 1 -unionLibrary/parserOrientation/prob07.pg, 1 -unionLibrary/parserOrientation/prob08.pg, 1 -unionLibrary/parserOrientation/prob09.pg, 1 -unionLibrary/parserOrientation/prob10.pg, 1 -unionLibrary/parserOrientation/prob11.pg, 1 -unionLibrary/parserOrientation/prob12.pg, 1 -unionLibrary/parserOrientation/prob13.pg, 1 -unionLibrary/parserOrientation/prob14/prob14.pg, 1 -unionLibrary/parserOrientation/prob15.pg, 1 |
From: Mike G. v. a. <we...@ma...> - 2008-06-26 17:35:50
|
Log Message: ----------- forward port of rel-2-4-5 Added Files: ----------- pg/macros: parserOrientation.pl Revision Data ------------- |
From: Mike G. v. a. <we...@ma...> - 2008-06-26 17:34:25
|
Log Message: ----------- change version number Tags: ---- rel-2-4-patches Modified Files: -------------- pg: LICENSE Revision Data ------------- Index: LICENSE =================================================================== RCS file: /webwork/cvs/system/pg/LICENSE,v retrieving revision 1.2.4.2 retrieving revision 1.2.4.2.2.1 diff -LLICENSE -LLICENSE -u -r1.2.4.2 -r1.2.4.2.2.1 --- LICENSE +++ LICENSE @@ -1,8 +1,8 @@ WeBWorK Program Generation Language - Version 2.4.1 + Version 2.4.5 - Copyright 2000-2007, The WeBWorK Project + Copyright 2000-2008, The WeBWorK Project All rights reserved. This program is free software; you can redistribute it and/or modify |
From: Mike G. v. a. <we...@ma...> - 2008-06-26 17:33:43
|
Log Message: ----------- put parserOrientation.pl in pg/macros since it is used in many courses Tags: ---- rel-2-4-patches Added Files: ----------- pg/macros: parserOrientation.pl Revision Data ------------- --- /dev/null +++ macros/parserOrientation.pl @@ -0,0 +1,229 @@ +#!/usr/local/bin/perl + +###################################################################### +# +# Macros used by the orientation problem set +# +###################################################################### + + +#loadMacros("PGcourse.pl"); + +# +# Special use of CARET to have it work in non-math mode +# +$CARET = MODES( + TeX => '\hbox{\texttt{\char`\^}}', + Latex2HTML => '^', + HTML => '^' +); + +# +# Functions to display student input and computer output +# (written as functions so that we change the style without +# recoding the problems themselves). +# +sub student { + my $message = shift; + MODES( + TeX => '\leavevmode\hbox{\texttt{'.$message.'}}', + Latex2HTML => + $bHTML.'<NOBR><TT>'.$eHTML.$message.$bHTML.'</TT></NOBR>'.$eHTML, + HTML => '<NOBR><TT>'.$message.'</TT></NOBR>' + ); +} + +sub computer { + my $message = shift; + MODES( + TeX => '\hbox{\texttt{'.$message.'}}', + Latex2HTML => + $bHTML.'<NOBR><TT>'.$eHTML.$message.$bHTML.'</TT></NOBR>'.$eHTML, + HTML => '<NOBR><TT>'.$message.'</TT></NOBR>' + ); +} + +# +# This prints things we need to fill in yet in red +# +sub moreWork { + my $message = shift; + MODES( + TeX => '{\sl ' . $message . '}', + Latex2HTML => $bHTML . '<FONT COLOR="#A00000">' . $eHTML . + $message . $bHTML . '</FONT>' . $eHTML, + HTML => '<FONT COLOR="#A00000">' . $message . '</FONT>' + ); +} + +# +# Temporary macros to mark comments in areas that we are +# working on. +# +$BCOMMENT = MODES( + TeX => '{\footnotesize\it', + Latex2HTML => $bHTML.'<BLOCKQUOTE><SMALL><I><FONT COLOR="#A00000">'.$eHTML, + HTML => '<BLOCKQUOTE><SMALL><I><FONT COLOR="#A00000">' +); + +$ECOMMENT = MODES( + TeX => '}', + Latex2HTML => $bHTML.'</FONT></I></SMALL></BLOCKQUOTE>'.$eHTML, + HTML => '</FONT></I></SMALL></BLOCKQUOTE>' +); + +# $BCOMMENT = MODES( +# TeX => '\iffalse', +# Latex2HTML => $bHTML.'<!-- '.$eHTML, +# HTML => '<!-- ' +# ); +# +# $ECOMMENT = MODES( +# TeX => '\fi', +# Latex2HTML => $bHTML.' -->'.$eHTML, +# HTML => ' -->' +# ); + + +# +# Hack to get better spacing in HTML_tth math mode but without +# messing up the spacing in other modes. +# +$SP = MODES( + TeX => ' ', Latex2HTML => ' ', + HTML => ' ', HTML_tth => '\ ', + HTML_jsMath => ' ', HTML_dpng => ' ', +); + + +# +# Special table macros for questions that have +# displayed math expressions equal to an answer rule, +# with an accompanying explanation on a separate line. +# + +sub BeginExamples { + return "" if ($displayMode eq "TeX"); + BeginTable(@_); +} + +sub EndExamples { + return "" if ($displayMode eq "TeX"); + EndTable(); +} + +@ExampleDefaults = (ans_rule_len => 40, ans_rule_height => 1); + +sub BeginExample { + my $math = shift; + my $ans = shift; + my %options = (@ExampleDefaults, @_); + my ($cols,$rows) = ($options{ans_rule_len},$options{ans_rule_height}); + my $rule; + + if ($rows == 1) {$rule = ans_rule($cols)} + else {$rule = ans_box($rows,$cols)} + ANS($ans); + + # + # HTML_tth puts an unwanted <BR> at the beginning, + # and uses a centered table. Remove the <BR> and + # align the table to the right. + # + if ($displayMode eq "HTML_tth") { + $math = trimString(EV2('\['.$math.'\]')); + $math =~ s!<br clear="all" />!!; + $math =~ s!table align="center"!table align="right"!; + } elsif ($displayMode eq "HTML") { + $math = '\('.$math.'\)' + } elsif ($displayMode =~ m/^HTML/) { + $math = '\(\displaystyle '.$math.'\)' + } + + MODES( + TeX => "\n".'\['.$math.'=\hbox to 8em{'.$rule.'}\]', + Latex2HTML => $bHTML.'<TR><TD ALIGN="RIGHT">'.$eHTML. + '\(\displaystyle '.$math.'\)'.$bHTML.'</TD><TD> = </TD>'. + '<TD>'.$eHTML.$rule.$bHTML.'</TD></TR>'. + '<TR><TD></TD><TD></TD><TD>'.$eHTML, + HTML => + '<TR><TD ALIGN="RIGHT">'.$math.'</TD><TD> = </TD>'. + '<TD>'.$rule.'</TD></TR><TR><TD COLSPAN="2"></TD><TD>' + ); +} + +sub EndExample { + MODES( + TeX => "\n", + Latex2HTML => $bHTML.'<BR><BR></TD></TR>'.$eHTML, + HTML => '<BR><BR></TD></TR>' + ); +} + +sub ExampleRule { + MODES( + TeX => '\par', + Latex2HTML => $bHTML.'<TR><TD COLSPAN="3"><HR></TD></TR>'.$eHTML, + HTML => '<TR><TD COLSPAN="3"><HR></TD></TR>' + ); +} + +# +# Produce a TeX version and an answer checker for the formula +# +sub DisplayQA {my $f = shift; return (DMATH($f->TeX),$f->cmp)} +sub QA {my $f = shift; return ($f->TeX,$f->cmp)} + +################################################## +# +# Insert an image of an equation (but use the equation +# in TeX mode). +# + +sub MathIMG { + my ($img,$text,$tex) = @_; + my $useTeX = MODES(TeX => 1, Latex2HTML => 0, HTML => 0, HTML_tth => 0, HTML_dpng => 1); + return '\('.$tex.'\)' if $useTeX; + $img = alias($img); + return qq{<IMG SRC="$img" BORDER="0" ALIGN="MIDDLE" ALT="$text">}; +} + + +################################################## +# +# A simple grader that always returns a score of 1. +# This is used in the tutorial to give students +# credit for reading a problem (even if it doesn't +# ask any questions). +# +sub forgiving_grader { + my $rh_evaluated_answers = shift; + my $rh_problem_state = shift; + my %form_options = @_; + my %evaluated_answers = %{$rh_evaluated_answers}; + my %problem_state = %{$rh_problem_state}; + + my %problem_result = ( + score => 1, # always return 1 + errors => '', + type => 'forgiving_grader', + msg => '', + ); + + return(\%problem_result,\%problem_state) + if (!$form_options{answers_submitted}); + + $problem_state{recorded_score} = $problem_result{score}; + $problem_state{num_of_correct_ans}++; + + (\%problem_result, \%problem_state); +} + +################################################## +# +# Syntactic sugar to avoid ugly ~~& construct in PG. +# +sub install_forgiving_grader {install_problem_grader(\&forgiving_grader)} + + +1; |
From: Mike G. v. a. <we...@ma...> - 2008-06-26 15:16:43
|
Log Message: ----------- point to the math2.css rather than math.css Tags: ---- rel-2-4-patches Modified Files: -------------- webwork2/conf/templates/math2: system.template Revision Data ------------- Index: system.template =================================================================== RCS file: /webwork/cvs/system/webwork2/conf/templates/math2/Attic/system.template,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -Lconf/templates/math2/system.template -Lconf/templates/math2/system.template -u -r1.1.2.2 -r1.1.2.3 --- conf/templates/math2/system.template +++ conf/templates/math2/system.template @@ -24,7 +24,7 @@ <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> -<link rel="stylesheet" type="text/css" href="<!--#url type="webwork" name="htdocs"-->/css/math.css"/> +<link rel="stylesheet" type="text/css" href="<!--#url type="webwork" name="htdocs"-->/css/math2.css"/> <title><!--#path style="text" text=" : " textonly="1"--></title> <!--#head--> </head> |
From: Mike G. v. a. <we...@ma...> - 2008-06-26 15:14:11
|
Log Message: ----------- forward ports from rel-2-4-5 Modified Files: -------------- webwork2/conf/snippets: blankProblem2.pg webwork2/conf/templates/math: system.template webwork2/htdocs/css: math.css Revision Data ------------- Index: blankProblem2.pg =================================================================== RCS file: /webwork/cvs/system/webwork2/conf/snippets/blankProblem2.pg,v retrieving revision 1.2 retrieving revision 1.3 diff -Lconf/snippets/blankProblem2.pg -Lconf/snippets/blankProblem2.pg -u -r1.2 -r1.3 --- conf/snippets/blankProblem2.pg +++ conf/snippets/blankProblem2.pg @@ -56,8 +56,7 @@ \{$pi->ans_rule\} END_TEXT - - +Context()->normalStrings; ############################################################## # Index: system.template =================================================================== RCS file: /webwork/cvs/system/webwork2/conf/templates/math/system.template,v retrieving revision 1.9 retrieving revision 1.10 diff -Lconf/templates/math/system.template -Lconf/templates/math/system.template -u -r1.9 -r1.10 --- conf/templates/math/system.template +++ conf/templates/math/system.template @@ -1,5 +1,7 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <!-- ################################################################################ # WeBWorK Online Homework Delivery System Index: math.css =================================================================== RCS file: /webwork/cvs/system/webwork2/htdocs/css/math.css,v retrieving revision 1.12 retrieving revision 1.13 diff -Lhtdocs/css/math.css -Lhtdocs/css/math.css -u -r1.12 -r1.13 --- htdocs/css/math.css +++ htdocs/css/math.css @@ -153,6 +153,9 @@ margin-right: .5em; } +.Message { +background-color:#ddd; +} /* --- Fisheye view (id) ---------------------------------------------------- */ /* The "fisheye" view: a hierarchical view of the website to show the @@ -237,7 +240,7 @@ padding: 0; color: #fff; border: 1px solid #000; - background-color: #000038; + background-color: #038; /* [ww] we could have some sort of spider web image here. */ /*background-image: url("/images/mandel-wide.jpg");*/ background-repeat: repeat-x; @@ -281,6 +284,9 @@ margin: 1ex .5em .1ex .1em; font-size: smaller; } +#masthead #loginstatus #Nav { + padding: 1ex; +} /* "big-wrapper" contains everything other than the masthead. It's merely * a relatively positioned div that allows us to use absolute positioning @@ -390,9 +396,9 @@ * (These are mostly copied from ur.css right atm.) */ -/* the info escape emits a DIV with this id. (not that the same DIV has class +/* the info escape emits a DIV with this id. (note that the same DIV has class * "info-box" which is given above in the "template styles" section. Regardless, - * it is emitted by WW code! */ + * it is emitted by WW code in ProblemSet.pl (not in system.template) ! */ #InfoPanel { font-size: smaller; float: right; @@ -418,6 +424,7 @@ /*ul.LinksMenu ul { list-style: none; margin-left: 0.5em; padding-left: 0; }*/ /* background styles for success and failure messages */ +div.WarningMessage { background-color: #ffcccc; padding: 3px 3px 3px 3px; } div.ResultsWithoutError { color: inherit; background-color: #8F8; } /* green */ div.ResultsWithError { color: #C33; background-color: inherit; } /* red */ div.ResultsAlert { color: #F60; background-color: inherit; } /* orange */ |
From: Mike G. v. a. <we...@ma...> - 2008-06-26 15:11:25
|
Log Message: ----------- Forward ports from rel-2-4-5 Modified Files: -------------- pg: README pg/lib/WeBWorK/PG: Translator.pm pg/macros: PGbasicmacros.pl Revision Data ------------- Index: README =================================================================== RCS file: /webwork/cvs/system/pg/README,v retrieving revision 1.2 retrieving revision 1.3 diff -LREADME -LREADME -u -r1.2 -r1.3 --- README +++ README @@ -1,6 +1,10 @@ WeBWorK Program Generation Language - Version 2.x - + Version 2.4.x + Branch: rel-2-4-patche + + + http://webwork.maa.org/wiki/Release_notes_for_WeBWorK_2.4.5 + Copyright 2000-2006, The WeBWorK Project All rights reserved. Index: Translator.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/WeBWorK/PG/Translator.pm,v retrieving revision 1.21 retrieving revision 1.22 diff -Llib/WeBWorK/PG/Translator.pm -Llib/WeBWorK/PG/Translator.pm -u -r1.21 -r1.22 --- lib/WeBWorK/PG/Translator.pm +++ lib/WeBWorK/PG/Translator.pm @@ -1638,9 +1638,9 @@ $evalString =~ s/\n\s*END_TEXT[\s;]*\n/\nEND_TEXT\n/g; $evalString =~ s/\n\s*END_SOLUTION[\s;]*\n/\nEND_SOLUTION\n/g; $evalString =~ s/\n\s*END_HINT[\s;]*\n/\nEND_HINT\n/g; - $evalString =~ s/\n\s*BEGIN_TEXT[\s;]*\n/\nTEXT\(EV3\(<<'END_TEXT'\)\);\n/g; - $evalString =~ s/\n\s*BEGIN_SOLUTION[\s;]*\n/\nSOLUTION\(EV3\(<<'END_SOLUTION'\)\);\n/g; - $evalString =~ s/\n\s*BEGIN_HINT[\s;]*\n/\nHINT\(EV3\(<<'END_HINT'\)\);\n/g; + $evalString =~ s/\n\s*BEGIN_TEXT[\s;]*\n/\nTEXT\(EV3P\(<<'END_TEXT'\)\);\n/g; + $evalString =~ s/\n\s*BEGIN_SOLUTION[\s;]*\n/\nSOLUTION\(EV3P\(<<'END_SOLUTION'\)\);\n/g; + $evalString =~ s/\n\s*BEGIN_HINT[\s;]*\n/\nHINT\(EV3P\(<<'END_HINT'\)\);\n/g; $evalString =~ s/ENDDOCUMENT.*/ENDDOCUMENT();/s; # remove text after ENDDOCUMENT $evalString =~ s/\\/\\\\/g; # \ can't be used for escapes because of TeX conflict Index: PGbasicmacros.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/PGbasicmacros.pl,v retrieving revision 1.51 retrieving revision 1.52 diff -Lmacros/PGbasicmacros.pl -Lmacros/PGbasicmacros.pl -u -r1.51 -r1.52 --- macros/PGbasicmacros.pl +++ macros/PGbasicmacros.pl @@ -1620,6 +1620,113 @@ } } +=head3 EV3P + + ###################################################################### + # + # New version of EV3 that allows `...` and ``...`` to insert TeX produced + # by the new Parser (in math and display modes). + # + # Format: EV3P(string,...); + # EV3P({options},string,...); + # + # `x^2/5` will become \(\frac{x^2}{5}\) and then rendered for hardcopy or screen output + # + # where options can include: + # + # processCommands => 0 or 1 Indicates if the student's answer will + # be allowed to process \{...\}. + # Default: 1 + # + # processVariables => 0 1 Indicates whether variable substitution + # should be performed on the student's + # answer. + # Default: 1 + # + # processMath => 0 or 1 Indicates whether \(...\), \[...\], + # `...` and ``...`` will be processed + # in the student's answer. + # Default: 1 + # + # processParser => 0 or 1 Indicates if `...` and ``...`` should + # be processed when math is being + # processed. + # Default: 1 + # + # fixDollars => 0 or 1 Specifies whether dollar signs not followed + # by a letter should be replaced by ${DOLLAR} + # prior to variable substitution (to prevent + # accidental substitution of strange Perl + # values). + # Default: 1 + # + +=cut + +sub EV3P { + my $option_ref = {}; $option_ref = shift if ref($_[0]) eq 'HASH'; + my %options = ( + processCommands => 1, + processVariables => 1, + processParser => 1, + processMath => 1, + fixDollars => 1, + %{$option_ref}, + ); + my $string = join(" ",@_); + $string = ev_substring($string,"\\\\{","\\\\}",\&safe_ev) if $options{processCommands}; + if ($options{processVariables}) { + my $eval_string = $string; + $eval_string =~ s/\$(?![a-z])/\${DOLLAR}/gi if $options{fixDollars}; + my ($evaluated_string,$PG_eval_errors,$PG_full_errors) = + PG_restricted_eval("<<END_OF_EVALUATION_STRING\n$eval_string\nEND_OF_EVALUATION_STRING\n"); + if ($PG_eval_errors) { + my $error = (split("\n",$PG_eval_errors))[0]; $error =~ s/at \(eval.*//gs; + $string =~ s/&/&/g; $string =~ s/</</g; $string =~ s/>/>/g; + $evaluated_string = $BBOLD."(Error: $error in '$string')".$EBOLD; + } + $string = $evaluated_string; + } + if ($options{processMath}) { + $string = EV3P_parser($string) if $options{processParser}; + $string = ev_substring($string,"\\(","\\)",\&math_ev3); + $string = ev_substring($string,"\\[","\\]",\&display_math_ev3); + } + return $string; +} + +# +# Look through a string for ``...`` or `...` and use +# the parser to produce TeX code for the specified mathematics. +# ``...`` does display math, `...` does in-line math. They +# can also be used within math mode already, in which case they +# use whatever mode is already in effect. +# +sub EV3P_parser { + my $string = shift; + return $string unless $string =~ m/`/; + my $start = ''; my %end = ('\('=>'\)','\['=>'\]'); + my @parts = split(/(``.*?``\*?|`.+?`\*?|(?:\\[()\[\]]))/s,$string); + foreach my $part (@parts) { + if ($part =~ m/^(``?)(.*)\1(\*?)$/s) { + my ($delim,$math,$star) = ($1,$2,$3); + my $f = Parser::Formula($math); + if (defined($f)) { + $f = $f->reduce if $star; + $part = $f->TeX; + $part = ($delim eq '`' ? '\('.$part.'\)': '\['.$part.'\]') if (!$start); + } else { + ## FIXME: use context->{error}{ref} to highlight error in $math. + $part = $BBOLD."(Error: $$Value::context->{error}{message} '$math')".$EBOLD; + $part = $end{$start}." ".$part." ".$start if $start; + } + } + elsif ($start) {$start = '' if $part eq $end{$start}} + elsif ($end{$part}) {$start = $part} + } + return join('',@parts); +} + =head2 Formatting macros |
From: Mike G. v. a. <we...@ma...> - 2008-06-26 13:43:52
|
Log Message: ----------- Switch BEGIN_TEXT over to use EV3P. This allows for embedded TI calculator type entries which are converted to TeX. e.g $f = Formula("x^2/5"); BEGIN_TEXT Print formula inline `$f` or print it inline with `x^2/5` END_TEXT will now print typeset equations without needing to use Context()->texStrings. The code in ` ... ` is parsed into a Formula and then printed using -> TeX Tags: ---- rel-2-4-patches Modified Files: -------------- pg/lib/WeBWorK/PG: Translator.pm Revision Data ------------- Index: Translator.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/WeBWorK/PG/Translator.pm,v retrieving revision 1.18.2.2.2.2 retrieving revision 1.18.2.2.2.3 diff -Llib/WeBWorK/PG/Translator.pm -Llib/WeBWorK/PG/Translator.pm -u -r1.18.2.2.2.2 -r1.18.2.2.2.3 --- lib/WeBWorK/PG/Translator.pm +++ lib/WeBWorK/PG/Translator.pm @@ -1638,9 +1638,9 @@ $evalString =~ s/\n\s*END_TEXT[\s;]*\n/\nEND_TEXT\n/g; $evalString =~ s/\n\s*END_SOLUTION[\s;]*\n/\nEND_SOLUTION\n/g; $evalString =~ s/\n\s*END_HINT[\s;]*\n/\nEND_HINT\n/g; - $evalString =~ s/\n\s*BEGIN_TEXT[\s;]*\n/\nTEXT\(EV3\(<<'END_TEXT'\)\);\n/g; - $evalString =~ s/\n\s*BEGIN_SOLUTION[\s;]*\n/\nSOLUTION\(EV3\(<<'END_SOLUTION'\)\);\n/g; - $evalString =~ s/\n\s*BEGIN_HINT[\s;]*\n/\nHINT\(EV3\(<<'END_HINT'\)\);\n/g; + $evalString =~ s/\n\s*BEGIN_TEXT[\s;]*\n/\nTEXT\(EV3P\(<<'END_TEXT'\)\);\n/g; + $evalString =~ s/\n\s*BEGIN_SOLUTION[\s;]*\n/\nSOLUTION\(EV3P\(<<'END_SOLUTION'\)\);\n/g; + $evalString =~ s/\n\s*BEGIN_HINT[\s;]*\n/\nHINT\(EV3P\(<<'END_HINT'\)\);\n/g; $evalString =~ s/ENDDOCUMENT.*/ENDDOCUMENT();/s; # remove text after ENDDOCUMENT $evalString =~ s/\\/\\\\/g; # \ can't be used for escapes because of TeX conflict |
From: Mike G. v. a. <we...@ma...> - 2008-06-26 13:39:54
|
Log Message: ----------- Minor changes in templates to make them more uniform. The ur template uses tables heavily -- the rest do not Tags: ---- rel-2-4-patches Modified Files: -------------- webwork2/conf/templates/math: system.template webwork2/conf/templates/math2: system.template webwork2/conf/templates/ur: system.template Revision Data ------------- Index: system.template =================================================================== RCS file: /webwork/cvs/system/webwork2/conf/templates/math/system.template,v retrieving revision 1.6.2.1.2.1 retrieving revision 1.6.2.1.2.2 diff -Lconf/templates/math/system.template -Lconf/templates/math/system.template -u -r1.6.2.1.2.1 -r1.6.2.1.2.2 --- conf/templates/math/system.template +++ conf/templates/math/system.template @@ -1,5 +1,7 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <!-- ################################################################################ # WeBWorK Online Homework Delivery System @@ -17,7 +19,9 @@ # Artistic License for more details. ################################################################################ --> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + + +<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="<!--#url type="webwork" name="htdocs"-->/css/math.css"/> Index: system.template =================================================================== RCS file: /webwork/cvs/system/webwork2/conf/templates/math2/Attic/system.template,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -Lconf/templates/math2/system.template -Lconf/templates/math2/system.template -u -r1.1.2.1 -r1.1.2.2 --- conf/templates/math2/system.template +++ conf/templates/math2/system.template @@ -1,5 +1,7 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <!-- ################################################################################ # WeBWorK Online Homework Delivery System @@ -17,7 +19,9 @@ # Artistic License for more details. ################################################################################ --> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + + +<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="<!--#url type="webwork" name="htdocs"-->/css/math.css"/> @@ -41,7 +45,7 @@ </div> </div> <hr class="for-broken-browsers"/> -<div id="big-wrapper" > +<div id="big-wrapper"> <div id="breadcrumbs"> <!--#path style="text" text=" → "--> </div> @@ -61,6 +65,7 @@ <!-- styles could be different for different pages so they are not set here --> <!--#info--> <!--#endif--> + <!--#if can="body"--> <!--#if warnings="1"--> <div class="Body" style="background-color:#ffcccc"> Index: system.template =================================================================== RCS file: /webwork/cvs/system/webwork2/conf/templates/ur/system.template,v retrieving revision 1.3.4.1.2.1 retrieving revision 1.3.4.1.2.2 diff -Lconf/templates/ur/system.template -Lconf/templates/ur/system.template -u -r1.3.4.1.2.1 -r1.3.4.1.2.2 --- conf/templates/ur/system.template +++ conf/templates/ur/system.template @@ -23,11 +23,15 @@ <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"> <head> +<meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<link rel="stylesheet" type="text/css" href="<!--#url type="webwork" name="htdocs"-->/css/ur.css"/> <title><!--#path style="text" text=" : " textonly="1"--></title> <!--#head--> -<link rel="stylesheet" type="text/css" href="<!--#url type="webwork" name="htdocs"-->/css/ur.css"/> </head> -<body> +<body bgcolor="white" onload="if (typeof(initializeAction) == 'function') {initializeAction()}"> + +<!-- this is a table based layout as opposed to a css based layout --> + <table width="100%" cellpadding="10" cellspacing="0" border="0"> <tr valign="top"> <td align="left" valign="top" rowspan="2" class="LeftPanel"> |
From: Mike G. v. a. <we...@ma...> - 2008-06-25 20:24:07
|
Log Message: ----------- remove attempt to set formatting with $# causes bad warnings in perl 5.10.x forward port from rel-2-4-patches Modified Files: -------------- pg/macros: PG.pl Revision Data ------------- Index: PG.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/PG.pl,v retrieving revision 1.38 retrieving revision 1.39 diff -Lmacros/PG.pl -Lmacros/PG.pl -u -r1.38 -r1.39 --- macros/PG.pl +++ macros/PG.pl @@ -202,7 +202,7 @@ # %main::gifs_created = (); eval(q! # set perl to use capital E for scientific notation: e.g. 5.4E-05 instead of 5.4e-05 - $#="%G"; #FIXME -- check that this works + # $#="%G"; #FIXME -- this causes bad warnings in perl 5.10 @main::PG_ANSWER_ENTRY_ORDER = (); $main::ANSWER_PREFIX = 'AnSwEr'; |
From: Mike G. v. a. <we...@ma...> - 2008-06-25 20:22:41
|
Log Message: ----------- remove attempt to set $# so that E is used in scientific notation this caused major warnings in perl 5.10.x Tags: ---- rel-2-4-patches Modified Files: -------------- pg/macros: PG.pl Revision Data ------------- Index: PG.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/PG.pl,v retrieving revision 1.29.2.2.2.1 retrieving revision 1.29.2.2.2.2 diff -Lmacros/PG.pl -Lmacros/PG.pl -u -r1.29.2.2.2.1 -r1.29.2.2.2.2 --- macros/PG.pl +++ macros/PG.pl @@ -202,7 +202,7 @@ # %main::gifs_created = (); eval(q! # set perl to use capital E for scientific notation: e.g. 5.4E-05 instead of 5.4e-05 - $#="%G"; #FIXME -- check that this works + # $#="%G"; #FIXME -- this causes bad warnings in perl 5.10 @main::PG_ANSWER_ENTRY_ORDER = (); $main::ANSWER_PREFIX = 'AnSwEr'; |
From: Arnie P. v. a. <we...@ma...> - 2008-06-25 20:03:57
|
Log Message: ----------- Added no strict "refs" to try to avoid new error checking in Perl 5.10. Tags: ---- rel-2-4-patches Modified Files: -------------- pg/lib/Value: Context.pm Revision Data ------------- Index: Context.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Value/Context.pm,v retrieving revision 1.10.6.2.2.1 retrieving revision 1.10.6.2.2.2 diff -Llib/Value/Context.pm -Llib/Value/Context.pm -u -r1.10.6.2.2.1 -r1.10.6.2.2.2 --- lib/Value/Context.pm +++ lib/Value/Context.pm @@ -5,7 +5,7 @@ package Value::Context; my $pkg = "Value::Context"; -use strict; +use strict; no strict "refs"; use UNIVERSAL; # |
From: Arnie P. v. a. <we...@ma...> - 2008-06-25 20:00:06
|
Log Message: ----------- Added no strict "refs" to try to avoid new error checking in Perl 5.10. Modified Files: -------------- pg/lib/Value: Context.pm Revision Data ------------- Index: Context.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Value/Context.pm,v retrieving revision 1.20 retrieving revision 1.21 diff -Llib/Value/Context.pm -Llib/Value/Context.pm -u -r1.20 -r1.21 --- lib/Value/Context.pm +++ lib/Value/Context.pm @@ -5,7 +5,7 @@ package Value::Context; my $pkg = "Value::Context"; -use strict; +use strict; no strict "refs"; use UNIVERSAL; # |
From: Mike G. v. a. <we...@ma...> - 2008-06-25 16:31:21
|
Log Message: ----------- if input to trim_spaces is empty or blank return empty string (Prevents warning messages on substitution) Tags: ---- rel-2-4-patches Modified Files: -------------- webwork2/lib/WeBWorK: Utils.pm Revision Data ------------- Index: Utils.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/Utils.pm,v retrieving revision 1.79.2.1.2.1 retrieving revision 1.79.2.1.2.2 diff -Llib/WeBWorK/Utils.pm -Llib/WeBWorK/Utils.pm -u -r1.79.2.1.2.1 -r1.79.2.1.2.2 --- lib/WeBWorK/Utils.pm +++ lib/WeBWorK/Utils.pm @@ -740,6 +740,7 @@ ## Utility function to trim whitespace off the start and end of its input sub trim_spaces { my $in = shift; + return '' unless $in; # skip blank spaces $in =~ s/^\s*(.*?)\s*$/$1/; return($in); } |
From: Mike G. v. a. <we...@ma...> - 2008-06-25 16:30:34
|
Log Message: ----------- comments on how to link system.template and .css files added. no code changed VS: ---------------------------------------------------------------------- Tags: ---- rel-2-4-patches Modified Files: -------------- webwork2/lib/WeBWorK: ContentGenerator.pm Revision Data ------------- Index: ContentGenerator.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator.pm,v retrieving revision 1.191.2.1.2.1 retrieving revision 1.191.2.1.2.2 diff -Llib/WeBWorK/ContentGenerator.pm -Llib/WeBWorK/ContentGenerator.pm -u -r1.191.2.1.2.1 -r1.191.2.1.2.2 --- lib/WeBWorK/ContentGenerator.pm +++ lib/WeBWorK/ContentGenerator.pm @@ -480,6 +480,10 @@ my $themesDir = $ce->{webworkDirs}{templates}; my $theme = $r->param("theme") || $ce->{defaultTheme}; $theme = $ce->{defaultTheme} if $theme =~ m!(?:^|/)\.\.(?:/|$)!; + #$ce->{webworkURLs}->{stylesheet} = ($ce->{webworkURLs}->{htdocs})."/css/$theme.css"; # reset the style sheet + # the line above is clever -- but I think it is better to link directly to the style sheet from the system.template + # then the link between template and css is made in .template file instead of hard coded as above + # this means that the {stylesheet} option in global.conf is never used my $template = $self->can("templateName") ? $self->templateName : $ce->{defaultThemeTemplate}; my $templateFile = "$themesDir/$theme/$template.template"; |
From: Gavin L. v. a. <we...@ma...> - 2008-06-25 15:51:00
|
Log Message: ----------- ContentGenerator: clean up and collect sidebar links for gateway assignments. Modified Files: -------------- webwork2/lib/WeBWorK: ContentGenerator.pm Revision Data ------------- Index: ContentGenerator.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator.pm,v retrieving revision 1.193 retrieving revision 1.194 diff -Llib/WeBWorK/ContentGenerator.pm -Llib/WeBWorK/ContentGenerator.pm -u -r1.193 -r1.194 --- lib/WeBWorK/ContentGenerator.pm +++ lib/WeBWorK/ContentGenerator.pm @@ -657,8 +657,17 @@ if (defined $setID) { print CGI::start_ul(); print CGI::start_li(); # $setID - print &$makelink("${pfx}ProblemSet", text=>"$prettySetID", urlpath_args=>{%args,setID=>$setID}, systemlink_args=>\%systemlink_args); - # FIXME i think we only want this if the problem set is not a gateway quiz + # show a link if we're displaying a homework set, or a version + # of a gateway assignment; to know if it's a gateway + # assignment, we have to get the set record. + my ($globalSetID) = ( $setID =~ /(.+?)(,v\d+)?$/ ); + my $setRecord = $db->getGlobalSet( $globalSetID ); + if ( $setRecord->assignment_type !~ /gateway/ ) { + print &$makelink("${pfx}ProblemSet", text=>"$prettySetID", urlpath_args=>{%args,setID=>$setID}, systemlink_args=>\%systemlink_args); + } elsif ($setID =~ /,v(\d)+$/) { + print &$makelink("${pfx}GatewayQuiz", text=>"$prettySetID", urlpath_args=>{%args,setID=>$setID}, systemlink_args=>\%systemlink_args); + } + if (defined $problemID) { print CGI::start_ul(); print CGI::start_li(); # $problemID @@ -689,7 +698,8 @@ print CGI::start_li(); # Homework Set Editor print &$makelink("${pfx}ProblemSetList", urlpath_args=>{%args}, systemlink_args=>\%systemlink_args); - if (defined $setID) { + ## only show editor link for non-versioned sets + if (defined $setID && $setID !~ /,v\d+$/ ) { print CGI::start_ul(); print CGI::start_li(); # $setID print &$makelink("${pfx}ProblemSetDetail", text=>"$prettySetID", urlpath_args=>{%args,setID=>$setID}, systemlink_args=>\%systemlink_args); @@ -715,7 +725,11 @@ print CGI::li(&$makelink("${pfx}Stats", text=>"$eUserID", urlpath_args=>{%args,statType=>"student",userID=>$eUserID}, systemlink_args=>\%systemlink_args)); } if (defined $setID) { - print CGI::li(&$makelink("${pfx}Stats", text=>"$prettySetID", urlpath_args=>{%args,statType=>"set",setID=>$setID}, systemlink_args=>\%systemlink_args)); + # make sure we don't try to send a versioned + # set id in to the stats link + my ( $nvSetID ) = ( $setID =~ /(.+?)(,v\d+)?$/ ); + my ( $nvPretty ) = ( $prettySetID =~ /(.+?)(,v\d+)?$/ ); + print CGI::li(&$makelink("${pfx}Stats", text=>"$nvPretty", urlpath_args=>{%args,statType=>"set",setID=>$nvSetID}, systemlink_args=>\%systemlink_args)); } print CGI::end_ul(); } @@ -729,7 +743,11 @@ print CGI::li(&$makelink("${pfx}StudentProgress", text=>"$eUserID", urlpath_args=>{%args,statType=>"student",userID=>$eUserID}, systemlink_args=>\%systemlink_args)); } if (defined $setID) { - print CGI::li(&$makelink("${pfx}StudentProgress", text=>"$prettySetID", urlpath_args=>{%args,statType=>"set",setID=>$setID}, systemlink_args=>\%systemlink_args)); + # make sure we don't try to send a versioned + # set id in to the stats link + my ( $nvSetID ) = ( $setID =~ /(.+?)(,v\d+)?$/ ); + my ( $nvPretty ) = ( $prettySetID =~ /(.+?)(,v\d+)?$/ ); + print CGI::li(&$makelink("${pfx}StudentProgress", text=>"$nvPretty", urlpath_args=>{%args,statType=>"set",setID=>$nvSetID}, systemlink_args=>\%systemlink_args)); } print CGI::end_ul(); } |
From: Arnie P. v. a. <we...@ma...> - 2008-06-25 15:07:30
|
Log Message: ----------- Put verbiage into the file explaining what the file does Modified Files: -------------- webwork2/courses.dist/modelCourse: hide_directory Revision Data ------------- Index: hide_directory =================================================================== RCS file: /webwork/cvs/system/webwork2/courses.dist/modelCourse/hide_directory,v retrieving revision 1.2 retrieving revision 1.3 diff -Lcourses.dist/modelCourse/hide_directory -Lcourses.dist/modelCourse/hide_directory -u -r1.2 -r1.3 --- courses.dist/modelCourse/hide_directory +++ courses.dist/modelCourse/hide_directory @@ -0,0 +1,4 @@ + +Place a file named "hide_directory" in a course or other directory +and it will not show up in the courses list on the WeBWorK home page. +It will still appear in the Course Administration listing. |
From: Arnie P. v. a. <we...@ma...> - 2008-06-25 15:04:14
|
Log Message: ----------- Put verbiage in the file explaining what the file does Tags: ---- rel-2-4-patches Modified Files: -------------- webwork2/courses.dist/modelCourse: hide_directory Revision Data ------------- Index: hide_directory =================================================================== RCS file: /webwork/cvs/system/webwork2/courses.dist/modelCourse/hide_directory,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -Lcourses.dist/modelCourse/hide_directory -Lcourses.dist/modelCourse/hide_directory -u -r1.2 -r1.2.4.1 --- courses.dist/modelCourse/hide_directory +++ courses.dist/modelCourse/hide_directory @@ -0,0 +1,4 @@ + +Place a file named "hide_directory" in a course or other directory +and it will not show up in the courses list on the WeBWorK home page. +It will still appear in the Course Administration listing. |
From: Gavin L. v. a. <we...@ma...> - 2008-06-25 15:00:34
|
Log Message: ----------- PGProblemEditor: update to allow editing of gateway assignment problems. 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.91 retrieving revision 1.92 diff -Llib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -Llib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -u -r1.91 -r1.92 --- lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm +++ lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm @@ -76,11 +76,11 @@ # But it is used instead of set_header when producing a hardcopy of the problem set in the TeX format, instead of producing HTML # formatted version for use on the computer screen. # -# file_type eq 'course_info +# file_type eq 'course_info' # This allows editing of the course_info.txt file which gives general information about the course. It is called from the # ProblemSets.pm module. # -# file_type eq 'options_info +# file_type eq 'options_info' # This allows editing of the options_info.txt file which gives general information about the course. It is called from the # Options.pm module. # @@ -144,16 +144,25 @@ $self->{setID} = $r->urlpath->arg("setID") ; # using $r->urlpath->arg("setID") ||'' causes trouble with set 0!!! $self->{problemID} = $r->urlpath->arg("problemID"); + # parse setID, which may come in with version data + my $fullSetID = $self->{setID}; + if ( $fullSetID =~ /,v(\d+)$/ ) { + $self->{versionID} = $1; + $self->{setID} =~ s/,v\d+$//; + } + $self->{fullSetID} = $fullSetID; + my $submit_button = $r->param('submit'); # obtain submit command from form my $actionID = $r->param('action'); my $file_type = $r->param("file_type") || ''; my $setName = $self->{setID}; + my $versionedSetName = $self->{fullSetID}; my $problemNumber = $self->{problemID}; - + # Check permissions return unless ($authz->hasPermissions($user, "access_instructor_tools")); return unless ($authz->hasPermissions($user, "modify_problem_sets")); - + ############################################################################## # displayMode and problemSeed # @@ -246,7 +255,7 @@ # Determine the path to the file # ########################################### - $self->getFilePaths($setName, $problemNumber, $file_type); + $self->getFilePaths($versionedSetName, $problemNumber, $file_type); #defines $self->{editFilePath} # path to the permanent file to be edited # $self->{tempFilePath} # path to the permanent file to be edited has .tmp suffix # $self->{inputFilePath} # path to the file for input, (might be a .tmp file) @@ -441,7 +450,8 @@ $setName = defined($setName) ? $setName : ''; # we need this instead of using the || construction # to keep set 0 from being set to the # empty string. - $problemNumber = defined($problemNumber) ? $problemNumber : ''; + my $fullSetName = defined( $self->{fullSetID} ) ? $self->{fullSetID} : $setName; + $problemNumber = defined($problemNumber) ? $problemNumber : ''; ######################################################################### # Construct url for reporting bugs: @@ -500,7 +510,7 @@ my $file_type = $self->{file_type}; my %titles = ( - problem => CGI::b("set $setName/problem $problemNumber"), + problem => CGI::b("set $fullSetName/problem $problemNumber"), blank_problem => "blank problem", set_header => "header file", hardcopy_header => "hardcopy header file", @@ -778,6 +788,15 @@ $setName = '' unless defined $setName; $problemNumber = '' unless defined $problemNumber; + + # parse possibly versioned set names + my $fullSetName = $setName; + my $editSetVersion = 0; + if ( $setName =~ /,v(\d)+$/ ) { + $editSetVersion = $1; + $setName =~ s/,v\d+$//; + } + die 'Internal error to PGProblemEditor -- file type is not defined' unless defined $file_type; #$self->addgoodmessage("file type is $file_type"); #FIXME remove ########################################################## @@ -865,7 +884,12 @@ ($file_type eq 'problem') and do { # first try getting the merged problem for the effective user - my $problem_record = $db->getMergedProblem($effectiveUserName, $setName, $problemNumber); # checked + my $problem_record; + if ( $editSetVersion ) { + $problem_record = $db->getMergedProblemVersion($effectiveUserName, $setName, $editSetVersion, $problemNumber); # checked + } else { + $problem_record = $db->getMergedProblem($effectiveUserName, $setName, $problemNumber); # checked + } # if that doesn't work (the problem is not yet assigned), get the global record $problem_record = $db->getGlobalProblem($setName, $problemNumber) unless defined($problem_record); # checked @@ -1142,6 +1166,7 @@ my ($self, $genericParams, $actionParams, $tableParams) = @_; my $courseName = $self->{courseID}; my $setName = $self->{setID}; + my $fullSetName = $self->{fullSetID}; my $problemNumber = $self->{problemID}; my $problemSeed = ($actionParams->{'action.view.seed'}) ? $actionParams->{'action.view.seed'}->[0] @@ -1172,11 +1197,22 @@ my $relativeTempFilePath = $self->getRelativeSourceFilePath($tempFilePath); - if ($file_type eq 'problem' or $file_type eq 'source_path_for_problem_file') { # redirect to Problem.pm - my $problemPage = $self->r->urlpath->newFromModule("WeBWorK::ContentGenerator::Problem", - courseID => $courseName, setID => $setName, problemID => $problemNumber - ); - + if ($file_type eq 'problem' or $file_type eq 'source_path_for_problem_file') { # redirect to Problem.pm or GatewayQuiz.pm + + # we need to know if the set is a gateway set to determine the redirect + my $globalSet = $self->r->db->getGlobalSet( $setName ); + + my $problemPage; + if ( $globalSet->assignment_type =~ /gateway/ ) { + $problemPage = $self->r->urlpath->newFromModule("WeBWorK::ContentGenerator::GatewayQuiz", + courseID => $courseName, setID => "Undefined_Set"); + # courseID => $courseName, setID => $fullSetName); + } else { + $problemPage = $self->r->urlpath->newFromModule("WeBWorK::ContentGenerator::Problem", + courseID => $courseName, setID => $setName, problemID => $problemNumber + ); + } + $viewURL = $self->systemLink($problemPage, params => { displayMode => $displayMode, @@ -1396,6 +1432,7 @@ #$self->addgoodmessage("save_handler called"); my $courseName = $self->{courseID}; my $setName = $self->{setID}; + my $fullSetName = $self->{fullSetID}; my $problemNumber = $self->{problemID}; my $displayMode = $self->{displayMode}; my $problemSeed = $self->{problemSeed}; @@ -1424,9 +1461,18 @@ # construct redirect URL and redirect ######################################################## if ($file_type eq 'problem' || $file_type eq 'source_path_for_problem_file') { # redirect to Problem.pm - my $problemPage = $self->r->urlpath->newFromModule("WeBWorK::ContentGenerator::Problem", - courseID => $courseName, setID => $setName, problemID => $problemNumber - ); + + # we need to know if the set is a gateway set to determine the redirect + my $globalSet = $self->r->db->getGlobalSet( $setName ); + my $problemPage; + if ( $globalSet->assignment_type =~ /gateway/ ) { + $problemPage = $self->r->urlpath->newFromModule("WeBWorK::ContentGenerator::GatewayQuiz", + courseID => $courseName, setID => "Undefined_Set"); + # courseID => $courseName, setID => $fullSetName); + } else { + $problemPage = $self->r->urlpath->newFromModule("WeBWorK::ContentGenerator::Problem", + courseID => $courseName, setID => $setName, problemID => $problemNumber ); + } my $relativeEditFilePath = $self->getRelativeSourceFilePath($editFilePath); @@ -1540,14 +1586,6 @@ } - - - - - - - - sub make_local_copy_handler { my ($self, $genericParams, $actionParams, $tableParams) = @_; foreach my $key (qw(target_file file_type saveMode source_file)) { @@ -1566,6 +1604,7 @@ my $templatesDir = $self->r->ce->{courseDirs}->{templates}; my $setID = $self->{setID}; + my $fullSetID = $self->{fullSetID}; my $shortFilePath = $editFilePath; @@ -1591,7 +1630,7 @@ -checked => 1, -onclick=>$onChange ). - " use in ".CGI::b("set $setID$probNum") + " use in ".CGI::b("set $fullSetID$probNum") if defined($setID) && $setID =~ m/\S/ && $setID ne 'Undefined_Set' && $self->{file_type} ne 'blank_problem'; return 'Create a copy at [TMPL]/'. @@ -1610,9 +1649,11 @@ $self->{status_message} = ''; ## DPVC -- remove bogus old messages my $courseName = $self->{courseID}; my $setName = $self->{setID}; + my $fullSetName = $self->{fullSetID}; my $problemNumber = $self->{problemID}; my $displayMode = $self->{displayMode}; my $problemSeed = $self->{problemSeed}; + my $effectiveUserName = $self->r->param('effectiveUser'); my $do_not_save = 0; my $saveMode = $actionParams->{'action.save_as.saveMode'}->[0] || 'save_a_copy'; @@ -1688,13 +1729,21 @@ $self->addbadmessage("Unable to change the hardcopy header for set $setName. Unknown error."); } } else { - my $problemRecord = $self->r->db->getGlobalProblem($setName,$problemNumber); + my $problemRecord; + if ( $fullSetName =~ /,v(\d+)$/ ) { + $problemRecord = $self->r->db->getMergedProblemVersion($effectiveUserName, $setName, $1, $problemNumber); + } else { + $problemRecord = $self->r->db->getGlobalProblem($setName,$problemNumber); + } $problemRecord->source_file($new_file_name); - if ( $self->r->db->putGlobalProblem($problemRecord) ) { - $self->addgoodmessage("The source file for 'set $setName / problem $problemNumber' has been changed from ". + my $result = ( $fullSetName =~ /,v(\d+)$/ ) ? + $self->r->db->putProblemVersion($problemRecord) : + $self->r->db->putGlobalProblem($problemRecord); + if ( $result ) { + $self->addgoodmessage("The source file for 'set $fullSetName / problem $problemNumber' has been changed from ". $self->shortPath($sourceFilePath)." to '".$self->shortPath($outputFilePath)."'.") ; } else { - $self->addbadmessage("Unable to change the source file path for set $setName, problem $problemNumber. Unknown error."); + $self->addbadmessage("Unable to change the source file path for set $fullSetName, problem $problemNumber. Unknown error."); } } } elsif ($saveMode eq 'save_a_copy') { @@ -1741,6 +1790,7 @@ my $viewURL = $self->systemLink($problemPage, params=>{ sourceFilePath => $relativeOutputFilePath, #The path relative to the templates directory is required. + problemSeed => $problemSeed, edit_level => $edit_level, file_type => $new_file_type, status_message => uri_escape($self->{status_message}) |
From: Gavin L. v. a. <we...@ma...> - 2008-06-25 15:00:17
|
Log Message: ----------- ProblemSetDetail: update edit/try links to work for gateway assignments. Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator/Instructor: ProblemSetDetail.pm Revision Data ------------- Index: ProblemSetDetail.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm,v retrieving revision 1.71 retrieving revision 1.72 diff -Llib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm -Llib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm -u -r1.71 -r1.72 --- lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm +++ lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm @@ -1557,6 +1557,7 @@ my $ce = $r->ce; return "No source file specified" unless $file; + return "Problem source is drawn from grouping set" if $file =~ /^group/; $file = $ce->{courseDirs}->{templates} . '/' . $file unless $file =~ m|^/|; my $text = "This source file "; @@ -2004,13 +2005,33 @@ my $problemToShow = ( $editingSetVersion ) ? $MergedProblems{$problemID} : $UserProblems{$problemID}; - my $editProblemPage = $urlpath->new(type => 'instructor_problem_editor_withset_withproblem', args => { courseID => $courseID, setID => $fullSetID, problemID => $problemID }); - my $editProblemLink = $self->systemLink($editProblemPage, params => { make_local_copy => 0 }); - - + my ( $editProblemPage, $editProblemLink, $viewProblemPage, + $viewProblemLink ); + if ( $isGatewaySet ) { + $editProblemPage = $urlpath->new(type =>'instructor_problem_editor_withset_withproblem', args => { courseID => $courseID, setID => $fullSetID, problemID => $problemID }); + $editProblemLink = $self->systemLink($editProblemPage, params => { make_local_copy => 0 }); + $viewProblemPage = + $urlpath->new(type =>'gateway_quiz', + args => { courseID => $courseID, + setID => "Undefined_Set", + problemID => "1" } ); + + my $seed = $problemToShow ? $problemToShow->problem_seed : ""; + my $file = $problemToShow ? $problemToShow->source_file : ""; + + $viewProblemLink = + $self->systemLink( $viewProblemPage, + params => { effectiveUser => + ($forOneUser ? $editForUser[0] : $userID), + problemSeed => $seed, + sourceFilePath => $file }); + } else { + $editProblemPage = $urlpath->new(type => 'instructor_problem_editor_withset_withproblem', args => { courseID => $courseID, setID => $fullSetID, problemID => $problemID }); + $editProblemLink = $self->systemLink($editProblemPage, params => { make_local_copy => 0 }); # FIXME: should we have an "act as" type link here when editing for multiple users? - my $viewProblemPage = $urlpath->new(type => 'problem_detail', args => { courseID => $courseID, setID => $setID, problemID => $problemID }); - my $viewProblemLink = $self->systemLink($viewProblemPage, params => { effectiveUser => ($forOneUser ? $editForUser[0] : $userID)}); + $viewProblemPage = $urlpath->new(type => 'problem_detail', args => { courseID => $courseID, setID => $setID, problemID => $problemID }); + $viewProblemLink = $self->systemLink($viewProblemPage, params => { effectiveUser => ($forOneUser ? $editForUser[0] : $userID)}); + } ###----- ### The array @fields never gets used in the following, so @@ -2046,11 +2067,22 @@ ); } + # we want to show the "Try It" and "Edit It" links if there's a + # well defined problem to view; this is when we're editing a + # homework set, or if we're editing a gateway set version, or + # if we're editing a gateway set and the problem is not a + # group problem + my $showLinks = ( ! $isGatewaySet || + ( $editingSetVersion || $problemFile !~ /^group/ )); + + 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, target=>"WW_Editor"}, "Edit it"))) . - CGI::Tr({}, CGI::td({}, CGI::a({href => $viewProblemLink, target=>"WW_View"}, "Try it" . ($forOneUser ? " (as $editForUser[0])" : "")))) . + CGI::Tr({}, CGI::td({}, + $showLinks ? CGI::a({href => $editProblemLink, target=>"WW_Editor"}, "Edit it") : "" )) . + CGI::Tr({}, CGI::td({}, + $showLinks ? 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?"})))) . |
From: Gavin L. v. a. <we...@ma...> - 2008-06-25 14:59:30
|
Log Message: ----------- Authz: allow set IDs of Undefined_Set for gateway assignments. Modified Files: -------------- webwork2/lib/WeBWorK: Authz.pm Revision Data ------------- Index: Authz.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/Authz.pm,v retrieving revision 1.36 retrieving revision 1.37 diff -Llib/WeBWorK/Authz.pm -Llib/WeBWorK/Authz.pm -u -r1.36 -r1.37 --- lib/WeBWorK/Authz.pm +++ lib/WeBWorK/Authz.pm @@ -259,6 +259,11 @@ $set->version_id eq $verNum ) { # then we can just use this set and skip the rest + } elsif ( $setName eq 'Undefined_Set' and + $self->hasPermissions($userName, "access_instructor_tools") ) { + # this is the case of previewing a problem + # from a 'try it' link + return 0; } else { if ($db->existsSetVersion($effectiveUserName,$setName,$verNum)) { $set = $db->getMergedSetVersion($effectiveUserName,$setName,$verNum); |
From: Gavin L. v. a. <we...@ma...> - 2008-06-25 14:58:57
|
Log Message: ----------- Utils::Tasks: add fake_set_version for previewing gateway assignments. Modified Files: -------------- webwork2/lib/WeBWorK/Utils: Tasks.pm Revision Data ------------- Index: Tasks.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/Utils/Tasks.pm,v retrieving revision 1.16 retrieving revision 1.17 diff -Llib/WeBWorK/Utils/Tasks.pm -Llib/WeBWorK/Utils/Tasks.pm -u -r1.16 -r1.17 --- lib/WeBWorK/Utils/Tasks.pm +++ lib/WeBWorK/Utils/Tasks.pm @@ -51,6 +51,7 @@ our @EXPORT_OK = qw( renderProblems fake_set + fake_set_version fake_problem fake_user ); @@ -85,6 +86,30 @@ return($set); } +sub fake_set_version { + my $db = shift; + + my $set = $db->newSetVersion(); + # $set = global2user($db->{set_user}->{record}, $set); + $set->psvn(123); + $set->set_id(fakeSetName); + $set->open_date(time()); + $set->due_date(time()); + $set->answer_date(time()); + $set->published(0); + $set->hardcopy_header(""); + $set->version_id(1); + $set->attempts_per_version(0); + $set->problem_randorder(0); + $set->problems_per_page(0); + $set->hide_score('N'); + $set->hide_score_by_problem('N'); + $set->hide_work('N'); + $set->restrict_ip('No'); + + return($set); +} + =item fake_problem |