Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
c7830d1
Tweaking how UTF8 encoding is done.
goehle Jun 20, 2016
7f6a18a
Adding more UTF8 support.
goehle Jun 20, 2016
5c20361
Cleanup
goehle Jun 20, 2016
a54c760
Added support for utf8 on xml
goehle Jun 21, 2016
5c44802
Encoded results from freeze so they don't become long utf8 characters…
goehle Jun 21, 2016
fa1f954
Fix some broken css
goehle Jun 21, 2016
ad37eb1
small change.
goehle Jun 21, 2016
0073969
Added hardcopy support (assumin gyou have the fonts installed and ena…
goehle Jun 21, 2016
45f8bc1
Tracking down more open commands.
goehle Jun 21, 2016
7998565
corrected file encodings
heiderich Jul 15, 2016
eeb63a3
Merge branch 'convert_to_utf8_encoding' of https://github.com/heideri…
goehle Jul 15, 2016
e8b9947
added [qw(Encode::Encoding)] to ${pg}{modules}) in defaults.config as…
heiderich Aug 3, 2016
ceb43be
Merge pull request #14 from heiderich/Encode-error
goehle Aug 3, 2016
e1b5553
Merge branch 'add_maketext_calls_to_achievements' of https://github.c…
goehle Aug 4, 2016
70ae45a
Merge branch 'locbug' of https://github.com/goehle/webwork2 into locbug
goehle Aug 4, 2016
80b663e
Merge branch 'develop' of https://github.com/openwebwork/webwork2 int…
goehle Aug 4, 2016
f2b1564
Merge branch 'develop' of https://github.com/openwebwork/webwork2 int…
goehle Aug 4, 2016
b0bfe73
Freeze/thaw to base64 because mysql fields are varchar
goehle Aug 4, 2016
200c5b8
update localization files.
goehle Aug 4, 2016
ea7147f
Support for transition to freeze_base64
goehle Aug 4, 2016
3d3795c
Polishing error handling
goehle Aug 4, 2016
eaf0f2f
Misspelled method.
goehle Aug 15, 2016
239790f
Merge branch 'locbug' of https://github.com/goehle/webwork2 into locbug
goehle Aug 15, 2016
1b083a0
Used utf8::valid when I should have used utf8::is_utf8
goehle Aug 17, 2016
6e2fbfd
Whoops.
goehle Aug 17, 2016
e85eb00
Wrong maketext
goehle Aug 17, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions conf/defaults.config
Original file line number Diff line number Diff line change
Expand Up @@ -1173,6 +1173,7 @@ $pg{specialPGEnvironmentVars}{problemPostamble} = { TeX => '', HTML=>'' };
# should appear as [qw(Mymodule.pm, Dependency1.pm, Dependency2.pm)]

${pg}{modules} = [
[qw(Encode::Encoding)],
[qw(HTML::Parser)],
[qw(HTML::Entities)],
[qw(DynaLoader)],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
\usepackage{epsfig}
\usepackage{pslatex}
\usepackage{fullpage}
\usepackage[utf8]{inputenc}
\usepackage[utf8x]{inputenc}
\pagestyle{plain}
\def\endline{\bigskip\hrule width \hsize height 0.8pt }
\newcommand{\lt}{<}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
\usepackage{epsf}
\usepackage{epsfig}
\usepackage{pslatex}
\usepackage[utf8]{inputenc}
\usepackage[utf8x]{inputenc}
\pagestyle{plain}
\textheight 9in
\oddsidemargin = -0.42in
Expand Down
2 changes: 1 addition & 1 deletion courses.dist/modelCourse/course.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!perl
################################################################################
# WeBWorK Online Homework Delivery System
# Copyright 2000-2016 The WeBWorK Project, http://openwebwork.sf.net/
# Copyright © 2000-2016 The WeBWorK Project, http://openwebwork.sf.net/
#
# 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
Expand Down
7 changes: 4 additions & 3 deletions htdocs/themes/math4/achievements.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}

.cheevobigbox {
width:700px;
display:block;
}

