1. 28 Jul, 2017 1 commit
  2. 12 Jun, 2017 1 commit
  3. 06 Oct, 2016 1 commit
  4. 22 Jul, 2016 1 commit
  5. 29 Feb, 2016 2 commits
    • Implement a BaseStudentModuleHistory · 6f9a3911
      This abstract class contains most of the fields (aside from the id and
      foreign key to StudentModule that the subclasses need to manage).  It
      also provides a get_history method that abstracts searching across
      multiple backends.
      
      Move router code to openedx/core
      We need to use it from cms and lms.
      Ensure aws_migrate can be used for migrating both the lms and cms.
      
      Handle queries directed to student_module_history vs default and the
      extra queries generated by Django 1.8 (SAVEPOINTS, etc).
      
      Additionally, flag testing classes as multi_db so that Django will
      flush the non-default database between unit tests.
      
      Further decouple the foreignkey relation between csm and csmhe
      
      When calling StudentModule().delete() Django will try to delete CSMHE
      objects, but naively does so in the database, not by consulting the
      database router.
      
      Instead, we disable django cascading deletes and listen for post_delete
      signals and clean up CSMHE by hand.
      
      Add feature flags for CSMHE
      One to turn it on/off so we can control the deploy.
      The other will control whether or not we read from two database tables
      or one when searching.
      
      Update tests to explicitly use this get_history method rather than
      looking directly into StudentModuleHistory or
      StudentModuleHistoryExtended.
      
      Inform lettuce to avoid the coursewarehistoryextended app
      
      Otherwise it fails when it can't find features/ in that app.
      
      Add Pg support, this is not tested automatically.
      Kevin Falcone committed
    • Create a new CSMHExtended table to hold our new data · dd90c556
      This is a clone (copy) of CSMH's declaration and methods with an added
      id of UnsignedBigInAutoField
      
      We should be able to delete the save_history code, but needs testing.
      
      Add error logging when capa failures happen
      
      Put StudentModuleHistory into its own database
      
      Bump out the primary key on CSMHE
      
      This gives us a gap to backfill as needed.
      Since the new table's pk is an unsigned bigint, even for people who don't
      consolidate CSMH into CSMHE, the lost rows are unlikely to matter.
      
      Remove StudentModuleHistory cleaner
      Calen Pennington committed
  6. 08 Dec, 2015 2 commits
  7. 22 Nov, 2015 1 commit
  8. 10 Nov, 2015 1 commit
  9. 26 Oct, 2015 1 commit
  10. 21 Oct, 2015 1 commit
  11. 26 Aug, 2015 1 commit
  12. 09 Jul, 2015 1 commit
    • Optimize grading/progress page to reduce database queries (cache max scores). · 79de77cf
      The progress page did a number of things that make performance terrible for
      courses with large numbers of problems, particularly if those problems are
      customresponse CapaModule problems that need to be executed via codejail.
      
      The grading code takes pains to not instantiate student state and execute the
      problem code. If a student has answered the question, the max score is stored
      in StudentModule. However, if the student hasn't attempted the question yet, we
      have to run the problem code just to call .max_score() on it. This is necessary
      in grade() if the student has answered other problems in the assignment (so we
      can know what to divide by). This is always necessary to know in
      progress_summary() because we list out every problem there. Code execution can
      be especially slow if the problems need to invoke codejail.
      
      To address this, we create a MaxScoresCache that will cache the max raw score
      possible for every problem. We select the cache keys so that it will
      automatically become invalidated when a new version of the course is published.
      
      The fundamental assumption here is that a problem cannot have two different
      max score values for two unscored students. A problem *can* score two students
      differently such that they have different max scores. So Carlos can have 2/3 on
      a problem, while Lyla gets 3/4. But if neither Carlos nor Lyla has ever
      interacted with the problem (i.e. they're just seeing it on their progress
      page), they must both see 0/4 -- it cannot be the case that Carlos sees 0/3 and
      Lyla sees 0/4.
      
      We used to load all student state into two separate FieldDataCache instances,
      after which we do a bunch of individual queries for scored items. Part of this
      split-up was done because of locking problems, but I think we might have gotten
      overzealous with our manual transaction hammer.
      
      In this commit, we consolidate all state access in grade() and progress()
      to use one shared FieldDataCache. We also use a filter so that we only pull
      back StudentModule state for things that might possibly affect the grade --
      items that either have scores or have children.
      
      Because some older XModules do work in their __init__() methods (like Video),
      instantiating them takes time, particularly on large courses. This commit also
      changes the code that fetches the grading_context to filter out children that
      can't possibly affect the grade.
      
      Finally, we introduce a ScoresClient that also tries to fetch score
      information all at once, instead of in separate queries. Technically, we are
      fetching this information redundantly, but that's because the state and score
      interfaces are being teased apart as we move forward. Still, this only
      amounts to one extra SQL query, and has very little impact on performance
      overall.
      
      Much thanks to @adampalay -- his hackathon work in #7168 formed the basis of
      this.
      
      https://openedx.atlassian.net/browse/CSM-17
      David Ormsbee committed
  13. 07 Jul, 2015 1 commit
  14. 06 Jul, 2015 1 commit
  15. 19 Jun, 2015 1 commit
  16. 20 May, 2015 1 commit
  17. 11 May, 2015 1 commit
  18. 11 Apr, 2015 2 commits
    • MIT: CCX. Code Quality fixes · 9ddee934
      add doc strings; fix pep8 warning
      address some minor issues brought up by the code review process
      Carlos de la Guardia committed
    • MIT: CCX. Fix issues identified in code review · b3da2a54
      Original Commit Messages:
      
      use edx's own get_parent method, rather than our own.
      
      add field to unique constraint to avoid MultipleObjectsReturned in case of multiple browser clicks on submit
      
      fix 0011 migration, inherit from TimeStampedField and add composite index (migration only)
      
      fix bug where adding an already registered user to a ccx would cause a crash due to an undefined variable
      
      add assertNumQueries tests to test modules where override field providers are used
      
      remove unnecessary teardown
      
      implement recommended style for checking empty list
      
      import utility methods rather than use duplicate code
      
      added comment explaining date conversion to string for json
      
      add logging for invalid users or emails when enrolling students
      
      add comment about xmodule user state
      
      avoid using get_or_create, which seems to be causing a race condition on schedule change save
      
      relocate badly placed edvent handlers to fix multiple submit problem
      Carlos de la Guardia committed
  19. 06 Apr, 2015 1 commit
    • Architecture for arbitrary field overrides, field overrides for · 3256eb1f
      individual students, and a reimplementation of the individual due date
      feature.
      
      This work introduces an architecture, used with the 'authored_data'
      portion of LmsFieldData, which allows arbitrary field overrides to be
      made for fields that are part of the course content or settings (Mongo
      data).  The basic architecture is extensible by means of writing and
      configuring arbitrary field override providers.
      
      One concrete implementation of a field override provider is provided
      which allows for overrides to be for individual students.  This provider
      is then used as a basis for reimplementing the individual due date
      extensions feature as a proof of concept for the design.
      
      One can imagine writing override providers that provide overrides based
      on a student's membership in a cohort or other similar idea.  This work
      is being done, in fact, to pave the way for the Personal Online Courses
      feature being developed by MIT, which will use an override provider very
      much long those lines.
      Chris Rossi committed
  20. 14 Mar, 2015 2 commits
  21. 12 Jan, 2015 1 commit
  22. 13 Dec, 2014 2 commits
  23. 25 Nov, 2014 1 commit
  24. 23 Sep, 2014 2 commits
  25. 24 May, 2014 1 commit
  26. 23 May, 2014 1 commit
  27. 09 May, 2014 1 commit
  28. 06 May, 2014 1 commit
    • Make course ids and usage ids opaque to LMS and Studio [partial commit] · 9811926d
      This commit updates lms/djangoapps/courseware.
      
      These keys are now objects with a limited interface, and the particular
      internal representation is managed by the data storage layer (the
      modulestore).
      
      For the LMS, there should be no outward-facing changes to the system.
      The keys are, for now, a change to internal representation only. For
      Studio, the new serialized form of the keys is used in urls, to allow
      for further migration in the future.
      
      Co-Author: Andy Armstrong <andya@edx.org>
      Co-Author: Christina Roberts <christina@edx.org>
      Co-Author: David Baumgold <db@edx.org>
      Co-Author: Diana Huang <dkh@edx.org>
      Co-Author: Don Mitchell <dmitchell@edx.org>
      Co-Author: Julia Hansbrough <julia@edx.org>
      Co-Author: Nimisha Asthagiri <nasthagiri@edx.org>
      Co-Author: Sarina Canelake <sarina@edx.org>
      
      [LMS-2370]
      Calen Pennington committed
  29. 28 Mar, 2014 1 commit
  30. 20 Dec, 2013 1 commit
    • Fix (re-implement) answer distribution report generation. · 0565fbbf
      This restores functionality that has been broken since the introduction of
      XModuleDescriptor/XModule proxying (part of the XBlock transition). It generates
      a CSV of all answers for all content of type "problem" in a given course, with a
      row per (problem part, answer). The format is:
      
      url_name, display name, answer id, answer, count
      
      Example values:
        url_name = "7f1b1523a55848cd9f5c93eb8cbabcf7"
        display name = "Problem 1: Something Hard"
        answer id = i4x-JediAcdmy-LTSB304-problem-7f1b1523a55848cd9f5c93eb8cbabcf7_2_1
        answer = "Use the Force"
        count = 1138
      
      Since it only grabs things of type "problem", it will not return results for
      things like self/peer-assessments. Any Loncapa problem types will show up (so
      multiple choice, text input, numeric, etc.)
      
      Instead of crawling the course tree and instantiating the appropriate CapaModule
      objects to grab state, this version draws directly from StudentModule. This lets
      us skip a lot of processing and most importantly lets us generate the answer
      distribution without causing side-effects (since XBlocks auto-save state). It
      also lets us take advantage of a read-replica database if one is available, to
      minimize locking concerns.
      
      There are minor changes to the legacy dashboard around CSV charset encoding and
      a change to OptionResponseXMLFactory to make it more unicode friendly. Answer
      distribution output is now also sorted, to group together answers for the same
      content piece.
      
      Note that this does not introduce celery into the process. Answer distributions
      are still only available for small courses.
      
      This was originally created to fix [LMS-922], but it also addresses [LMS-811] and
      possibly other areas in the legacy dashboard where CSV downloads break due to
      character encoding issues.
      David Ormsbee committed
  31. 26 Nov, 2013 1 commit
  32. 06 Sep, 2013 1 commit
  33. 18 Jun, 2013 2 commits