<commit_before><?php // $Id$
      // Display the whole course as "topics" made of of modules
      // In fact, this is very similar to the "weeks" format, in that
      // each "topic" is actually a week.  The main difference is that
      // the dates aren't printed - it's just an aesthetic thing for
      // courses that aren't so rigidly defined by time.
      // Included from "view.php"
      

    require_once($CFG->dirroot.'/mod/forum/lib.php');
    require_once($CFG->libdir.'/ajax/ajaxlib.php');
  
    
    $topic = optional_param('topic', -1, PARAM_INT);

    
    // Bounds for block widths
    define('BLOCK_L_MIN_WIDTH', 100);
    define('BLOCK_L_MAX_WIDTH', 210);
    define('BLOCK_R_MIN_WIDTH', 100);
    define('BLOCK_R_MAX_WIDTH', 210);

    $preferred_width_left  = bounded_number(BLOCK_L_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_LEFT]),  
                                            BLOCK_L_MAX_WIDTH);
    $preferred_width_right = bounded_number(BLOCK_R_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]), 
                                            BLOCK_R_MAX_WIDTH);

    if ($topic != -1) {
        $displaysection = course_set_display($course->id, $topic);
    } else {
        if (isset($USER->display[$course->id])) {       // for admins, mostly
            $displaysection = $USER->display[$course->id];
        } else {
            $displaysection = course_set_display($course->id, 0);
        }
    }

    if (($marker >=0) && isteacher($course->id) && confirm_sesskey()) {
        $course->marker = $marker;
        if (! set_field("course", "marker", $marker, "id", $course->id)) {
            error("Could not mark that topic for this course");
        }
    }

    $streditsummary   = get_string('editsummary');
    $stradd           = get_string('add');
    $stractivities    = get_string('activities');
    $strshowalltopics = get_string('showalltopics');
    $strtopic         = get_string('topic');
    $strgroups        = get_string('groups');
    $strgroupmy       = get_string('groupmy');
    $editing          = $PAGE->user_is_editing();

    if ($editing) {
        $strstudents = moodle_strtolower($course->students);
        $strtopichide = get_string('topichide', '', $strstudents);
        $strtopicshow = get_string('topicshow', '', $strstudents);
        $strmarkthistopic = get_string('markthistopic');
        $strmarkedthistopic = get_string('markedthistopic');
        $strmoveup = get_string('moveup');
        $strmovedown = get_string('movedown');
        
        //use temporarily until I figure out how to add a field to the user object
        $temporary_override = true;
        if (!empty($USER->use_ajax) || $temporary_override ){
            /*
             * if user doesnt want AJAX, than they wont get it, 
             * from here everything detects $COURSE->javascriptportal
             */
                               
               $COURSE->javascriptportal = new jsportal();

            print_require_js(Array("yui_yahoo","yui_dom","yui_event","yui_dragdrop","yui_connection","ajaxcourse_blocks","ajaxcourse_sections","ajaxcourse_topic"));
            
            //javascript logging facilities
            if($CFG->debug)print_require_js(Array("yui_logger"));
        }
    
    }


/// Layout the whole page as three big columns.
    echo '<table id="layout-table" cellspacing="0"><tr>';
<commit_msg>removed override for $USER->use_ajax<commit_after><?php // $Id$
      // Display the whole course as "topics" made of of modules
      // In fact, this is very similar to the "weeks" format, in that
      // each "topic" is actually a week.  The main difference is that
      // the dates aren't printed - it's just an aesthetic thing for
      // courses that aren't so rigidly defined by time.
      // Included from "view.php"
      

    require_once($CFG->dirroot.'/mod/forum/lib.php');
    require_once($CFG->libdir.'/ajax/ajaxlib.php');
  
    
    $topic = optional_param('topic', -1, PARAM_INT);

    
    // Bounds for block widths
    define('BLOCK_L_MIN_WIDTH', 100);
    define('BLOCK_L_MAX_WIDTH', 210);
    define('BLOCK_R_MIN_WIDTH', 100);
    define('BLOCK_R_MAX_WIDTH', 210);

    $preferred_width_left  = bounded_number(BLOCK_L_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_LEFT]),  
                                            BLOCK_L_MAX_WIDTH);
    $preferred_width_right = bounded_number(BLOCK_R_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_RIGHT]), 
                                            BLOCK_R_MAX_WIDTH);

    if ($topic != -1) {
        $displaysection = course_set_display($course->id, $topic);
    } else {
        if (isset($USER->display[$course->id])) {       // for admins, mostly
            $displaysection = $USER->display[$course->id];
        } else {
            $displaysection = course_set_display($course->id, 0);
        }
    }

    if (($marker >=0) && isteacher($course->id) && confirm_sesskey()) {
        $course->marker = $marker;
        if (! set_field("course", "marker", $marker, "id", $course->id)) {
            error("Could not mark that topic for this course");
        }
    }

    $streditsummary   = get_string('editsummary');
    $stradd           = get_string('add');
    $stractivities    = get_string('activities');
    $strshowalltopics = get_string('showalltopics');
    $strtopic         = get_string('topic');
    $strgroups        = get_string('groups');
    $strgroupmy       = get_string('groupmy');
    $editing          = $PAGE->user_is_editing();

    if ($editing) {
        $strstudents = moodle_strtolower($course->students);
        $strtopichide = get_string('topichide', '', $strstudents);
        $strtopicshow = get_string('topicshow', '', $strstudents);
        $strmarkthistopic = get_string('markthistopic');
        $strmarkedthistopic = get_string('markedthistopic');
        $strmoveup = get_string('moveup');
        $strmovedown = get_string('movedown');
        
        if (!empty($USER->use_ajax)){
            /*
             * if user doesnt want AJAX, than they wont get it, 
             * from here everything detects $COURSE->javascriptportal
             */
                               
               $COURSE->javascriptportal = new jsportal();

            print_require_js(Array("yui_yahoo","yui_dom","yui_event","yui_dragdrop","yui_connection","ajaxcourse_blocks","ajaxcourse_sections","ajaxcourse_topic"));
            
            //javascript logging facilities
            if($CFG->debug)print_require_js(Array("yui_logger"));
        }
    
    }


/// Layout the whole page as three big columns.
    echo '<table id="layout-table" cellspacing="0"><tr>';

{'fraction_non_alphanumeric': 0.13397913561847988, 'fraction_numerical': 0.005067064083457526, 'mean_word_length': 2.4521604938271606, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 44, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1539501', 'n_tokens_mistral': 2040, 'n_tokens_neox': 1976, 'n_words': 405}