

import sys


def edxnotes(cls):
    """
    Conditional decorator that loads edxnotes only when they exist.
    """
    if "edxnotes" in sys.modules:
        from edxnotes.decorators import edxnotes as notes
        return notes(cls)
    else:
        return cls



import sys


def edxnotes(cls):
    """
    Conditional decorator that loads edxnotes only when they exist.
    """
    if "lms.djangoapps.edxnotes" in sys.modules:
        from lms.djangoapps.edxnotes.decorators import edxnotes as notes
        return notes(cls)
    else:
        return cls

Use fully-qualified edxnotes app name when checking if installed
Use fully-qualified edxnotes app name when checking if installed

  
  
  import sys
  
  
  def edxnotes(cls):
      """
      Conditional decorator that loads edxnotes only when they exist.
      """
-     if "edxnotes" in sys.modules:
+     if "lms.djangoapps.edxnotes" in sys.modules:
-         from edxnotes.decorators import edxnotes as notes
+         from lms.djangoapps.edxnotes.decorators import edxnotes as notes
          return notes(cls)
      else:
          return cls
  
Use fully-qualified edxnotes app name when checking if installed
## Code Before:


import sys


def edxnotes(cls):
    """
    Conditional decorator that loads edxnotes only when they exist.
    """
    if "edxnotes" in sys.modules:
        from edxnotes.decorators import edxnotes as notes
        return notes(cls)
    else:
        return cls

## Instruction:
Use fully-qualified edxnotes app name when checking if installed
## Code After:


import sys


def edxnotes(cls):
    """
    Conditional decorator that loads edxnotes only when they exist.
    """
    if "lms.djangoapps.edxnotes" in sys.modules:
        from lms.djangoapps.edxnotes.decorators import edxnotes as notes
        return notes(cls)
    else:
        return cls
