Annual report pursuant to Section 13 and 15(d)

Income taxes (Details) - Components of loss before income taxes

v3.5.0.2
Income taxes (Details) - Components of loss before income taxes - USD ($)
$ in Thousands
3 Months Ended 12 Months Ended
Jul. 31, 2016
Apr. 30, 2016
Jan. 31, 2016
Oct. 31, 2015
Jul. 31, 2015
Apr. 30, 2015
Jan. 31, 2015
Oct. 31, 2014
Jul. 31, 2016
Jul. 31, 2015
Jul. 31, 2014
Income taxes (Details) - Components of loss before income taxes [Line Items]                      
Income (loss) before taxes $ 37,068 $ (2,113) $ 7,039 $ 4,521 $ 8,523 $ (3,003) $ (4,206) $ (3,606) $ 46,515 $ (2,292) $ (9,905)
Domestic Tax Authority [Member]                      
Income taxes (Details) - Components of loss before income taxes [Line Items]                      
Income (loss) before taxes                 48,847 (615) (8,702)
Foreign Tax Authority [Member]                      
Income taxes (Details) - Components of loss before income taxes [Line Items]                      
Income (loss) before taxes                 $ (2,332) $ (1,677) $ (1,203)