Commit Graph

205 Commits

Author SHA1 Message Date
Calen Pennington
2bb1aafaaf Merge pull request #6752 from cpennington/modulestore-test-case-cleanup
Clean up ModuleStoreTestCase
2015-02-04 15:57:01 -05:00
Sarina Canelake
6cdaad58de Merge pull request #6730 from OmarIthawi/edraak/unicode-fixes-log-username
(WIP) Unicode fixes for log messages with username and other unicode input
2015-02-04 11:31:57 -05:00
Calen Pennington
74af3ffa05 Remove unused import 2015-02-04 09:09:15 -05:00
Calen Pennington
b353ed2ea2 Better support specifying of modulestore configuration in test cases
The existing pattern of using `override_settings(MODULESTORE=...)` prevented
us from having more than one layer of subclassing in modulestore tests.

In a structure like:

    @override_settings(MODULESTORE=store_a)
    class BaseTestCase(ModuleStoreTestCase):
        def setUp(self):
            # use store

    @override_settings(MODULESTORE=store_b)
    class ChildTestCase(BaseTestCase):
        def setUp(self):
            # use store

In this case, the store actions performed in `BaseTestCase` on behalf of
`ChildTestCase` would still use `store_a`, even though the `ChildTestCase`
had specified to use `store_b`. This is because the `override_settings`
decorator would be the innermost wrapper around the `BaseTestCase.setUp` method,
no matter what `ChildTestCase` does.

To remedy this, we move the call to `override_settings` into the
`ModuleStoreTestCase.setUp` method, and use a cleanup to remove the override.
Subclasses can just defined the `MODULESTORE` class attribute to specify which
modulestore to use _for the entire `setUp` chain_.

[PLAT-419]
2015-02-04 09:09:14 -05:00
Calen Pennington
03a05fd9d4 Always call super(..).setUp() from setUp 2015-02-04 09:09:14 -05:00
Sarina Canelake
01064fcc79 Fix logging calls to use unicode, and lazy logging 2015-02-04 10:53:33 +02:00
Awais Qureshi
22af2b75af ECOM-890: Update invoice data model.
ECOM-891: Allow tracking of invoice transactions.

Authors: Awais Qureshi and Aamir Khan
2015-02-03 13:27:40 -05:00
stephensanchez
5788a74291 Fix ecommerce test for text changes. 2015-01-27 18:13:36 +00:00
Chris Dodge
74f6380e9e Change coupon CSV download to only include counts for coupons redeemed all the way through purchase
updated the failed unit test case and removed the unnessary import
2015-01-23 00:21:58 +05:00
Régis Behmo
f3419bb5bb Render enrollment emails in the student's language
Enrollment, unenrollment and beta role emails should be rendered in the
student's language, and not the instructor's language.
2015-01-20 18:04:35 +01:00
Awais
b12d007138 ECOM-924 Adding redeem code url in attached email file 2015-01-20 19:20:51 +05:00
jsa
17d892c521 make block.get_parent() work.
Co-Authored-By: Christina Roberts <christina@edx.org>
Co-Authored-By: Daniel Friedman <dfriedman@edx.org>
Co-Authored-By: Don Mitchell <dmitchell@edx.org>
2015-01-15 10:33:44 -05:00
Afzal Wali
a8ebf6da7f Added the reportlab requirement to base.txt
Added receipts_pdf.py

Used Paragraph for displaying a large body of text.

added the table

Line breaks in the para text. font size adjusted.

Improved the main table (alignments) and totals (converted to a table as well)

Converted the footer into a table, and allowed for pagination.

Added pagination to item data table.

Handled wrapping of long descriptions into multiple lines.

email attachment for both invoice and receipt

added the currency from the settings

Removed magic numeric literals and added meaningful variables.

Added initial set of substitutions from configuration

add defining logo paths via configuration

Removed font dependencies. Will use the system default fonts which appear good enough to me.

Alignment adjustments as per suggestions.

Fixed the pep8 violations. Added comments to styling

added the decimal points to the price values

Cleanup. Docstrings.

i18n the text in the pdf file

fix pep8/pylint issues

Changed the amounts from string to float.

Overrode the 'pdf_receipt_display_name' property in the OrderItem subclass Donation.

used the PaidCourseRegistration instead of the parent OrderItem to avoid course_id related exceptions.

quality fixes

added  the test cases for the pdf

made the changes in the pdf suggested by griff

updated the pdf tests to assert the pdf content

used the pdfminor library

fix quality issues

made the changes suggested by Will

added the text file that says "pdf file not available. please contact support"
 in case pdf fails to attach in the email
2015-01-15 12:24:30 +05:00
stephensanchez
b188430679 Enable redeem codes.
Update the redeem code schema

Updating the redeem code schema.

