Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
0397ce4
Deleting file (accidentally added in a recent merge).
jwj61 Feb 2, 2013
83804d8
Fixing merge with devel branch.
jwj61 Feb 2, 2013
3d84acf
Merge pull request #86 from jwj61/devel
mgage Feb 2, 2013
b0eb522
removing local config that I screwed up
whytheplatypus Mar 9, 2013
edde686
added apache-config to ignore list
whytheplatypus Mar 9, 2013
d08e15c
Addition of features (hide, refresh, …) to Problems in Library Browser.
pstaabp Mar 9, 2013
c6a2187
Merge branch 'devel' of https://github.com/mgage/webwork2-dev
pstaabp Mar 9, 2013
ebcaa4c
reorganization of the htdocs/js folder
pstaabp Mar 10, 2013
64b85c3
removing .gitignore from repository.
pstaabp Mar 10, 2013
1c0ace7
Trying to get Setmaker.pm working again after merge.
pstaabp Mar 10, 2013
197846d
Continued organization of the htdocs/js directory
pstaabp Mar 10, 2013
f170072
Fixed the path for the js paths in Classlist Manager
pstaabp Mar 10, 2013
3540d31
Finished the reorganization of the htdocs/js folder.
pstaabp Mar 11, 2013
62b6f44
Fixed an error with the breadcrumbs on the page top.
pstaabp Mar 11, 2013
e6f5353
Merge branch 'master' of https://github.com/pstaabp/webwork2-dev
pstaabp Mar 12, 2013
9e2629f
updating defaults.config to include the homework manager page.
pstaabp Mar 13, 2013
77d3016
working interval option
buromano Mar 28, 2013
b5f09a4
Updated code to multiple templates for each answer type.
buromano Apr 4, 2013
7ecb6f4
Continued work on the SimplePGeditor
pstaabp Apr 19, 2013
745d76c
Merge branch 'develop' of https://github.com/buromano/webwork2 into d…
pstaabp May 11, 2013
2a2d12e
Merge branch 'develop' of https://github.com/openwebwork/webwork2 int…
pstaabp May 11, 2013
f4577af
Continued work on the SimplePGEditor
pstaabp May 16, 2013
548076a
Changed the URL to the Bugs button to the new repository.
pstaabp May 21, 2013
155b521
Fixed issue #4, the visibility and reduced scoring not set on creatin…
pstaabp May 22, 2013
a95d33d
Fixed issue #1 (and #8 a duplicate). Rewrote the importer to use bac…
pstaabp May 22, 2013
bfa8f81
Fixed issue #6
pstaabp May 23, 2013
e9b00c5
Fixed issue #7 at least with the width of the pulldown menus.
pstaabp May 23, 2013
cd05d2f
Updated the webwork settings to use stickit
pstaabp Jun 3, 2013
841e60d
Merge branch 'develop' of https://github.com/openwebwork/webwork2 int…
pstaabp Jun 3, 2013
0489c71
Removed the XDate library from the calendar and Homework Manager and …
pstaabp Jun 3, 2013
df8f11e
Changed the All Sets List View to use backbone.stickit.
pstaabp Jun 7, 2013
cc7e4e8
updated jquery-ui
pstaabp Jun 7, 2013
6d970df
Changed the All Sets List View to use backbone.stickit.
pstaabp Jun 7, 2013
1d96471
Changed the All Sets List View to use backbone.stickit.
pstaabp Jun 7, 2013
74439c8
Removed the XDate library from the calendar and Homework Manager and …
pstaabp Jun 7, 2013
c3d89f7
Changed the problem sets to use standard events
pstaabp Jun 7, 2013
5e3b631
Changed the way permissions are stored client-side to match that on t…
pstaabp Jun 7, 2013
451b7a2
Added a script to create a JSON file from the library.
pstaabp Jun 11, 2013
9494bc1
Switched to using bower to manage the js libraries.
pstaabp Jun 12, 2013
516049a
Fixed error that append to file instead of overwriting.
pstaabp Jun 12, 2013
d4f0e69
Changed the settings to be stored in the config object.
pstaabp Jun 12, 2013
bdc7cce
Switched to using bower to manage the js libraries.
pstaabp Jun 12, 2013
80a3954
Switched to using bower to manage the js libraries.
pstaabp Jun 12, 2013
835978c
Changed the dialog to a jquery-ui component and created a super class…
pstaabp Jun 12, 2013
1f1b623
Switched to using bower to manage the js libraries.
pstaabp Jun 12, 2013
0c68f24
Minor stylesheet cleanup.
pstaabp Jun 12, 2013
27ecb29
Added local library browsing and other library browsing bug fixes.
pstaabp Jun 12, 2013
e61246b
Changed imageLoaded library.
pstaabp Jun 12, 2013
89f6642
Switched to using bower to manage the js libraries.
pstaabp Jun 12, 2013
3e24342
Commented out an area that was generating an error, but appeared to b…
pstaabp Jun 12, 2013
5e07b66
A number of minor changes in the templates.
pstaabp Jun 12, 2013
b288d2f
Changed the All Sets List View to use backbone.stickit.
pstaabp Jun 12, 2013
f773ff7
Added local library browsing and other library browsing bug fixes.
pstaabp Jun 12, 2013
a9395aa
Added local library browsing and other library browsing bug fixes.
pstaabp Jun 12, 2013
c433597
More changes and bug fixes to the HW Set Detail View.
pstaabp Jun 17, 2013
48ff118
Merge branch 'master' of https://github.com/openwebwork/webwork2
pstaabp Jun 17, 2013
f9a7385
Merge branch 'develop' of https://github.com/openwebwork/webwork2 int…
pstaabp Jun 17, 2013
82cbacc
Updated the "Customize Users" of the Set Detail part of the Homework …
pstaabp Jun 18, 2013
659363f
Changed the way the data is loaded initially in the Homework Manager.
pstaabp Jun 19, 2013
93fe068
Updated js libraries.
pstaabp Jun 19, 2013
75ee737
Updated the classlist manager to include all user data to be loaded i…
pstaabp Jun 24, 2013
e995c46
Merge branch 'develop' of https://github.com/openwebwork/webwork2 int…
pstaabp Jun 24, 2013
0710af7
initial checkin
pstaabp Jun 25, 2013
3fdef9d
Classlist Manager: added number of users shown and fixed paginator bug.
pstaabp Jun 26, 2013
387f472
Shuffled the users, settings, sets in the HTML of the page to fix a b…
pstaabp Jun 27, 2013
a01193a
Changes to include an editablegrid in the SetListView (all Sets View)
pstaabp Jul 8, 2013
ffcb668
Merge branch 'develop' of https://github.com/openwebwork/webwork2 int…
pstaabp Jul 8, 2013
6783f21
Merge branch 'master' of https://github.com/pstaabp/webwork2 into dev…
pstaabp Jul 8, 2013
22dae91
fixed errors that arose from last merge.
pstaabp Jul 8, 2013
a971a7a
Updated the ProblemSetView (left column) to allow refreshes when prop…
pstaabp Jul 10, 2013
26d2330
Continued update on synching of the "All Sets View" and the Problem S…
pstaabp Jul 10, 2013
6970d07
Merge branch 'develop' of https://github.com/openwebwork/webwork2 int…
pstaabp Jul 10, 2013
c4f2e4e
Creation of a EditGrid class that is super to those views that use Ed…
pstaabp Jul 10, 2013
6822871
Merge branch 'develop' of https://github.com/openwebwork/webwork2 int…
pstaabp Jul 10, 2013
d1093cd
Merge branch 'develop' of https://github.com/pstaabp/webwork2 into de…
pstaabp Jul 11, 2013
a852b1f
Fixed bugs with EditGrid view and converted Classlist Manger to use E…
pstaabp Jul 11, 2013
a4d8101
Fixed issue #21 about changes not being recorded.
pstaabp Jul 12, 2013
e4a75b8
work started on a new problem renderer.
pstaabp Jul 12, 2013
e1440bb
Merge branch 'develop' of https://github.com/openwebwork/webwork2 int…
pstaabp Jul 15, 2013
56a2ff0
Updated js libraries.
pstaabp Jul 18, 2013
cd905cb
Attempt to try to get LibraryBrowser3 working again.
pstaabp Jul 19, 2013
351754d
Updated js libraries.
pstaabp Jul 19, 2013
6cbc46f
initial checkin of webwork3 restful api code.
pstaabp Jul 19, 2013
f20b35f
Added another route in the continued work on the RESTful web service.
pstaabp Jul 19, 2013
f823b5b
Editable grid library that was deleted.
pstaabp Jul 20, 2013
5fb04f7
Attempts to get the LibraryBrowser3 working.
pstaabp Jul 20, 2013
4295720
Added another route in the continued work on the RESTful web service.
pstaabp Jul 22, 2013
f4f474c
Minor bug fix where user couldn't be deleted.
pstaabp Jul 22, 2013
cd27594
Continued work on the RESTful web service.
pstaabp Jul 24, 2013
5e63f67
Added mathjax to be loaded on the page.
pstaabp Jul 24, 2013
b95a7eb
Continued improvements and bug fixes for HomeworkManager and Classlis…
pstaabp Jul 24, 2013
a7163b0
Worked on improving the visualization of problems in a Problem Set in…
pstaabp Jul 24, 2013
4bd0f3e
removed the disabled property of the main view pulldown
pstaabp Jul 24, 2013
9e4e838
Another attempt to get a problem render working.
pstaabp Jul 25, 2013
b9d4a72
Fixed location for build_library_tree script.
pstaabp Jul 25, 2013
c5c608b
Bugfixes to the Library Browser in the Homework Manager.
pstaabp Jul 25, 2013
6236145
continued work on restful web service
pstaabp Sep 9, 2013
8df6960
Continued updating and testing of the restful web service.
pstaabp Sep 10, 2013
4fa1d1d
More refining of the web service.
pstaabp Sep 11, 2013
ac207c7
Merge branch 'feature/rest-api' into develop
pstaabp Sep 11, 2013
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
9 changes: 3 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
vn
*~
.svn
.DS_Store
.*
*~
Expand All @@ -13,8 +14,4 @@ htdocs/applets/*.swf
bin/wwapache2ctl
webwork2.komodoproject
#courses.dist/*
node_modules
node_modules/*
WeBWorK.sublime-project
WeBWorK.sublime-workspace
conf/*.apache-config
library-tree.json
1 change: 0 additions & 1 deletion PG_VERSION

This file was deleted.

3 changes: 1 addition & 2 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
$WW_VERSION ='development';
$WW_VERSION ='2.7';
$WW_COPYRIGHT_YEARS = '1996-2013';

1;
Empty file modified bin/addadmin
100644 → 100755
Empty file.
84 changes: 84 additions & 0 deletions bin/build_library_directory_tree
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
#!/usr/bin/env perl

# This is the script build-library-directory-tree

# This is used to create the file library-directory-tree.json which can be used to load in
# directory information for the OPL. It writes the file as a JSON of directories to be easily loaded.

use strict;
use warnings;
use File::Find::Rule;
use File::Basename;
use Cwd;
use DBI;
use JSON;

BEGIN {
die "WEBWORK_ROOT not found in environment.\n"
unless exists $ENV{WEBWORK_ROOT};
# Unused variable, but define it to avoid an error message.
$WeBWorK::Constants::WEBWORK_DIRECTORY = '';
}

# Get database connection

use lib "$ENV{WEBWORK_ROOT}/lib";
use WeBWorK::CourseEnvironment;

my $ce = new WeBWorK::CourseEnvironment({webwork_dir=>$ENV{WEBWORK_ROOT}});
my $libraryRoot = $ce->{problemLibrary}->{root};
$libraryRoot =~ s|/+$||;
my $libraryVersion = $ce->{problemLibrary}->{version};

my($filename, $directories) = fileparse($libraryRoot);
my $dirs = buildTree($libraryRoot);


#$dbh->disconnect;

my $webwork_htdocs = $ce->{webwork_dir}."/htdocs";
my $file = "$webwork_htdocs/library-directory-tree.json";

# use a variable for the file handle
my $OUTFILE;

# use the three arguments version of open
# and check for errors
open $OUTFILE, '>', $file or die "Cannot open $file";

# you can check for errors (e.g., if after opening the disk gets full)
print { $OUTFILE } to_json($dirs) or die "Cannot write to $file";

# check for errors
close $OUTFILE or die "Cannot close $file";


print "Wrote Library Tree to $file\n";

sub buildTree {
my $absoluteDir = shift;
my $branch = {};
my ($name,$dir) = fileparse($absoluteDir);
$branch->{name} = $name;
my @dirs = File::Find::Rule->maxdepth(1)->relative(1)->directory->in($absoluteDir);
if (scalar(@dirs)==0){
return undef;
}

my @branches = ();

for my $dir (@dirs){
my $theBranch = buildTree($absoluteDir . "/" . $dir);
if ($theBranch) {
push(@branches,$theBranch)
} else {
$b = {};
$b->{name} = $dir;
push(@branches,$b);
}
}

$branch->{subfields} = \@branches;

return $branch;
}
141 changes: 141 additions & 0 deletions bin/build_library_subject_tree
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
#!/usr/bin/env perl

# This is the script build-library-tree

# This is used to create the file library-tree.json which can be used to load in
# subject-chapter-section information for the OPL

use strict;
use warnings;
use File::Find;
use File::Basename;
use Cwd;
use DBI;
use JSON;

#(maximum varchar length is 255 for mysql version < 5.0.3.
#You can increase path length to 4096 for mysql > 5.0.3)

BEGIN {
die "WEBWORK_ROOT not found in environment.\n"
unless exists $ENV{WEBWORK_ROOT};
# Unused variable, but define it to avoid an error message.
$WeBWorK::Constants::WEBWORK_DIRECTORY = '';
}

# Get database connection

use lib "$ENV{WEBWORK_ROOT}/lib";
use WeBWorK::CourseEnvironment;

my $ce = new WeBWorK::CourseEnvironment({webwork_dir=>$ENV{WEBWORK_ROOT}});
my $dbh = DBI->connect(
$ce->{database_dsn},
$ce->{database_username},
$ce->{database_password},
{
PrintError => 0,
RaiseError => 1,
},
);

my $passwd = $ce->{database_password};
my $user = $ce->{database_username};
my $libraryRoot = $ce->{problemLibrary}->{root};
$libraryRoot =~ s|/+$||;
my $libraryVersion = $ce->{problemLibrary}->{version};


my $tree; # the library subject tree will be stored as arrays of objects.

my $sth = $dbh->prepare("select * from OPL_DBsubject");
$sth->execute;

my @subjects = ();
my @subject_names = ();
while ( my @row = $sth->fetchrow_array ) {
push(@subjects,$row[0]);
push(@subject_names,$row[1]);
}


my @subject_tree; # array to store the individual library tree for each subject

foreach my $i (0..$#subjects){

my $subject_row = $subjects[$i];
my $subject_name = $subject_names[$i];

my $sth = $dbh->prepare("select * from OPL_DBchapter where DBsubject_id = $subject_row;");
$sth->execute;

my @chapters = ();
my @chapter_names = ();
while ( my @row = $sth->fetchrow_array ) {
push(@chapters,$row[0]);
push(@chapter_names,$row[1]);
}


my @chapter_tree; # array to store the individual library tree for each chapter

foreach my $j (0..$#chapters) {
my $chapter_row = $chapters[$j];
my $chapter_name = $chapter_names[$j];
my $sth = $dbh->prepare("SELECT * FROM OPL_DBsection WHERE DBchapter_id=$chapter_row");
$sth->execute;

my @subfields = ();
while ( my @row = $sth->fetchrow_array ) {
my $section_name;
$section_name->{name} = $row[1];
my $clone = { %{ $section_name } }; # need to clone it before pushing into the @subfields array.
push(@subfields,$clone);
}

my $chapter_tree;
$chapter_tree->{name} = $chapter_name;
$chapter_tree->{subfields} = \@subfields;

my $clone = { %{ $chapter_tree } }; # need to clone it before pushing into the @chapter_tree array.
push(@chapter_tree,$clone);



}

my $subject_tree;
$subject_tree->{name} = $subject_name;
$subject_tree->{subfields} = \@chapter_tree;

my $clone = { % {$subject_tree}};
push (@subject_tree, $clone);
}

#print to_json(\@subject_tree);
#print "\n\n";




$dbh->disconnect;

my $webwork_htdocs = $ce->{webwork_dir}."/htdocs";
my $file = "$webwork_htdocs/library-tree.json";

# use a variable for the file handle
my $OUTFILE;

# use the three arguments version of open
# and check for errors
open $OUTFILE, '>', $file or die "Cannot open $file";

# you can check for errors (e.g., if after opening the disk gets full)
print { $OUTFILE } to_json(\@subject_tree) or die "Cannot write to $file";

# check for errors
close $OUTFILE or die "Cannot close $file";


print "Wrote Library Tree to $file\n";

42 changes: 39 additions & 3 deletions conf/defaults.config
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ $session_management_via = "key";
$pg{displayModes} = [
# "plainText", # display raw TeX for math expressions
"images", # display math expressions as images generated by dvipng
# "MathJax", # render TeX math expressions on the client side using MathJax --- we strongly recommend people install and use MathJax
"MathJax", # render TeX math expressions on the client side using MathJax --- we strongly recommend people install and use MathJax
];

###########################################################################################
Expand All @@ -773,7 +773,7 @@ $pg{displayModes} = [
###########################################################################################

# Default display mode. Should be listed above (uncomment only one).
$pg{options}{displayMode} = "images";
$pg{options}{displayMode} = "MathJax";

# The default grader to use, if a problem doesn't specify.
$pg{options}{grader} = "avg_problem_grader";
Expand Down Expand Up @@ -1468,7 +1468,43 @@ A value such as 0.1 means 0.1 percent error is allowed.",
type => 'list',
hashVar => '{mail}->{feedbackRecipients}'
}
]
],
['Editor',
{ var => 'editor{author}',
doc => 'Default name of the problem author',
doc2 => 'In the PGSimpleEditor, this will automatically fill the problem Author field.',
width => 45,
type => 'text',
hashVar => '{editor}->{author}'
},
{ var => 'editor{authorInstitute}',
doc => 'Institute of the problem author',
doc2 => 'In the PGSimpleEditor, this will automatically fill the institute field of the problem author',
width => 45,
type => 'text',
hashVar => '{editor}->{authorInstitute}'
},
{ var => 'editor{textTitle}',
doc => 'Text Title of the problems',
doc2 => 'In the PGSimpleEditor, this will automatically fill the text title field',
width => 45,
type => 'text',
hashVar => '{editor}->{textTitle}'
},
{ var => 'editor{textEdition}',
doc => 'Text Edition of the problems',
doc2 => 'In the PGSimpleEditor, this will automatically fill the text edition field',
width => 45,
type => 'text',
hashVar => '{editor}->{textEdition}'
},
{ var => 'editor{textAuthor}',
doc => 'Text Author of the problems',
doc2 => 'In the PGSimpleEditor, this will automatically fill the text author field',
width => 45,
type => 'text',
hashVar => '{editor}->{textAuthor}'
}]
];


Expand Down
Loading