.levelbox {
Expand Down Expand Up @@ -47,14 +47,14 @@
.cheevoouterbox {
height:50px;
margin-bottom:15px;
clear:both;
}

.cheevoouterbox img {
float:left;
height:50px;
width:50px;
margin-top:5px;

}

.unlocked {
Expand All @@ -76,7 +76,8 @@
}

.cheevotextbox {
margin-left:15px;
margin-left:10px;
margin-top:5px;
float:left;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Apache/AuthenWeBWorK.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################
# WeBWorK Online Homework Delivery System
# Copyright 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/
# Copyright © 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/
# $CVSHeader: webwork2/lib/Apache/AuthenWeBWorK.pm,v 1.2 2006/06/28 16:19:57 sh002i Exp $
#
# This program is free software; you can redistribute it and/or modify it under
Expand Down
9 changes: 5 additions & 4 deletions lib/Apache/WeBWorK.pm
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ use HTML::Entities;
use HTML::Scrubber;
use Date::Format;
use WeBWorK;
use Encode;

use mod_perl;
use constant MP2 => ( exists $ENV{MOD_PERL_API_VERSION} and $ENV{MOD_PERL_API_VERSION} >= 2 );
Expand Down Expand Up @@ -64,22 +65,22 @@ sub handler($) {
my $log = $r->log;
my $uri = $r->uri;

# We set the bimode for print to utf8 because some language options
# use utf8 characters
# we need this to print wide utf8 characters to the screen
binmode(STDOUT, ":utf8");

# the warning handler accumulates warnings in $r->notes("warnings") for
# later cumulative reporting
my $warning_handler;
if (MP2) {
$warning_handler = sub {
my ($warning) = @_;
chomp $warning;

my $warnings = $r->notes->get("warnings");
$warnings = Encode::decode_utf8($warnings);
$warnings .= "$warning\n";
#my $backtrace = join("\n",backtrace());
#$warnings .= "$backtrace\n\n";
$warnings = Encode::encode_utf8($warnings);
$r->notes->set(warnings => $warnings);

$log->warn("[$uri] $warning");
Expand Down
2 changes: 1 addition & 1 deletion lib/WeBWorK.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################
# WeBWorK Online Homework Delivery System
# Copyright 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/
# Copyright © 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/
# $CVSHeader: webwork2/lib/WeBWorK.pm,v 1.104 2010/05/15 18:44:26 gage Exp $
#
# This program is free software; you can redistribute it and/or modify it under
Expand Down
22 changes: 11 additions & 11 deletions lib/WeBWorK/AchievementEvaluator.pm
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@ use base qw(WeBWorK);
use strict;
use warnings;
use WeBWorK::CGI;
use WeBWorK::Utils qw(before after readFile sortAchievements);
use WeBWorK::Utils qw(before after readFile sortAchievements nfreeze_base64 thaw_base64);
use WeBWorK::Utils::Tags;

use WWSafe;
use Storable qw(nfreeze thaw);

sub checkForAchievements {

Expand Down Expand Up @@ -118,9 +117,10 @@ sub checkForAchievements {
#Methods alowed in the safe container
$compartment->permit(qw(time localtime));

#Thaw globalData hash
if ($globalUserAchievement->frozen_hash) {
$globalData = thaw($globalUserAchievement->frozen_hash);
#Thaw_Base64 globalData hash
if ($globalUserAchievement->frozen_hash) {

$globalData = thaw_base64($globalUserAchievement->frozen_hash);
}

#Update a couple of "standard" variables in globalData hash.
Expand Down Expand Up @@ -217,9 +217,9 @@ sub checkForAchievements {
my $setType = $set->assignment_type;
next unless $achievement->assignment_type =~ /$setType/;

#thaw localData hash
#thaw_base64 localData hash
if ($userAchievement->frozen_hash) {
$localData = thaw($userAchievement->frozen_hash);
$localData = thaw_base64($userAchievement->frozen_hash);
}

#recover counter information (for progress bar achievements)
Expand Down Expand Up @@ -310,15 +310,15 @@ sub checkForAchievements {
$achievementPoints += $points;
}

#update counter, nfreeze localData and store
#update counter, nfreeze_base64 localData and store
$userAchievement->counter($counter);
$userAchievement->frozen_hash(nfreeze($localData));
$userAchievement->frozen_hash(nfreeze_base64($localData));
$db->putUserAchievement($userAchievement);

} #end for loop

#nfreeze globalData and store
$globalUserAchievement->frozen_hash(nfreeze($globalData));
#nfreeze_base64 globalData and store
$globalUserAchievement->frozen_hash(nfreeze_base64($globalData));
$db->putGlobalUserAchievement($globalUserAchievement);

if ($cheevoMessage) {
Expand Down
Loading