Adding migration file.

Adding course mode support when redeeming a code.

Conflicts:
	lms/djangoapps/shoppingcart/views.py

Add sales admin privileges for redeem code generation.

Making sure redeem code URLs work for verified courses.

pep8 violations

Code Review and Test Cleanup changes

Added tests, fixed tests.

Updating the boolean checks in ecommerce template
2015-01-13 15:21:24 +00:00
Muhammad Shoaib
10f8d8c097 WL-135 added the migration for the expiration_date field in the coupons model
added the functionality of adding the expiration date, and also handled in the shopping cart when the user try to add the expired coupon code in the shopping cart

added expiration date in the coupons list in the ecommerce page

added the unit tests and jasmine tests

fix the quality issues and rebased with master

regenerated the migration file with a different number

i18n and verified te course mode

changes suggested by  stephan
2015-01-09 19:14:48 +08:00
Christine Lytwynec
3127ac2b6c mock html_to_text for tests 2015-01-05 16:19:36 -05:00
Muhammad Shoaib
5a437b396e WL-168 When redeeming a Registration Code in the shopping cart, the user should be redirect to the Registration Code Redemption page
improvements suggested by william
2014-12-31 17:45:31 +05:00
Chris Dodge
6198b90051 only display the count for coupon redemptions that actually went through to purchase completion 2014-12-22 10:38:34 -05:00
Adam Palay
c1dd64c07a fix enrollment issue in instructor dash (ECOM-776) 2014-12-12 12:14:17 -05:00
Daniel Friedman
3d91f43030 Support cohorting students via a CSV File.
TNL-735
2014-12-10 09:23:04 -05:00
Sarina Canelake
bfa8349ec4 Clean up Datadump section on legacy dashboard 2014-12-09 13:57:20 -05:00
Sarina Canelake
e3179c37cd Clean up Email section of legacy dashboard 2014-12-09 13:57:20 -05:00
Sarina Canelake
d4a06794d0 Clean up Forum Admin section of legacy dashboard 2014-12-09 13:57:19 -05:00
Sarina Canelake
d8904d9091 Clean up Grade Downloads section of legacy dash 2014-12-09 13:57:19 -05:00
Sarina Canelake
a15110f01c Remove Grade Adjustment code from legacy dash 2014-12-09 13:57:19 -05:00
Muhammad Shoaib
cd30164b5f Improvements and bug fixes for shopping cart: WL-117, WL-114, WL-116, WL-115, WK-122 2014-12-04 01:11:49 -05:00
Jesse Zoldak
bf3b87bc64 Clean up all modulestore testcases
Move modulestore config for tests to an importable location
Disable pylnt warning for lms imports in common tests
Refactor all testcases that loaded all xml courses
TE-610
TE-489
2014-12-02 07:09:36 -05:00
Sarina Canelake
640353d94a s/pylint: disable=W0231/pylint: disable=super-init-not-called/ 2014-12-01 11:22:13 -05:00
Sarina Canelake
c0556a7ef8 s/pylint: disable=W0613/pylint: disable=unused-argument/ 2014-12-01 11:22:11 -05:00
Sarina Canelake
1e0f3ddb7d s/pylint: disable=E1111,E1124/pylint: disable=assignment-from-no-return,redundant-keyword-arg/ 2014-12-01 11:22:09 -05:00
Sarina Canelake
19f1dacab2 s/pylint: disable=E1101/pylint: disable=no-member/ 2014-12-01 11:22:09 -05:00
Sarina Canelake
b127d2844b s/pylint: disable=C0103/pylint: disable=invalid-name/ 2014-12-01 11:22:09 -05:00
Sarina Canelake
e0f1d3f3f3 s/pylint: disable=C0111/pylint: disable=missing-docstring/ 2014-12-01 11:22:09 -05:00
Chris Dodge
1fdeb82c4d fix broken master regarding pep8 number of blank lines 2014-11-29 11:22:50 -05:00
Muhammad Shoaib
9fddc6946a WL-163-added-the-USD-symbol-himBHin-the-HTML-templates-configuration-settings
added the unit tests for the default currency settings
2014-11-27 17:05:19 +05:00
Muhammad Shoaib
df0bb491fa WL-99 send a copy of the invoice to the finance@edx.org when registration codes are generated
changed the finance_email in the common.py file

added the test for the FiNANCE_EMAIL settings
2014-11-21 17:43:37 +05:00
David Ormsbee
43d8c7a712 Merge branch 'release'
Conflicts:
	lms/djangoapps/shoppingcart/processors/CyberSource2.py
2014-11-13 10:11:12 -05:00
Dennis Jen
dd38f52358 Merge pull request #5838 from edx/dsjen/feature-flag-analytics-enrollments
Feature flagged enrollment counts on instructor dashboard.
2014-11-12 10:40:04 -05:00
Adam
4486ce35a7 Merge pull request #5913 from edx/adam/prevent-accidental-course-mode-downgrade
Prevent instructors from accidentally downgrading enrollment modes throu...
2014-11-12 09:05:01 -05:00
stv
1a9f8b61f9 Fix PEP8: E221 multiple spaces before operator 2014-11-10 19:30:17 -08:00
Adam Palay
1d85659b13 Prevent instructors from accidentally downgrading enrollment modes through instructor dash TNL-804 2014-11-10 18:04:22 -05:00
Chris Dodge
58b4982d2d harden down access to the shoppingcart if the ENABLE_PAID_COURSE_REGISTRATION flag is not set (either via the main Django configuration settings) or through microsite overrides 2014-11-10 15:09:48 -05:00
Dennis Jen
d3e051ce29 fixed quaility errors in instructor_dashboard.py, moved test_instructor_dashboard under tests/views directory 2014-11-06 13:42:00 -05:00
Dennis Jen
66b3e3828f added tests for instructor_dashboard.py, added docstring for _is_small_course, removed check for settings.ANALYTICS_DASHBOARD_URL when creating dashboard link 2014-11-05 17:14:33 -05:00
Muhammad Ammar
e8e7e78e09 Merge pull request #5655 from edx/ammar/unit-improvements
Unit Test Improvements
2014-11-05 19:55:39 +05:00
Sarina Canelake
725e4908e3 Remove more pep8 violations 2014-11-04 07:37:41 -05:00
muhammad-ammar
fcaa783e43 Unit Test Improvements
TE-489
2014-10-31 11:55:13 +00:00
John Eskew
831dd593c9 Add tests for empty analytics server info and url-encoded params. 2014-10-28 11:28:57 -04:00
asadiqbal08
1035d67a25 WL-98
fix typo and add more security on API

fix some bugs and typos

address PR feedback

be sure to send emails when accounts already exist

PR feedback

fix multiple uploads

pep8 fixes

pep8 fix

pylint fixes

fix url mapping

WL-98
- Complete code coverage
- Update code for error and warning messages.
- improve code as per some suggestions

updated the UI of the auto_enroll feature

fixed the errors

PR feedback

add test

add back file filtering

add some more error handling of input

remove unneeded coffeescript code

pylint fixes

add pep8 space

WL-98
- Updated and added test cases.
- Updated membership coffee file for errors display handling.
- fixed minor text issues.

allow for blank lines and add a test

add blank line (pep8)
2014-10-21 14:23:46 -04:00
asadiqbal08
4f7c494922 EX-71 New shopping Cart UI Single person purchase
Ex-74 Registration Code redemption

fix the translation issues

added a check if a user is already registered in a course. Changed the messages

added course depth=0 and removed pep8 violations

Ex-72-added additional billing information

Added a new CSV file in the instructor dashboard sales tab to download all the order sales separated from the invoice sales

fix path to image

updated the failed unit tests and add some minor tweaks in the Shoppingcart.scss

Ex-78 New UI In receipt page

EX-73 Purchasers can buy a course on behalf of a different student

WL-78 updated the receipt page UI.

Wl-72 updated Billing Information UI and removed the Order Address fields

WL-71 Remove Purchase Type Buttons from UI

WL-71 Updated minor UI issues and updated test cases

WL-78 updated the enrollment links in the receipt page

made changes in Order generated sales csv in Instructor Dashboard.
 The total_registration_codes and total_used_codes
  were not correctly stored in the csv file.

1) The total_registration_codes were not filtered with
 course_id.
2) The total_used_codes that a user had redeemed
 were not correctly included in the CSV.

added a fix in the courseware view to let the users visit the courseware if they have enrolled in the course by clicking on the enrollment link

rebase and resolved conflicts with master

WL-97 Bulk Registration Email Confirmation
Below is the commit summary.
- Make email text bold as per requirement.
- Improve email template quality and reorder points.
- Add text in billing details page : "if no additional billing details are populated the payment confirmation will be sent to the user making the purchase"
- Update text on receipt page "You have successfully purchase 3 course registration codes"

WL-100 fixed the bug on the edit/add coupon and set course price.
Ajax requests were duplicating in each callback. fixed this issue by creating the manual ajax request rather than the Lean Modal Ajax requests

allow for better White Label branding in shopping cart purchase emails

fix up typos and text

fix goof

fix

fix

incorporated model changes as suggested by Jason.

updated order sales csv

updated test cases for CourseRegCodeItem model and csv for the order generated sales

updated the migrations history

fixed the lms acceptance tests

Be sure to check for multiple types

address PR feedback

PR feedback

PR feedback

pep8 fix
2014-10-19 21:50:29 -04:00